2021-08-26 13:13:59 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#
|
|
|
|
# Copyright (C) 2021 ImmortalWrt.org
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=v2rayA
|
2024-01-03 07:15:11 +00:00
|
|
|
PKG_VERSION:=2.2.4.6
|
2024-01-24 16:38:09 +00:00
|
|
|
PKG_RELEASE:=2
|
2021-08-26 13:13:59 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
|
2024-01-03 07:15:11 +00:00
|
|
|
PKG_HASH:=22285b2fdf321d68993b38ad738f4af210920757d7944691a78e151abd99cb3a
|
2021-08-26 13:13:59 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
|
|
|
|
|
2021-09-15 19:15:04 +00:00
|
|
|
PKG_LICENSE:=AGPL-3.0-only
|
2021-08-26 13:13:59 +00:00
|
|
|
PKG_LICENSE_FILES:=LICENSE
|
|
|
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
|
|
|
|
2022-06-18 18:02:08 +00:00
|
|
|
PKG_BUILD_DEPENDS:=golang/host
|
2021-08-26 13:13:59 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2023-03-23 07:39:01 +00:00
|
|
|
PKG_BUILD_FLAGS:=no-mips16
|
2021-08-26 13:13:59 +00:00
|
|
|
|
|
|
|
GO_PKG:=github.com/v2rayA/v2rayA
|
2023-03-18 15:13:26 +00:00
|
|
|
GO_PKG_LDFLAGS_X:= \
|
|
|
|
$(GO_PKG)/conf.Version=$(PKG_VERSION) \
|
|
|
|
$(GO_PKG)/core/iptables.TproxyNotSkipBr=true
|
2021-08-26 13:13:59 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
include ../../lang/golang/golang-package.mk
|
|
|
|
|
|
|
|
TAR_OPTIONS+= --strip-components 1
|
|
|
|
TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
|
|
|
|
|
2021-09-15 19:15:04 +00:00
|
|
|
define Package/v2raya
|
2021-08-26 13:13:59 +00:00
|
|
|
TITLE:=A Linux web GUI client of Project V
|
|
|
|
SECTION:=net
|
|
|
|
CATEGORY:=Network
|
|
|
|
SUBMENU:=Web Servers/Proxies
|
|
|
|
DEPENDS:=$(GO_ARCH_DEPENDS) \
|
|
|
|
+ca-bundle \
|
2023-03-03 03:50:29 +00:00
|
|
|
+kmod-nft-tproxy \
|
2021-08-26 13:13:59 +00:00
|
|
|
+xray-core
|
|
|
|
URL:=https://v2raya.org
|
|
|
|
endef
|
|
|
|
|
2021-09-15 19:15:04 +00:00
|
|
|
define Package/v2raya/description
|
2021-08-26 13:13:59 +00:00
|
|
|
v2rayA is a V2Ray Linux client supporting global transparent proxy,
|
|
|
|
compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.
|
|
|
|
endef
|
|
|
|
|
2021-09-15 19:15:04 +00:00
|
|
|
define Package/v2raya/conffiles
|
|
|
|
/etc/v2raya/
|
|
|
|
/etc/config/v2raya
|
|
|
|
endef
|
|
|
|
|
2023-12-05 11:01:25 +00:00
|
|
|
WEB_FILE:=$(PKG_NAME)-web-$(PKG_VERSION).tar.gz
|
2022-06-18 18:02:08 +00:00
|
|
|
define Download/v2raya-web
|
2023-08-27 01:51:22 +00:00
|
|
|
URL:=https://github.com/v2rayA/v2rayA/releases/download/v$(PKG_VERSION)/
|
2023-12-05 11:01:25 +00:00
|
|
|
URL_FILE:=web.tar.gz
|
2022-06-18 18:02:08 +00:00
|
|
|
FILE:=$(WEB_FILE)
|
2024-01-03 07:15:11 +00:00
|
|
|
HASH:=09109442abac13801b7b82433fccbb769657b1d292ac4820af179c297e845135
|
2022-06-18 18:02:08 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Prepare
|
|
|
|
$(call Build/Prepare/Default)
|
|
|
|
|
2021-08-26 13:13:59 +00:00
|
|
|
( \
|
2022-06-18 18:02:08 +00:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)/server/router/web ; \
|
2023-12-05 11:01:25 +00:00
|
|
|
gzip -dc $(DL_DIR)/$(WEB_FILE) | $(HOST_TAR) -C $(PKG_BUILD_DIR)/server/router/web $(TAR_OPTIONS) ; \
|
2021-08-26 13:13:59 +00:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2021-09-15 19:15:04 +00:00
|
|
|
define Package/v2raya/install
|
2021-08-26 13:13:59 +00:00
|
|
|
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin/
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/v2rayA $(1)/usr/bin/v2raya
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config/
|
|
|
|
$(INSTALL_CONF) $(CURDIR)/files/v2raya.config $(1)/etc/config/v2raya
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d/
|
|
|
|
$(INSTALL_BIN) $(CURDIR)/files/v2raya.init $(1)/etc/init.d/v2raya
|
|
|
|
endef
|
|
|
|
|
2022-06-18 18:02:08 +00:00
|
|
|
$(eval $(call Download,v2raya-web))
|
2021-09-15 19:15:04 +00:00
|
|
|
$(eval $(call GoBinPackage,v2raya))
|
|
|
|
$(eval $(call BuildPackage,v2raya))
|