From 51fa1afea3acee50b1c33d23483920333d88a975 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Sun, 21 Aug 2022 22:57:58 +0800 Subject: [PATCH] refresh fix_shadowsocksr_alterId.patch --- .../Patches/fix_shadowsocksr_alterId.patch | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/CustomFiles/Patches/fix_shadowsocksr_alterId.patch b/CustomFiles/Patches/fix_shadowsocksr_alterId.patch index c10778a..4f502e6 100644 --- a/CustomFiles/Patches/fix_shadowsocksr_alterId.patch +++ b/CustomFiles/Patches/fix_shadowsocksr_alterId.patch @@ -1,8 +1,10 @@ +diff --git a/package/other/helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua b/package/other/helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +index 50ee568..6d44871 100644 --- a/package/other/helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua +++ b/package/other/helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua -@@ -302,6 +302,13 @@ o:depends("type", "ssr") - o = s:option(Value, "obfs_param", translate("Obfs param(optional)")) +@@ -319,6 +319,13 @@ o = s:option(Value, "obfs_param", translate("Obfs param (optional)")) o:depends("type", "ssr") + o:depends({type = "v2ray", v2ray_protocol = "shadowsocksr"}) +-- AlterId +o = s:option(Value, "alter_id", translate("AlterId")) @@ -11,24 +13,26 @@ +o.rmempty = true +o:depends({type = "v2ray", v2ray_protocol = "vmess"}) + - -- VmessId - o = s:option(Value, "vmess_id", translate("Vmess/VLESS ID (UUID)")) - o.rmempty = true - + -- [[ Hysteria ]]-- + o = s:option(ListValue, "hysteria_protocol", translate("Protocol")) + o:depends("type", "hysteria") +diff --git a/package/other/helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm b/package/other/helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +index cab2690..95d2ff1 100644 --- a/package/other/helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm +++ b/package/other/helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm -@@ -242,6 +242,7 @@ function import_ssr_url(btn, urlname, si - document.getElementsByName('cbid.shadowsocksr.' + sid + '.alias')[0].value = ssm.ps; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = ssm.add; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = ssm.port; +@@ -244,6 +244,7 @@ function import_ssr_url(btn, urlname, sid) { + } + document.getElementsByName('cbid.shadowsocksr.' + sid + '.server')[0].value = serverPart[0]; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.server_port')[0].value = port || '443'; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.alter_id')[0].value = ssm.aid; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.vmess_id')[0].value = ssm.id; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].value = ssm.net; - document.getElementsByName('cbid.shadowsocksr.' + sid + '.transport')[0].dispatchEvent(event); - + document.getElementsByName('cbid.shadowsocksr.' + sid + '.password')[0].value = password; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].checked = true; + document.getElementsByName('cbid.shadowsocksr.' + sid + '.tls')[0].dispatchEvent(event); +diff --git a/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua b/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +index 45f710a..32d3f3f 100755 --- a/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua +++ b/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua -@@ -15,6 +15,7 @@ function vmess_vless() +@@ -20,6 +20,7 @@ function vmess_vless() users = { { id = server.vmess_id, @@ -36,14 +40,15 @@ security = (server.v2ray_protocol == "vmess" or not server.v2ray_protocol) and server.security or nil, encryption = (server.v2ray_protocol == "vless") and server.vless_encryption or nil, flow = (server.xtls == '1') and (server.vless_flow and server.vless_flow or "xtls-rprx-splice") or nil - +diff --git a/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua b/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +index 66219c3..8b62d38 100755 --- a/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua +++ b/package/other/helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua -@@ -163,6 +163,7 @@ local function processData(szType, conte +@@ -176,6 +176,7 @@ local function processData(szType, content) result.server = info.add result.server_port = info.port result.transport = info.net + result.alter_id = info.aid result.vmess_id = info.id result.alias = info.ps - -- result.mux = 1 + result.packet_encoding = packet_encoding