1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix wizard shadowsocks server enable

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-02-04 11:02:08 +01:00
parent 72f75b823b
commit 78799489c8

View file

@ -477,7 +477,9 @@ function wizard_add()
ucic:set("v2ray","main","enabled","0")
ucic:foreach("shadowsocks-libev", "server", function(s)
local sectionname = s[".name"]
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
if sectionname:match("^sss.*") then
ucic:set("shadowsocks-libev",sectionname,"disabled","0")
end
end)
elseif default_proxy == "v2ray" and serversnb > 0 and serversnb > disablednb then
--ucic:set("shadowsocks-libev","sss0","disabled","1")
@ -543,7 +545,7 @@ function wizard_add()
local nbip = 0
for _, ssip in pairs(server_ips) do
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
if default_proxy == "shadowsocks" then
if default_proxy == "shadowsocks" and serversnb > disablednb then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1
@ -573,7 +575,7 @@ function wizard_add()
local nbip = 0
for _, ssip in pairs(server_ips) do
ucic:set("shadowsocks-libev","sss" .. nbip,"server",ssip)
if default_proxy == "shadowsocks" then
if default_proxy == "shadowsocks" and serversnb > disablednb then
ucic:set("shadowsocks-libev","sss" .. nbip,"disabled","0")
end
nbip = nbip + 1