From 8c57b32948f2c654a5470f1961ad1229105430a4 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Tue, 20 Jun 2023 15:11:39 +0800 Subject: [PATCH 01/18] add tuic-client for ssrplus Makefile --- luci-app-ssr-plus/Makefile | 216 ++++++++++++++++++------------------- 1 file changed, 108 insertions(+), 108 deletions(-) diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index 170e8398f55..596e076ae24 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -5,160 +5,160 @@ PKG_VERSION:=187 PKG_RELEASE:=1 PKG_CONFIG_DEPENDS:= \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_TUIC \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2 \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Client \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2ray_Plugin \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server \ - CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan - -LUCI_TITLE:=SS/SSR/V2Ray/Trojan/NaiveProxy/Socks5/Tun LuCI interface + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_V2ray \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Xray \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Tuic-Client \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2 \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Client \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2ray_Plugin \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server \ + CONFIG_PACKAGE_$(PKG_NAME)_INCLUDE_Trojan + +LUCI_TITLE:=SS/SSR/V2Ray/Trojan/NaiveProxy/TUIC/Hysteria/Socks5/Tun LuCI interface LUCI_PKGARCH:=all LUCI_DEPENDS:= \ - @(PACKAGE_libustream-mbedtls||PACKAGE_libustream-openssl||PACKAGE_libustream-wolfssl) \ - +coreutils +coreutils-base64 +dns2socks +dns2tcp +dnsmasq-full +@PACKAGE_dnsmasq_full_ipset +ipset +kmod-ipt-nat \ - +ip-full +iptables +iptables-mod-tproxy +lua +lua-neturl +libuci-lua +microsocks \ - +tcping +resolveip +shadowsocksr-libev-ssr-check +uclient-fetch \ - +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:curl \ - +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray-core \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG:chinadns-ng \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria:hysteria \ - +PACKAGE_$(PKG_NAME)_INCLUDE_TUIC:tuic-client \ - +PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks:ipt2socks \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \ - +PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy:naiveproxy \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2:redsocks2 \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-local \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs:simple-obfs \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2ray_Plugin:v2ray-plugin \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \ - +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \ - +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan + @(PACKAGE_libustream-mbedtls||PACKAGE_libustream-openssl||PACKAGE_libustream-wolfssl) \ + +coreutils +coreutils-base64 +dns2socks +dns2tcp +dnsmasq-full +@PACKAGE_dnsmasq_full_ipset +ipset +kmod-ipt-nat \ + +ip-full +iptables +iptables-mod-tproxy +lua +lua-neturl +libuci-lua +microsocks \ + +tcping +resolveip +shadowsocksr-libev-ssr-check +uclient-fetch \ + +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:curl \ + +PACKAGE_$(PKG_NAME)_INCLUDE_V2ray:v2ray-core \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:curl \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Xray:xray-core \ + +PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG:chinadns-ng \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria:hysteria \ + +PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client:tuic-client \ + +PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks:ipt2socks \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun:kcptun-client \ + +PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy:naiveproxy \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2:redsocks2 \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-local \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client:shadowsocks-libev-ss-redir \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server:shadowsocks-libev-ss-server \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client:shadowsocks-rust-sslocal \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server:shadowsocks-rust-ssserver \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs:simple-obfs \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2ray_Plugin:v2ray-plugin \ + +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-local \ + +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client:shadowsocksr-libev-ssr-redir \ + +PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server:shadowsocksr-libev-ssr-server \ + +PACKAGE_$(PKG_NAME)_INCLUDE_Trojan:trojan define Package/$(PKG_NAME)/config select PACKAGE_luci-lib-ipkg if PACKAGE_$(PKG_NAME) choice - prompt "Shadowsocks Client Selection" - default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client if aarch64 - default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client + prompt "Shadowsocks Client Selection" + default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client if aarch64 + default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Client - bool "None" + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Client + bool "None" - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client - bool "Shadowsocks-libev" + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Client + bool "Shadowsocks-libev" - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client - bool "Shadowsocks-rust" - depends on aarch64||arm||i386||mips||mipsel||x86_64 - depends on !(TARGET_x86_geode||TARGET_x86_legacy) + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Client + bool "Shadowsocks-rust" + depends on aarch64||arm||i386||mips||mipsel||x86_64 + depends on !(TARGET_x86_geode||TARGET_x86_legacy) endchoice choice - prompt "Shadowsocks Server Selection" - default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server if aarch64 - default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server if i386||x86_64||arm - default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server + prompt "Shadowsocks Server Selection" + default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server if aarch64 + default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server if i386||x86_64||arm + default PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server - bool "None" + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_NONE_Server + bool "None" - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server - bool "Shadowsocks-libev" + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Libev_Server + bool "Shadowsocks-libev" - config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server - bool "Shadowsocks-rust" - depends on aarch64||arm||i386||mips||mipsel||x86_64 - depends on !(TARGET_x86_geode||TARGET_x86_legacy) + config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Rust_Server + bool "Shadowsocks-rust" + depends on aarch64||arm||i386||mips||mipsel||x86_64 + depends on !(TARGET_x86_geode||TARGET_x86_legacy) endchoice choice - prompt "V2ray-core Selection" - default PACKAGE_$(PKG_NAME)_INCLUDE_Xray if aarch64||arm||i386||x86_64 - default PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY + prompt "V2ray-core Selection" + default PACKAGE_$(PKG_NAME)_INCLUDE_Xray if aarch64||arm||i386||x86_64 + default PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY - config PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY - bool "None" + config PACKAGE_$(PKG_NAME)_INCLUDE_NONE_V2RAY + bool "None" - config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray - bool "V2ray-core" + config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray + bool "V2ray-core" - config PACKAGE_$(PKG_NAME)_INCLUDE_Xray - bool "Xray-core" + config PACKAGE_$(PKG_NAME)_INCLUDE_Xray + bool "Xray-core" endchoice config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG - bool "Include ChinaDNS-NG" - default y + bool "Include ChinaDNS-NG" + default y config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria - bool "Include Hysteria" - default n + bool "Include Hysteria" + default n -config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC - bool "Include tuic-client" - default n +config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client + bool "Include tuic-client" + default n config PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks - bool "Include IPT2Socks" - default n + bool "Include IPT2Socks" + default n config PACKAGE_$(PKG_NAME)_INCLUDE_Kcptun - bool "Include Kcptun" - default n + bool "Include Kcptun" + default n config PACKAGE_$(PKG_NAME)_INCLUDE_NaiveProxy - bool "Include NaiveProxy" - depends on !(arc||armeb||mips||mips64||powerpc||TARGET_gemini) - default n + bool "Include NaiveProxy" + depends on !(arc||armeb||mips||mips64||powerpc||TARGET_gemini) + default n config PACKAGE_$(PKG_NAME)_INCLUDE_Redsocks2 - bool "Include Redsocks2" - default n + bool "Include Redsocks2" + default n config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_Simple_Obfs - bool "Include Shadowsocks Simple Obfs Plugin" - default y + bool "Include Shadowsocks Simple Obfs Plugin" + default y config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks_V2ray_Plugin - bool "Include Shadowsocks V2ray Plugin" - default n + bool "Include Shadowsocks V2ray Plugin" + default n config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Client - bool "Include ShadowsocksR Libev Client" - default y + bool "Include ShadowsocksR Libev Client" + default y config PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR_Libev_Server - bool "Include ShadowsocksR Libev Server" - default y if i386||x86_64||arm + bool "Include ShadowsocksR Libev Server" + default y if i386||x86_64||arm config PACKAGE_$(PKG_NAME)_INCLUDE_Trojan - bool "Include Trojan" - select PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks - default n + bool "Include Trojan" + select PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks + default n endef define Package/$(PKG_NAME)/conffiles From 5164547937539acbf8b6e0d0d1bd4e22c85ec0d4 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Tue, 20 Jun 2023 16:05:25 +0800 Subject: [PATCH 02/18] Update Makefile --- tuic-client/Makefile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tuic-client/Makefile b/tuic-client/Makefile index 951e86a4501..1dd6f53f3df 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -11,28 +11,27 @@ PKG_RELEASE:=1 PKG_SOURCE_HEADER:=tuic-client-$(PKG_VERSION) PKG_SOURCE_BODY:=unknown-linux-musl -#PKG_SOURCE_FOOTER:=tar.xz -PKG_SOURCE_URL:=https://https://github.com/EAimTY/tuic/releases/download/$(PKG_SOURCE_HEADER)-$(PKG_VERSION)/ +PKG_SOURCE_URL:=https://github.com/EAimTY/tuic/releases/download/$(PKG_SOURCE_HEADER)/$(PKG_SOURCE_HEADER)-$(PKG_SOURCE_BODY) ifeq ($(ARCH),aarch64) PKG_SOURCE:=$(PKG_SOURCE_HEADER)-aarch64-$(PKG_SOURCE_BODY) - PKG_HASH:= -else ifeq ($(ARCH),arm) - # Referred to golang/golang-values.mk + PKG_HASH:=29eaaf3bc05115acc7453ac26bacf9aff65211b1e8ca7f771b818248bec8601 +else ifeq ($ARCH),arm) + # Referred to golang/golang-values.mk ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) ifeq ($(ARM_CPU_FEATURES),) - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-arm-$(PKG_SOURCE_BODY)eabi - PKG_HASH:=5ec0a5708bc4d1c984b48e70cc96642bc89ade19ee9b299af1f4522fd421561e + PKG_SOURCE:=$(PKG_SOURCE_HEADER)-armv7-$(PKG_SOURCE_BODY)eabi + PKG_HASH:=33a83ab05dc1a598552bf1f27114502b12c94b6e5333c6ac2def3739c00a4daf else - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-arm-$(PKG_SOURCE_BODY)eabihf - PKG_HASH:=949f60a860dad40170bc70889af7a826f22b6fbaef55095fe8ef413cdd658b4a + PKG_SOURCE:=$(PKG_SOURCE_HEADER)-armv7-$(PKG_SOURCE_BODY)eabihf + PKG_HASH:=e2cc1d81ac376ff2a94976e78c861f5cd21ad809ff5b587ae967e2a63e4c35e4 endif else ifeq ($(ARCH),i686) PKG_SOURCE:=$(PKG_SOURCE_HEADER)-i686-$(PKG_SOURCE_BODY) - PKG_HASH:=5b5e98f593493850dc4a29517f537136dc0fd62ae56ba958bbefcc4ba9b467dd + PKG_HASH:=67d930b4381a8848bf98acbccb538c73b72ca9dde0aed3705f73e62a9922f758 else ifeq ($(ARCH),x86_64) PKG_SOURCE:=$(PKG_SOURCE_HEADER)-x86_64-$(PKG_SOURCE_BODY) - PKG_HASH:=6d1d73fb94bac7d15d360d9e1cbd9d6787faa20e7881ee41b7c444e7b520194a + PKG_HASH:=180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de # Set the default value to make OpenWrt Package Checker happy else PKG_SOURCE:=dummy @@ -73,4 +72,3 @@ define Build/Compile endef $(eval $(call BuildPackage,tuic-client)) - From 11b84538ca8661767f1dce859ed3bffe88e30348 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Tue, 20 Jun 2023 20:33:15 +0800 Subject: [PATCH 03/18] Update Makefile --- tuic-client/Makefile | 94 ++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/tuic-client/Makefile b/tuic-client/Makefile index 1dd6f53f3df..d813966dedd 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -9,66 +9,68 @@ PKG_NAME:=tuic-client PKG_VERSION:=1.0.0 PKG_RELEASE:=1 -PKG_SOURCE_HEADER:=tuic-client-$(PKG_VERSION) -PKG_SOURCE_BODY:=unknown-linux-musl -PKG_SOURCE_URL:=https://github.com/EAimTY/tuic/releases/download/$(PKG_SOURCE_HEADER)/$(PKG_SOURCE_HEADER)-$(PKG_SOURCE_BODY) +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Tianling Shen + +include $(INCLUDE_DIR)/package.mk +TUIC_TYPE:=tuic-client-$(PKG_VERSION) +TUIC_FOOT:=unknown-linux-musl ifeq ($(ARCH),aarch64) - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-aarch64-$(PKG_SOURCE_BODY) - PKG_HASH:=29eaaf3bc05115acc7453ac26bacf9aff65211b1e8ca7f771b818248bec8601 + TUIC_ARCH:=$(TUIC_TYPE)-aarch64-$(TUIC_FOOT) + PKG_HASH:=29eaaf3bc05115acc7453ac26bacf9aff65211b1e8ca7f771b818248bec8601 else ifeq ($ARCH),arm) - # Referred to golang/golang-values.mk - ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) - ifeq ($(ARM_CPU_FEATURES),) - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-armv7-$(PKG_SOURCE_BODY)eabi - PKG_HASH:=33a83ab05dc1a598552bf1f27114502b12c94b6e5333c6ac2def3739c00a4daf - else - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-armv7-$(PKG_SOURCE_BODY)eabihf - PKG_HASH:=e2cc1d81ac376ff2a94976e78c861f5cd21ad809ff5b587ae967e2a63e4c35e4 - endif +# Referred to golang/golang-values.mk + ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) + ifeq ($(ARM_CPU_FEATURES),) + TUIC_ARCH:=$(TUIC_TYPE)-armv7-$(TUIC_FOOT)eabi + PKG_HASH:=33a83ab05dc1a598552bf1f27114502b12c94b6e5333c6ac2def3739c00a4daf + else + TUIC_ARCH:=$(TUIC_TYPE)-armv7-$(TUIC_FOOT)eabihf + PKG_HASH:=e2cc1d81ac376ff2a94976e78c861f5cd21ad809ff5b587ae967e2a63e4c35e4 + endif else ifeq ($(ARCH),i686) - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-i686-$(PKG_SOURCE_BODY) - PKG_HASH:=67d930b4381a8848bf98acbccb538c73b72ca9dde0aed3705f73e62a9922f758 + TUIC_ARCH:=$(TUIC_TYPE)-i686-$(TUIC_FOOT) + PKG_HASH:=67d930b4381a8848bf98acbccb538c73b72ca9dde0aed3705f73e62a9922f758 else ifeq ($(ARCH),x86_64) - PKG_SOURCE:=$(PKG_SOURCE_HEADER)-x86_64-$(PKG_SOURCE_BODY) - PKG_HASH:=180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de -# Set the default value to make OpenWrt Package Checker happy + TUIC_ARCH:=$(TUIC_TYPE)-x86_64-$(TUIC_FOOT) + PKG_HASH:=180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de else - PKG_SOURCE:=dummy - PKG_HASH:=dummy + TUIC_ARCH:=dummy + PKG_HASH:=dummy endif -PKG_MAINTAINER:=Tianling Shen -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(INCLUDE_DIR)/package.mk - -#TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS) +define Download/tuic-client + URL:=https://github.com/EAimTY/tuic/releases/download/$(TUIC_TYPE)/ + URL_FILE:=$(TUIC_ARCH) + FILE:=tuic-client + HASH:=$(PKG_HASH) +#180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de +endef define Package/tuic-client - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=Delicately-TUICed 0-RTT proxy protocol - URL:=https://github.com/EAimTY/tuic/ - DEPENDS:=@USE_MUSL @(aarch64||arm||i686||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy) + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Delicately-TUICed 0-RTT proxy protocol + URL:=https://github.com/EAimTY/tuic/ + PKGARCH:=all endef -define Package/tuic-client/description - TUIC is a proxy protocol focusing on minimize the additional handshake - latency caused by relaying as much as possible, as well as keeping - the protocol itself being simple and easy to implement. - TUIC is originally designed to be used on top of the QUIC protocol, - but you can use it with any other protocol, e.g. TCP, in theory +define Build/Prepare + $(call Build/Prepare/Default) +ifneq ($(CONFIG_PACKAGE_tuic-client),) + $(call Download,tuic-client) +endif endef - define Package/tuic-client/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/ $(1)/usr/bin/tuic-client - endef - define Build/Compile endef - $(eval $(call BuildPackage,tuic-client)) +define Package/tuic-client/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH) $(1)/usr/bin/tuic-client + chmod +x $(1)/usr/bin/tuic-client +endef + +$(eval $(call BuildPackage,tuic-client)) From 1b2ce7a5c6a573fe496397272e102392222ffe01 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Wed, 21 Jun 2023 11:18:53 +0800 Subject: [PATCH 04/18] Update Makefile --- luci-app-ssr-plus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index 596e076ae24..bf7c84556c0 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -120,7 +120,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client bool "Include tuic-client" - default n + default y if i686||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks bool "Include IPT2Socks" From 326d62b77a9e3802ad94dc7fb1e358e4069f2e7f Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Wed, 21 Jun 2023 14:24:25 +0800 Subject: [PATCH 05/18] Update Makefile --- tuic-client/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuic-client/Makefile b/tuic-client/Makefile index d813966dedd..2777c7c5779 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -43,7 +43,7 @@ endif define Download/tuic-client URL:=https://github.com/EAimTY/tuic/releases/download/$(TUIC_TYPE)/ URL_FILE:=$(TUIC_ARCH) - FILE:=tuic-client + FILE:=$(TUIC_ARCH) HASH:=$(PKG_HASH) #180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de endef From ef718785d74c2b28e9c497a2e240c37be7ff11b1 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Wed, 21 Jun 2023 16:02:15 +0800 Subject: [PATCH 06/18] Update Makefile --- luci-app-ssr-plus/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index bf7c84556c0..610d8f28fdc 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -120,6 +120,8 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client bool "Include tuic-client" + depends on aarch||arm||i686||x86_64 + depends on !(TARGET_x86_geode||TARGET_x86_legacy) default y if i686||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks From 9eb9fe7eb05b51dad546db793fc9810134c8821c Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Wed, 21 Jun 2023 16:05:03 +0800 Subject: [PATCH 07/18] Update Makefile --- tuic-client/Makefile | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tuic-client/Makefile b/tuic-client/Makefile index 2777c7c5779..eeb6dbe834b 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -41,26 +41,26 @@ else endif define Download/tuic-client - URL:=https://github.com/EAimTY/tuic/releases/download/$(TUIC_TYPE)/ - URL_FILE:=$(TUIC_ARCH) - FILE:=$(TUIC_ARCH) - HASH:=$(PKG_HASH) -#180c562691247a7feddf553706bc8fd5b5b9de3027154f94a767ea907a45e2de + URL:=https://github.com/EAimTY/tuic/releases/download/$(TUIC_TYPE)/ + URL_FILE:=$(TUIC_ARCH) + FILE:=$(TUIC_ARCH) + HASH:=$(PKG_HASH) endef define Package/tuic-client - SECTION:=net - CATEGORY:=Network - SUBMENU:=Web Servers/Proxies - TITLE:=Delicately-TUICed 0-RTT proxy protocol - URL:=https://github.com/EAimTY/tuic/ - PKGARCH:=all + SECTION:=net + CATEGORY:=Network + SUBMENU:=Web Servers/Proxies + TITLE:=Delicately-TUICed 0-RTT proxy protocol + URL:=https://github.com/EAimTY/tuic/ + DEPENDS:=@USE_MUSL @(aarch64||arm||i686||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy) + #PKGARCH:=all endef define Build/Prepare - $(call Build/Prepare/Default) + $(call Build/Prepare/Default) ifneq ($(CONFIG_PACKAGE_tuic-client),) - $(call Download,tuic-client) + $(call Download,tuic-client) endif endef @@ -68,9 +68,9 @@ define Build/Compile endef define Package/tuic-client/install - $(INSTALL_DIR) $(1)/usr/bin - $(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH) $(1)/usr/bin/tuic-client - chmod +x $(1)/usr/bin/tuic-client + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(DL_DIR)/$(TUIC_ARCH) $(1)/usr/bin/tuic-client + chmod +x $(1)/usr/bin/tuic-client endef $(eval $(call BuildPackage,tuic-client)) From 485449976f29511c455a68d84770367f47f2760b Mon Sep 17 00:00:00 2001 From: TeF Date: Mon, 26 Jun 2023 14:12:45 +0800 Subject: [PATCH 08/18] add tuic-client new options update tuic translations --- hysteria/Makefile | 1 + luci-app-ssr-plus/Makefile | 2 +- .../model/cbi/shadowsocksr/client-config.lua | 40 +++++++++++++------ luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 28 ++++++++----- .../usr/share/shadowsocksr/gen_config.lua | 12 +++--- tuic-client/Makefile | 3 +- 6 files changed, 56 insertions(+), 30 deletions(-) diff --git a/hysteria/Makefile b/hysteria/Makefile index d28a9439c15..c04e2157c76 100644 --- a/hysteria/Makefile +++ b/hysteria/Makefile @@ -30,6 +30,7 @@ include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk define Package/hysteria SECTION:=net CATEGORY:=Network + SUBMENU:=Web Servers/Proxies TITLE:=A feature-packed network utility optimized for networks of poor quality URL:=https://github.com/apernet/hysteria DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index 610d8f28fdc..020a5de3828 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -122,7 +122,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client bool "Include tuic-client" depends on aarch||arm||i686||x86_64 depends on !(TARGET_x86_geode||TARGET_x86_legacy) - default y if i686||x86_64||arm||aarch64 + default n if i686||x86_64||arm||aarch64 config PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks bool "Include IPT2Socks" diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 4e2b4d37ced..9a2000445cb 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -225,7 +225,6 @@ o:depends({type = "v2ray", v2ray_protocol = "socks"}) o = s:option(Value, "username", translate("Username")) o.rmempty = true o:depends("type", "naiveproxy") ---o:depends("type", "tuic") o:depends({type = "socks5", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "socks", auth_enable = true}) @@ -237,7 +236,6 @@ o:depends("type", "ssr") o:depends("type", "ss") o:depends("type", "trojan") o:depends("type", "naiveproxy") -o:depends("type", "tuic") o:depends({type = "socks5", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "http", auth_enable = true}) o:depends({type = "v2ray", v2ray_protocol = "socks", socks_ver = "5", auth_enable = true}) @@ -356,6 +354,13 @@ o.rmempty = true o.default = uuid o:depends("type", "tuic") +--Tuic IP +o = s:option(Value, "tuic_ip", translate("The IP address of the TUIC proxy server, for overriding DNS resolving") +o.rmempty = true +o.datatype = "ip4addr" +o.default = "" +o:depends("type", "tuic") + -- Tuic Password o = s:option(Value, "tuic_passwd", translate("TUIC User Password")) o.rmempty = true @@ -365,8 +370,8 @@ o:depends("type", "tuic") o = s:option(ListValue, "udp_relay_mode", translate("UDP relay mode")) o:depends("type", "tuic") -o:value("native", translate("native")) -o:value("quic", translate("QUIC")) +o:value("native", translate("native UDP characteristics") +o:value("quic", translate("lossless UDP relay using QUIC streams") o.default = "native" o.rmempty = true @@ -384,35 +389,34 @@ o.datatype = "uinteger" o.default = "3" o.rmempty = true -o = s:option(Value, "timeout", translate("timeout for establishing a connection to server(second)")) +o = s:option(Value, "timeout", translate("Timeout for establishing a connection to server(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "8" o.rmempty = true -o = s:option(Value, "gc_interval", translate("garbage collection interval(second)")) +o = s:option(Value, "gc_interval", translate("Garbage collection interval(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "3" o.rmempty = true -o = s:option(Value, "gc_lifetime", translate("garbage collection lifetime(second)")) +o = s:option(Value, "gc_lifetime", translate("Garbage collection lifetime(second)")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = "15" o.rmempty = true - o = s:option(Value, "send_window", translate("TUIC send window")) -o.datatype = "uinteger" o:depends("type", "tuic") -o.default = 20971520 +o.datatype = "uinteger" +o.default = 16777216 o.rmempty = true o = s:option(Value, "receive_window", translate("TUIC receive window")) -o.datatype = "uinteger" o:depends("type", "tuic") -o.default = 10485760 +o.datatype = "uinteger" +o.default = 8388608 o.rmempty = true o = s:option(Flag, "disable_sni", translate("Disable SNI")) @@ -425,6 +429,18 @@ o:depends("type", "tuic") o.default = 0 o.rmempty = true +--Tuic settings for the local inbound socks5 server +o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack") +o:depends("type", "tuic") +o.default = 0 +o.rmempty = true + +o = s:option(Flag, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external") +o:depends("type", "tuic") +o.datatype = "uinteger" +o.default = 1500 +o.rmempty = true + -- VmessId o = s:option(Value, "vmess_id", translate("Vmess/VLESS ID (UUID)")) o.rmempty = true diff --git a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po index c39e3eb3f47..7a6f0f61964 100644 --- a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -853,10 +853,13 @@ msgstr "应用" msgid "Enable Netflix Mode" msgstr "启用 Netflix 分流模式" -msgid "TUIC user UUID" +msgid "TUIC User UUID" msgstr "TUIC用户uuid" -msgid "TUIC user Password" +msgid "The IP address of the TUIC proxy server, for overriding DNS resolving" +msgstr "TUIC 服务器IP地址,用于覆盖DNS解析结果" + +msgid "TUIC User Password" msgstr "TUIC用户密钥" msgid "UDP relay mode" @@ -865,23 +868,23 @@ msgstr "UDP中继模式" msgid "native UDP characteristics" msgstr "原生UDP特性" -msgid "lossless UDP relay using QUIC streams, additional overhead is introduced" -msgstr "使用 QUIC 流的无损 UDP 中继(引入了额外的开销)" +msgid "lossless UDP relay using QUIC streams" +msgstr "使用 QUIC 流的无损 UDP 中继" msgid "Congestion control algorithm" msgstr "拥塞控制算法" msgid "Heartbeat interval(second)" -msgstr "设置连接保活间隔(单位:秒)" +msgstr "保活心跳包发送间隔(单位:秒)" msgid "Timeout for establishing a connection to server(second)" -msgstr "设置建立连接超时(单位:秒)" +msgstr "连接超时时间(单位:秒)" msgid "Garbage collection interval(second)" -msgstr "设置UDP碎片收集时间间隔(单位:秒)" +msgstr "UDP数据包片残片清理间隔(单位:秒)" msgid "Garbage collection lifetime(second)" -msgstr "设置UDP碎片生存时间(单位:秒)" +msgstr "UDP数据包残片在服务器的保留时间(单位:秒)" msgid "Disable SNI" msgstr "关闭SNI服务器名称指示" @@ -890,8 +893,13 @@ msgid "Enable 0-RTT QUIC handshake" msgstr "客户端启用 0-RTT QUIC 连接握手" msgid "TUIC send window" -msgstr "发送窗口(无需确认即可发送的最大字节数)" +msgstr "发送窗口(无需确认即可发送的最大字节数:默认8Mb*2)" msgid "TUIC receive window" -msgstr "接收窗口(无需确认即可接收的最大字节数)" +msgstr "接收窗口(无需确认即可接收的最大字节数:默认8Mb)" + +msgid "Set if the listening socket should be dual-stack" +msgstr "设置监听套接字为双栈" +msgid "Maximum packet size the socks5 server can receive from external" +msgstr "socks5服务器可以从外部接收的最大数据包大小(单位:字节)" diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 8b48a1f51a2..70c0b97ba11 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -308,8 +308,9 @@ local hysteria = { local tuic = { relay = { server = server.server .. ":" .. server.server_port, - uuid = server.tuic_uuid, - password = server.tuic_passwd, + server_ip = server.tuic_ip, + uuid = server.tuic_uuid, + password = server.tuic_passwd, certificates = server.certificate and { server.certpath } or nil, udp_relay_mode = server.udp_relay_mode, congestion_control = server.congestion_control, @@ -321,11 +322,12 @@ local tuic = { disable_sni = (server.disable_sni == "1"), zero_rtt_handshake = (server.zero_rtt_handshake == "1"), send_window = tonumber(server.send_window), - receive_window = tonumber(server.receive_window), - max_udp_relay_packet_size = tonumber(server.max_udp_relay_packet_size) + receive_window = tonumber(server.receive_window) }, ["local"] = { - server = "0.0.0.0:" .. tonumber(local_port) + server = "0.0.0.0:" .. tonumber(local_port), + dual_stack = server.tuic_dual_stack, + max_packet_size = server.tuic_max_package_size } } local config = {} diff --git a/tuic-client/Makefile b/tuic-client/Makefile index eeb6dbe834b..ac0fb463bee 100644 --- a/tuic-client/Makefile +++ b/tuic-client/Makefile @@ -20,7 +20,6 @@ ifeq ($(ARCH),aarch64) TUIC_ARCH:=$(TUIC_TYPE)-aarch64-$(TUIC_FOOT) PKG_HASH:=29eaaf3bc05115acc7453ac26bacf9aff65211b1e8ca7f771b818248bec8601 else ifeq ($ARCH),arm) -# Referred to golang/golang-values.mk ARM_CPU_FEATURES:=$(word 2,$(subst +,$(space),$(call qstrip,$(CONFIG_CPU_TYPE)))) ifeq ($(ARM_CPU_FEATURES),) TUIC_ARCH:=$(TUIC_TYPE)-armv7-$(TUIC_FOOT)eabi @@ -54,7 +53,7 @@ define Package/tuic-client TITLE:=Delicately-TUICed 0-RTT proxy protocol URL:=https://github.com/EAimTY/tuic/ DEPENDS:=@USE_MUSL @(aarch64||arm||i686||x86_64) @!(TARGET_x86_geode||TARGET_x86_legacy) - #PKGARCH:=all + #PKGARCH:=all aarch64 arm i686 x86_64 endef define Build/Prepare From 66e70a4975b1db8101811e467bf0e925119974b9 Mon Sep 17 00:00:00 2001 From: TeF Date: Tue, 27 Jun 2023 08:55:13 +0800 Subject: [PATCH 09/18] fix gen_config seprators --- .../usr/share/shadowsocksr/gen_config.lua | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 70c0b97ba11..5d6ed9db068 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -306,29 +306,29 @@ local hysteria = { lazy_start = (server.lazy_start == "1") and true or false } local tuic = { - relay = { - server = server.server .. ":" .. server.server_port, - server_ip = server.tuic_ip, + relay = { + server = server.server .. ":" .. server.server_port, + server_ip = server.tuic_ip, uuid = server.tuic_uuid, password = server.tuic_passwd, - certificates = server.certificate and { server.certpath } or nil, - udp_relay_mode = server.udp_relay_mode, - congestion_control = server.congestion_control, - heartbeat = server.heartbeat .. "s", - timeout = server.timeout .. "s", - gc_interval = server.gc_interval .. "s", - gc_lifetime = server.gc_lifetime .. "s", - alpn = server.tls_alpn, - disable_sni = (server.disable_sni == "1"), - zero_rtt_handshake = (server.zero_rtt_handshake == "1"), - send_window = tonumber(server.send_window), - receive_window = tonumber(server.receive_window) + certificates = server.certificate and { server.certpath } or nil, + udp_relay_mode = server.udp_relay_mode, + congestion_control = server.congestion_control, + heartbeat = server.heartbeat .. "s", + timeout = server.timeout .. "s", + gc_interval = server.gc_interval .. "s", + gc_lifetime = server.gc_lifetime .. "s", + alpn = server.tls_alpn, + disable_sni = (server.disable_sni == "1"), + zero_rtt_handshake = (server.zero_rtt_handshake == "1"), + send_window = tonumber(server.send_window), + receive_window = tonumber(server.receive_window) }, - ["local"] = { - server = "0.0.0.0:" .. tonumber(local_port), + ["local"] = { + server = "0.0.0.0:" .. tonumber(local_port), dual_stack = server.tuic_dual_stack, max_packet_size = server.tuic_max_package_size - } + } } local config = {} function config:new(o) From 49cf6b0c460e5e6075d27e56979e45c4bc19868d Mon Sep 17 00:00:00 2001 From: TeF Date: Tue, 27 Jun 2023 09:19:44 +0800 Subject: [PATCH 10/18] fix gen_cofig content --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 6 +++--- luci-app-ssr-plus/po/zh-cn/ssr-plus.po | 4 ++-- .../root/usr/share/shadowsocksr/gen_config.lua | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 9a2000445cb..06d06ab6edb 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -355,7 +355,7 @@ o.default = uuid o:depends("type", "tuic") --Tuic IP -o = s:option(Value, "tuic_ip", translate("The IP address of the TUIC proxy server, for overriding DNS resolving") +o = s:option(Value, "tuic_ip", translate("TUIC Server IP Address")) o.rmempty = true o.datatype = "ip4addr" o.default = "" @@ -430,12 +430,12 @@ o.default = 0 o.rmempty = true --Tuic settings for the local inbound socks5 server -o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack") +o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack")) o:depends("type", "tuic") o.default = 0 o.rmempty = true -o = s:option(Flag, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external") +o = s:option(Value, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external")) o:depends("type", "tuic") o.datatype = "uinteger" o.default = 1500 diff --git a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po index 7a6f0f61964..a2917b29a3a 100644 --- a/luci-app-ssr-plus/po/zh-cn/ssr-plus.po +++ b/luci-app-ssr-plus/po/zh-cn/ssr-plus.po @@ -856,8 +856,8 @@ msgstr "启用 Netflix 分流模式" msgid "TUIC User UUID" msgstr "TUIC用户uuid" -msgid "The IP address of the TUIC proxy server, for overriding DNS resolving" -msgstr "TUIC 服务器IP地址,用于覆盖DNS解析结果" +msgid "TUIC Server IP Address" +msgstr "TUIC 服务器IP地址" msgid "TUIC User Password" msgstr "TUIC用户密钥" diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 5d6ed9db068..bfdfd4b155f 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -308,7 +308,7 @@ local hysteria = { local tuic = { relay = { server = server.server .. ":" .. server.server_port, - server_ip = server.tuic_ip, + ip = server.tuic_ip, uuid = server.tuic_uuid, password = server.tuic_passwd, certificates = server.certificate and { server.certpath } or nil, @@ -325,8 +325,8 @@ local tuic = { receive_window = tonumber(server.receive_window) }, ["local"] = { - server = "0.0.0.0:" .. tonumber(local_port), - dual_stack = server.tuic_dual_stack, + server = "[::]:" .. tonumber(local_port), + dual_stack = dual_stack = (server.tuic_dual_stack == "1") and true or false, max_packet_size = server.tuic_max_package_size } } From ff73b0a377fc0c8bcfdfe294a399da2e26ceb892 Mon Sep 17 00:00:00 2001 From: TeF Date: Tue, 27 Jun 2023 09:54:43 +0800 Subject: [PATCH 11/18] turn off options:dual_stack for listen socket --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 06d06ab6edb..61850afbc77 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -430,10 +430,10 @@ o.default = 0 o.rmempty = true --Tuic settings for the local inbound socks5 server -o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack")) -o:depends("type", "tuic") -o.default = 0 -o.rmempty = true +--o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack")) +--o:depends("type", "tuic") +--o.default = 0 +--o.rmempty = true o = s:option(Value, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external")) o:depends("type", "tuic") From 6e2b87500ecce29ebbd3be1b8768c5acf18fc605 Mon Sep 17 00:00:00 2001 From: TeF Date: Wed, 28 Jun 2023 09:17:15 +0800 Subject: [PATCH 12/18] confirm options of "dual_stack to reserve --- .../luasrc/model/cbi/shadowsocksr/client-config.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index 61850afbc77..06d06ab6edb 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -430,10 +430,10 @@ o.default = 0 o.rmempty = true --Tuic settings for the local inbound socks5 server ---o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack")) ---o:depends("type", "tuic") ---o.default = 0 ---o.rmempty = true +o = s:option(Flag, "tuic_dual_stack", translate("Set if the listening socket should be dual-stack")) +o:depends("type", "tuic") +o.default = 0 +o.rmempty = true o = s:option(Value, "tuic_max_package_size", translate("Maximum packet size the socks5 server can receive from external")) o:depends("type", "tuic") From 9cdd4d5fb24fe8e0176b54f6096d70e38606504d Mon Sep 17 00:00:00 2001 From: TeF Date: Wed, 28 Jun 2023 14:30:22 +0800 Subject: [PATCH 13/18] fix minor errors of dependencies in Makefile --- luci-app-ssr-plus/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/luci-app-ssr-plus/Makefile b/luci-app-ssr-plus/Makefile index 020a5de3828..4fcffb89811 100644 --- a/luci-app-ssr-plus/Makefile +++ b/luci-app-ssr-plus/Makefile @@ -116,10 +116,13 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG config PACKAGE_$(PKG_NAME)_INCLUDE_Hysteria bool "Include Hysteria" + select PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG default n config PACKAGE_$(PKG_NAME)_INCLUDE_TUIC-Client bool "Include tuic-client" + select PACKAGE_$(PKG_NAME)_INCLUDE_IPT2Socks + select PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG depends on aarch||arm||i686||x86_64 depends on !(TARGET_x86_geode||TARGET_x86_legacy) default n if i686||x86_64||arm||aarch64 From a50b471c543bc5721c4b5068945acbf2f510012a Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Sun, 16 Jul 2023 21:58:59 +0800 Subject: [PATCH 14/18] fix tuic-client config cause shadowsocksr start issue --- .../root/usr/share/shadowsocksr/gen_config.lua | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 97361d04ab5..b23e5e04b81 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -314,20 +314,19 @@ local tuic = { certificates = server.certificate and { server.certpath } or nil, udp_relay_mode = server.udp_relay_mode, congestion_control = server.congestion_control, - heartbeat = server.heartbeat, + heartbeat = server.heartbeat_interval, timeout = server.timeout, gc_interval = server.gc_interval, gc_lifetime = server.gc_lifetime, alpn = server.tls_alpn, - disable_sni = (server.disable_sni == "1"), - zero_rtt_handshake = (server.zero_rtt_handshake == "1"), + disable_sni = (server.disable_sni == "1") and true or false, + zero_rtt_handshake = (server.zero_rtt_handshake == "1") and true or false, send_window = tonumber(server.send_window), receive_window = tonumber(server.receive_window) }, ["local"] = { - server = "[::]:" .. tonumber(local_port), - dual_stack = (server.tuic_dual_stack == "1") and true or false, - max_packet_size = server.tuic_max_package_size + server = "0.0.0.0:" .. tonumber(local_port), + max_packet_size = tonumber(server.tuic_max_package_size) } } local config = {} From 095017768fc1b06fa45e4c494553b6ce1c780002 Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Sun, 16 Jul 2023 22:01:19 +0800 Subject: [PATCH 15/18] fix datatype errors of tuic value settings --- .../model/cbi/shadowsocksr/client-config.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua index e39088b120f..b07e50bcdb9 100644 --- a/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua @@ -383,28 +383,24 @@ o:value("new_reno", translate("New Reno")) o.default = "cubic" o.rmempty = true -o = s:option(Value, "heartbeat", translate("Heartbeat interval(second)")) +o = s:option(Value, "heartbeat_interval", translate("Heartbeat interval(second)")) o:depends("type", "tuic") -o.datatype = "uinteger" -o.default = "3" +o.default = "3s" o.rmempty = true o = s:option(Value, "timeout", translate("Timeout for establishing a connection to server(second)")) o:depends("type", "tuic") -o.datatype = "uinteger" -o.default = "8" +o.default = "8s" o.rmempty = true o = s:option(Value, "gc_interval", translate("Garbage collection interval(second)")) o:depends("type", "tuic") -o.datatype = "uinteger" -o.default = "3" +o.default = "3s" o.rmempty = true o = s:option(Value, "gc_lifetime", translate("Garbage collection lifetime(second)")) o:depends("type", "tuic") -o.datatype = "uinteger" -o.default = "15" +o.default = "15s" o.rmempty = true o = s:option(Value, "send_window", translate("TUIC send window")) From 0203413d9854821519d60e8a61ad5806f462d41f Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Thu, 20 Jul 2023 12:07:09 +0800 Subject: [PATCH 16/18] fix can't start other nodes if tuic-node is enabled --- .../root/usr/share/shadowsocksr/gen_config.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 97361d04ab5..9a66b37ef1b 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -314,19 +314,19 @@ local tuic = { certificates = server.certificate and { server.certpath } or nil, udp_relay_mode = server.udp_relay_mode, congestion_control = server.congestion_control, - heartbeat = server.heartbeat, - timeout = server.timeout, - gc_interval = server.gc_interval, - gc_lifetime = server.gc_lifetime, + heartbeat = server.heartbeat and server.heartbeat .. "s" or nil, + timeout = server.timeout and server.timeout .. "s" or nil, + gc_interval = server.gc_interval and server.gc_interval .. "s" or nil, + gc_lifetime = server.gc_lifetime and server.gc_lifetime .. "s" or nil, alpn = server.tls_alpn, - disable_sni = (server.disable_sni == "1"), - zero_rtt_handshake = (server.zero_rtt_handshake == "1"), + disable_sni = (server.disable_sni == "1") and true or false, + zero_rtt_handshake = (server.zero_rtt_handshake == "1") and true or false, send_window = tonumber(server.send_window), receive_window = tonumber(server.receive_window) }, ["local"] = { - server = "[::]:" .. tonumber(local_port), - dual_stack = (server.tuic_dual_stack == "1") and true or false, + server = "[0.0.0.0]:" .. tonumber(local_port), + --dual_stack = (server.tuic_dual_stack == "1") and true or false, max_packet_size = server.tuic_max_package_size } } From 09e267ca7f2c91f7cba36591a15528f532445aba Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Thu, 20 Jul 2023 12:17:23 +0800 Subject: [PATCH 17/18] fix can't start other nodes if tuic enabled --- .../root/usr/share/shadowsocksr/gen_config.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index b23e5e04b81..c459126d2e6 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -314,10 +314,10 @@ local tuic = { certificates = server.certificate and { server.certpath } or nil, udp_relay_mode = server.udp_relay_mode, congestion_control = server.congestion_control, - heartbeat = server.heartbeat_interval, - timeout = server.timeout, - gc_interval = server.gc_interval, - gc_lifetime = server.gc_lifetime, + heartbeat = server.heartbeat and server.heart .. "s" or nil, + timeout = server.timeout and server.timeout .. "s" or nil, + gc_interval = server.gc_interval and server.gc_interval .. "s" or nil, + gc_lifetime = server.gc_lifetime and server.gc_lifetime .. "s" or nil, alpn = server.tls_alpn, disable_sni = (server.disable_sni == "1") and true or false, zero_rtt_handshake = (server.zero_rtt_handshake == "1") and true or false, From c798954efb791cef2b1819ec6f9a42f96aec260f Mon Sep 17 00:00:00 2001 From: FluffyTigerfear Date: Fri, 21 Jul 2023 08:55:32 +0800 Subject: [PATCH 18/18] Update gen_config.lua --- luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua index 9a66b37ef1b..9e6be73f705 100755 --- a/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua @@ -325,7 +325,7 @@ local tuic = { receive_window = tonumber(server.receive_window) }, ["local"] = { - server = "[0.0.0.0]:" .. tonumber(local_port), + server = "0.0.0.0:" .. tonumber(local_port), --dual_stack = (server.tuic_dual_stack == "1") and true or false, max_packet_size = server.tuic_max_package_size }