Skip to content

Commit f9daf6f

Browse files
committed
Revert "luci: modify the field name of protocol in ssr"
This reverts commit 146eb66.
1 parent 90243b1 commit f9daf6f

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

luci-app-passwall/luasrc/model/cbi/passwall/client/type/ssr.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ o.password = true
5454
o = s:option(ListValue, _n("method"), translate("Encrypt Method"))
5555
for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end
5656

57-
o = s:option(ListValue, _n("ssr_protocol"), translate("Protocol"))
57+
o = s:option(ListValue, _n("protocol"), translate("Protocol"))
5858
for a, t in ipairs(ssr_protocol_list) do o:value(t) end
5959

6060
o = s:option(Value, _n("protocol_param"), translate("Protocol_param"))

luci-app-passwall/luasrc/model/cbi/passwall/server/type/ssr.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ o = s:option(ListValue, _n("method"), translate("Encrypt Method"))
5151
for a, t in ipairs(ssr_encrypt_method_list) do o:value(t) end
5252
o:depends({ [_n("custom")] = false })
5353

54-
o = s:option(ListValue, _n("ssr_protocol"), translate("Protocol"))
54+
o = s:option(ListValue, _n("protocol"), translate("Protocol"))
5555
for a, t in ipairs(ssr_protocol_list) do o:value(t) end
5656
o:depends({ [_n("custom")] = false })
5757

luci-app-passwall/luasrc/passwall/util_shadowsocks.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function gen_config_server(node)
1919
end
2020

2121
if node.type == "SSR" then
22-
config.protocol = node.ssr_protocol
22+
config.protocol = node.protocol
2323
config.protocol_param = node.protocol_param
2424
config.obfs = node.obfs
2525
config.obfs_param = node.obfs_param
@@ -85,7 +85,7 @@ function gen_config(var)
8585
config.plugin_opts = (plugin_file) and node.plugin_opts or nil
8686
config.mode = mode
8787
elseif node.type == "SSR" then
88-
config.protocol = node.ssr_protocol
88+
config.protocol = node.protocol
8989
config.protocol_param = node.protocol_param
9090
config.obfs = node.obfs
9191
config.obfs_param = node.obfs_param

luci-app-passwall/luasrc/view/passwall/node_config/link_share_man.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
url += params;
359359
} else if (v_type === "SSR") {
360360
var v_port = opt.get(dom_prefix + "port");
361-
var v_protocol = opt.get(dom_prefix + "ssr_protocol");
361+
var v_protocol = opt.get(dom_prefix + "protocol");
362362
var v_method = opt.get(dom_prefix + "method");
363363
var v_obfs = opt.get(dom_prefix + "obfs");
364364
var v_password = opt.get(dom_prefix + "password");
@@ -875,7 +875,7 @@
875875
opt.set('type', "SSR");
876876
opt.set(dom_prefix + 'address', unbracketIP(ssm[1]));
877877
opt.set(dom_prefix + 'port', ssm[2]);
878-
opt.set(dom_prefix + 'ssr_protocol', ssm[3]);
878+
opt.set(dom_prefix + 'protocol', ssm[3]);
879879
opt.set(dom_prefix + 'method', ssm[4]);
880880
opt.set(dom_prefix + 'obfs', ssm[5]);
881881
opt.set(dom_prefix + 'password', b64decsafe(ssm[6]));

luci-app-passwall/root/usr/share/passwall/subscribe.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ local function processData(szType, content, add_mode, group)
490490
result.address = hostInfo[#hostInfo-5]
491491
end
492492
result.port = hostInfo[#hostInfo-4]
493-
result.ssr_protocol = hostInfo[#hostInfo-3]
493+
result.protocol = hostInfo[#hostInfo-3]
494494
result.method = hostInfo[#hostInfo-2]
495495
result.obfs = hostInfo[#hostInfo-1]
496496
result.password = base64Decode(hostInfo[#hostInfo])

0 commit comments

Comments
 (0)