From: Yousong Zhou Date: Sun, 13 Aug 2017 04:34:46 +0000 (+0800) Subject: luci-app-shadowsocks-libev: assume ss-redir has default mode tcp_only X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=refs%2Fpull%2F1301%2Fhead;p=oweals%2Fluci.git 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 --- 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 0a14f3355..6608ee8d3 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/shadowsocks-libev.lua @@ -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)