diff options
author | Hannu Nyman <hannu.nyman@iki.fi> | 2017-08-13 19:47:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-13 19:47:25 +0300 |
commit | 0ee6b1c8f76fb9b0dd8d82a3e4e3c48e51c21ef7 (patch) | |
tree | 484e8da704d0fc1f5c6ff5ce1e933a5243601759 /applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev | |
parent | 5b8a7652af6877e668badd976f84d030832f1b88 (diff) | |
parent | 0a2fa7b16f61f74cd6a9c3814e49ab237854765e (diff) |
Merge pull request #1301 from yousong/shadowsocks-libev
luci-app-shadowsocks-libev: minor adaption for ease of use
Diffstat (limited to 'applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev')
-rw-r--r-- | applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua index fe5f9c31b8..5df59cb0ad 100644 --- a/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua +++ b/applications/luci-app-shadowsocks-libev/luasrc/model/cbi/shadowsocks-libev/rules.lua @@ -16,8 +16,13 @@ m = Map("shadowsocks-libev", If the prior check results in action <em>checkdst</em>, packets will continue \ to have their destination addresses checked.")) +local sdata = m:get('ss_rules') +if not sdata then + m:set('ss_rules', nil, 'ss_rules') + m:set('ss_rules', 'ss_rules', 'disabled', true) +end -s = m:section(NamedSection, "ss_rules", "ss-rules") +s = m:section(NamedSection, "ss_rules", "ss_rules") s:tab("general", translate("General Settings")) s:tab("srcip", translate("Source Settings")) s:tab("dstip", translate("Destination Settings")) |