luci-app-ssr-plus: correct protocol place for ss

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-05-03 03:26:24 +08:00
parent 1e1e202b3b
commit 83d1f37927
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -224,7 +224,6 @@ local ss = {
local_address = "0.0.0.0",
local_port = tonumber(local_port),
mode = (proto == "tcp,udp") and "tcp_and_udp" or proto .. "_only",
protocol = socks_port,
password = server.password,
method = server.encrypt_method_ss,
timeout = tonumber(server.timeout),
@ -241,6 +240,7 @@ end
function config:handleIndex(index)
local switch = {
ss = function()
ss.protocol = socks_port
if server.plugin and server.plugin ~= "none" then
ss.plugin = server.plugin
ss.plugin_opts = server.plugin_opts or nil