X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-shadowsocks-libev%2Fluasrc%2Fmodel%2Fcbi%2Fshadowsocks-libev%2Frules.lua;fp=applications%2Fluci-app-shadowsocks-libev%2Fluasrc%2Fmodel%2Fcbi%2Fshadowsocks-libev%2Frules.lua;h=5df59cb0ad3b46685927aa37d5cd549cb33f14f1;hp=fe5f9c31b8e150b602570051fb533d5c8b13ac83;hb=be77667225991e5965afc549ae94a148ea4246e1;hpb=2697ef81a1b395f3e0d53d8a536fb76205e60b04 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 fe5f9c31b..5df59cb0a 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 checkdst, 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"))