luci-app-shadowsocks-libev: assume ss-redir has default mode tcp_only

This is in accordance with the current actual implementation of
ss-redir.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
Yousong Zhou 2017-08-13 12:34:46 +08:00
parent be77667225
commit 0a2fa7b16f

View file

@ -22,7 +22,7 @@ end
function values_redir(o, xmode)
o.map.uci.foreach("shadowsocks-libev", "ss_redir", function(sdata)
local sname = sdata[".name"]
local mode = sdata["mode"]
local mode = sdata["mode"] or "tcp_only"
if mode and mode:find(xmode) then
local desc = "%s - %s" % {sname, mode}
o:value(sname, desc)