Browse Source

v2raya: Update to 1.5.3

- Added missing conffiles
- Refreshed init srcipt to adapt the new arguments
- Renamed package name to lowercase (suggestion from upstream)
- Updated dependencies and license

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
lilik-openwrt-22.03
Tianling Shen 3 years ago
parent
commit
16e453e4ac
No known key found for this signature in database GPG Key ID: 6850B6345C862176
3 changed files with 52 additions and 28 deletions
  1. +16
    -9
      net/v2raya/Makefile
  2. +15
    -7
      net/v2raya/files/v2raya.config
  3. +21
    -12
      net/v2raya/files/v2raya.init

+ 16
- 9
net/v2raya/Makefile View File

@ -5,15 +5,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=v2rayA
PKG_VERSION:=1.5.2
PKG_VERSION:=1.5.3
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=3611b9fa5a6e0421007f2a3ce9671847ffc39e82e1caa6782eff5db470e92fe0
PKG_HASH:=0f6faeb297279dba138c2afc8525f090f965a0141a4f9d071165ea8500921a55
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service
PKG_LICENSE:=GPL-3.0-only
PKG_LICENSE:=AGPL-3.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
@ -22,7 +22,7 @@ PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
GO_PKG:=github.com/v2rayA/v2rayA
GO_PKG_LDFLAGS_X:=$(GO_PKG)/global.Version=$(PKG_VERSION)
GO_PKG_LDFLAGS_X:=$(GO_PKG)/conf.Version=$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include ../../lang/golang/golang-package.mk
@ -30,13 +30,15 @@ include ../../lang/golang/golang-package.mk
TAR_OPTIONS+= --strip-components 1
TAR_CMD=$(HOST_TAR) -C $(1)/.. $(TAR_OPTIONS)
define Package/v2rayA
define Package/v2raya
TITLE:=A Linux web GUI client of Project V
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
DEPENDS:=$(GO_ARCH_DEPENDS) \
+ca-bundle \
+iptables-mod-conntrack-extra \
+iptables-mod-extra \
+iptables-mod-filter \
+iptables-mod-tproxy \
+kmod-ipt-nat6 \
@ -44,11 +46,16 @@ define Package/v2rayA
URL:=https://v2raya.org
endef
define Package/v2rayA/description
define Package/v2raya/description
v2rayA is a V2Ray Linux client supporting global transparent proxy,
compatible with SS, SSR, Trojan(trojan-go), PingTunnel protocols.
endef
define Package/v2raya/conffiles
/etc/v2raya/
/etc/config/v2raya
endef
define Build/Compile
( \
pushd $(PKG_BUILD_DIR)/../gui ; \
@ -59,7 +66,7 @@ define Build/Compile
)
endef
define Package/v2rayA/install
define Package/v2raya/install
$(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
@ -70,5 +77,5 @@ define Package/v2rayA/install
$(INSTALL_BIN) $(CURDIR)/files/v2raya.init $(1)/etc/init.d/v2raya
endef
$(eval $(call GoBinPackage,v2rayA))
$(eval $(call BuildPackage,v2rayA))
$(eval $(call GoBinPackage,v2raya))
$(eval $(call BuildPackage,v2raya))

+ 15
- 7
net/v2raya/files/v2raya.config View File

@ -8,11 +8,22 @@ config v2raya 'config'
# v2rayA configuration directory
option config '/etc/v2raya'
# force open ipv6
option force_ipv6_on '0'
# Make sure your IPv6 network works fine before you turn it on.
# Optional values: auto, on, off.
option ipv6_support 'auto'
# ssr, pingTunnel, etc.
option plugin_listen_port '32346'
# Optional values: trace, debug, info, warn or error
option log_level 'info'
# The path of log file
option log_file '/tmp/v2raya.log'
# Maximum number of days to keep log files
option log_max_days '3'
option log_disable_color '1'
option log_disable_timestamp '0'
# Executable v2ray binary path. Auto-detect if put it empty
option v2ray_bin ''
@ -24,6 +35,3 @@ config v2raya 'config'
# Example: /etc/v2raya/grpc_certificate.crt,/etc/v2raya/grpc_private.key
option vless_grpc_inbound_cert_key ''
# Print detailed v2ray-core log to stdout
option verbose '0'

+ 21
- 12
net/v2raya/files/v2raya.init View File

@ -9,7 +9,7 @@ PROG="/usr/bin/v2raya"
is_enabled() {
local enabled
config_get enabled "$1" "$2" "${3:-0}"
config_get_bool enabled "$1" "$2" "${3:-0}"
if [ "$enabled" -eq "1" ]; then
return 0
else
@ -18,13 +18,17 @@ is_enabled() {
}
append_param() {
procd_append_param command "--$1" $2
procd_append_param command "$1" $2
}
append_param_arg() {
local value
config_get value "$1" "$2" $4
[ -n "$value" ] && append_param "$3" "$value"
config_get value "$1" "$2" $3
[ -n "$value" ] && append_param "--${2//_/-}" "$value"
}
append_param_bool() {
is_enabled "$1" "$2" && append_param "--${2//_/-}"
}
start_service() {
@ -35,17 +39,22 @@ start_service() {
procd_open_instance "$CONF"
procd_set_param command "$PROG"
append_param_arg "config" "address" "address" "0.0.0.0:2017"
append_param_arg "config" "config" "config" "/etc/v2raya"
append_param_arg "config" "plugin_listen_port" "pluginlistenport" "32346"
append_param_arg "config" "v2ray_bin" "v2ray-bin"
append_param_arg "config" "v2ray_confdir" "v2ray-confdir"
append_param_arg "config" "vless_grpc_inbound_cert_key" "vless-grpc-inbound-cert-key"
is_enabled "config" "force_ipv6_on" && append_param "force-ipv6-on"
is_enabled "config" "verbose" && append_param "verbose"
append_param_arg "config" "address" "0.0.0.0:2017"
append_param_arg "config" "config" "/etc/v2raya"
append_param_arg "config" "ipv6_support" "auto"
append_param_arg "config" "log_level" "info"
append_param_arg "config" "log_file" "/tmp/v2raya.log"
append_param_arg "config" "log_max_days" "3"
append_param_arg "config" "v2ray_bin"
append_param_arg "config" "v2ray_confdir"
append_param_arg "config" "vless_grpc_inbound_cert_key"
append_param_bool "config" "log_disable_color"
append_param_bool "config" "log_disable_timestamp"
procd_set_param limits core="unlimited"
procd_set_param respawn
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}


Loading…
Cancel
Save