From 0a2fa7b16f61f74cd6a9c3814e49ab237854765e Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Sun, 13 Aug 2017 12:34:46 +0800 Subject: [PATCH] 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 --- .../luasrc/model/shadowsocks-libev.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0a14f33554..6608ee8d35 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) -- 2.30.2