1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Fix disable server if only one server

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-11-05 10:18:31 +01:00
parent 2315b9c17f
commit 69e16dc58e

View file

@ -441,10 +441,10 @@ function wizard_add()
-- Get Proxy set by default
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("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("v2ray","main","enabled","1")
else