51 lines
3.4 KiB
Diff
51 lines
3.4 KiB
Diff
|
diff -uprN helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua helloworld1/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua
|
||
|
--- helloworld/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua 2022-01-05 17:40:24.000000000 +0800
|
||
|
+++ helloworld1/luci-app-ssr-plus/luasrc/model/cbi/shadowsocksr/client-config.lua 2022-01-05 17:41:24.000000000 +0800
|
||
|
@@ -302,6 +302,13 @@ o:depends("type", "ssr")
|
||
|
o = s:option(Value, "obfs_param", translate("Obfs param(optional)"))
|
||
|
o:depends("type", "ssr")
|
||
|
|
||
|
+-- AlterId
|
||
|
+o = s:option(Value, "alter_id", translate("AlterId"))
|
||
|
+o.datatype = "port"
|
||
|
+o.default = 16
|
||
|
+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
|
||
|
diff -uprN helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm helloworld1/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm
|
||
|
--- helloworld/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm 2022-01-05 17:40:24.000000000 +0800
|
||
|
+++ helloworld1/luci-app-ssr-plus/luasrc/view/shadowsocksr/ssrurl.htm 2022-01-05 17:41:45.000000000 +0800
|
||
|
@@ -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;
|
||
|
+ 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);
|
||
|
diff -uprN helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua helloworld1/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua
|
||
|
--- helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua 2022-01-05 17:40:24.000000000 +0800
|
||
|
+++ helloworld1/luci-app-ssr-plus/root/usr/share/shadowsocksr/gen_config.lua 2022-01-05 17:42:14.000000000 +0800
|
||
|
@@ -15,6 +15,7 @@ function vmess_vless()
|
||
|
users = {
|
||
|
{
|
||
|
id = server.vmess_id,
|
||
|
+ alterId = (server.v2ray_protocol == "vmess" or not server.v2ray_protocol) and tonumber(server.alter_id) or nil,
|
||
|
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 -uprN helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua helloworld1/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua
|
||
|
--- helloworld/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua 2022-01-05 17:40:24.000000000 +0800
|
||
|
+++ helloworld1/luci-app-ssr-plus/root/usr/share/shadowsocksr/subscribe.lua 2022-01-05 17:42:29.000000000 +0800
|
||
|
@@ -163,6 +163,7 @@ local function processData(szType, conte
|
||
|
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
|