mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix disable server if only one server
This commit is contained in:
parent
2315b9c17f
commit
69e16dc58e
1 changed files with 2 additions and 2 deletions
|
@ -441,10 +441,10 @@ function wizard_add()
|
||||||
|
|
||||||
-- Get Proxy set by default
|
-- Get Proxy set by default
|
||||||
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks"
|
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks"
|
||||||
if default_proxy == "shadowsocks" and serversnb > 0 then
|
if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then
|
||||||
ucic:set("shadowsocks-libev","sss0","disabled","0")
|
ucic:set("shadowsocks-libev","sss0","disabled","0")
|
||||||
ucic:set("v2ray","main","enabled","0")
|
ucic:set("v2ray","main","enabled","0")
|
||||||
elseif default_proxy == "v2ray" and serversnb > 0 then
|
elseif default_proxy == "v2ray" and serversnb > 0 and serversnb > disablednb then
|
||||||
ucic:set("shadowsocks-libev","sss0","disabled","1")
|
ucic:set("shadowsocks-libev","sss0","disabled","1")
|
||||||
ucic:set("v2ray","main","enabled","1")
|
ucic:set("v2ray","main","enabled","1")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue