summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua')
-rw-r--r--applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
index 650ff6356..e2a07adae 100644
--- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
+++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua
@@ -23,13 +23,16 @@ end
function values_redir(o, xmode)
o.map.uci.foreach("shadowsocks-libev", "ss_redir", function(sdata)
+ local disabled = ucival_to_bool(sdata["disabled"])
local sname = sdata[".name"]
local mode = sdata["mode"] or "tcp_only"
- if mode and mode:find(xmode) then
+ if not disabled and mode:find(xmode) then
local desc = "%s - %s" % {sname, mode}
o:value(sname, desc)
end
end)
+ o:value("", "<unset>")
+ o.default = ""
end
function values_serverlist(o)