luci-app-shadowsocks-libev: assume ss-redir has default mode tcp_only 1301/head
authorYousong Zhou <yszhou4tech@gmail.com>
Sun, 13 Aug 2017 04:34:46 +0000 (12:34 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 13 Aug 2017 04:36:59 +0000 (12:36 +0800)
This is in accordance with the current actual implementation of
ss-redir.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua

index 0a14f33554b8766c2231524c67f4e6f776737278..6608ee8d3538d72d6f96bf050ae9f6fb1d0e5e53 100644 (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)