X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-shadowsocks-libev%2Fluasrc%2Fmodel%2Fcbi%2Fshadowsocks-libev%2Frules.lua;h=1a3dcb88381c45546414a9e9e98319980f084f17;hb=e47366a8a13e2a89d950a2ae2dea144d7931f3b7;hp=fe5f9c31b8e150b602570051fb533d5c8b13ac83;hpb=6c8a9f104ce849534069fe6e0d23d8cbadddd30d;p=project%2Fluci.git 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..1a3dcb883 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', '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"))