diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index 8c1bf2aeb..592d875ac 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -374,7 +374,7 @@ _bypass_proto() { _intf_rule_ss_rules() { rule_name=$1 [ "$rule_name" = "ss_rules" ] && rule_name="def" - if [ "$(iptables --wait=40 -t nat -L -n | grep ssr_${rule_name}_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep ssr | grep omr_dst_bypass_$intf)" = "" ]; then + if [ "$(iptables --wait=40 -t nat -L -n | grep ssr_${rule_name}_pre_src)" != "" ] && [ "$(iptables-save | grep ssr | grep omr_dst_bypass_$intf)" = "" ]; then iptables-restore -w --wait=60 --noflush <<-EOF *nat -I ssr_${rule_name}_dst 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count @@ -394,7 +394,7 @@ _intf_rule_ss_rules() { COMMIT EOF fi - if [ "$(ip6tables --wait=40 -t nat -L -n | grep ssr6_${rule_name}_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L -n | grep ssr6 | grep omr6_dst_bypass_$intf)" = "" ]; then + if [ "$(ip6tables --wait=40 -t nat -L -n | grep ssr6_${rule_name}_pre_src)" != "" ] && [ "$(ip6tables-save | grep ssr6 | grep omr6_dst_bypass_$intf)" = "" ]; then ip6tables-restore -w --wait=60 --noflush <<-EOF *nat -I ssr6_${rule_name}_dst 1 -m set --match-set omr6_dst_bypass_$intf dst -j MARK --set-mark 0x6539$count @@ -413,7 +413,7 @@ _intf_rule_v2ray_rules() { #rule_name=$1 #[ "$rule_name" = "ss_rules" ] && rule_name="def" rule_name="def" - if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_pre_src)" != "" ] && [ "$(iptables --wait=40 -t nat -L -n | grep v2r | grep omr_dst_bypass_$intf)" = "" ]; then + if [ "$(iptables --wait=40 -t nat -L -n | grep v2r_${rule_name}_pre_src)" != "" ] && [ "$(iptables-save | grep v2r | grep omr_dst_bypass_$intf)" = "" ]; then iptables-restore -w --wait=60 --noflush <<-EOF *nat -I v2r_${rule_name}_dst 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count @@ -426,14 +426,14 @@ _intf_rule_v2ray_rules() { EOF fi if [ "$disableipv6" = "0" ]; then - if [ "$(ip6tables --wait=40 -t mangle -L -n | grep omr6_dst_bypass_$intf)" = "" ]; then + if [ "$(ip6tables-save | grep omr-bypass6 | grep omr6_dst_bypass_$intf)" = "" ]; then ip6tables-restore -w --wait=60 --noflush <<-EOF *mangle -I omr-bypass6 1 -m set --match-set omr6_dst_bypass_$intf dst -j MARK --set-mark 0x6539$count COMMIT EOF fi - if [ "$(ip6tables --wait=40 -t nat -L -n | grep v2r6_${rule_name}_pre_src)" != "" ] && [ "$(ip6tables --wait=40 -t nat -L -n | grep v2r6 | grep omr6_dst_bypass_$intf)" = "" ]; then + if [ "$(ip6tables --wait=40 -t nat -L -n | grep v2r6_${rule_name}_pre_src)" != "" ] && [ "$(ip6tables-save | grep v2r6 | grep omr6_dst_bypass_$intf)" = "" ]; then ip6tables-restore -w --wait=60 --noflush <<-EOF *nat -I v2r6_${rule_name}_dst 1 -m set --match-set omr6_dst_bypass_$intf dst -j MARK --set-mark 0x6539$count @@ -487,7 +487,7 @@ _intf_rule() { ip -6 rule add prio 1 fwmark 0x6539$count lookup 6$count > /dev/null 2>&1 fi } - if [ "$(iptables --wait=40 -t mangle -L -n | grep omr_dst_bypass_$intf)" = "" ]; then + if [ "$(iptables-save | grep omr-bypass | grep omr_dst_bypass_$intf)" = "" ]; then iptables-restore -w --wait=60 --noflush <<-EOF *mangle -I omr-bypass 1 -m set --match-set omr_dst_bypass_$intf dst -j MARK --set-mark 0x539$count diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 23d5fc5f7..f60c1c82d 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -223,8 +223,10 @@ function wizard_add() local device_qmi = luci.http.formvalue("cbid.network.%s.device.qmi" % intf) or "" local device_modemmanager = luci.http.formvalue("cbid.network.%s.device.modemmanager" % intf) or "" local ipaddr = luci.http.formvalue("cbid.network.%s.ipaddr" % intf) or "" + local ip6addr = luci.http.formvalue("cbid.network.%s.ip6addr" % intf) or "" local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or "" local gateway = luci.http.formvalue("cbid.network.%s.gateway" % intf) or "" + local ip6gw = luci.http.formvalue("cbid.network.%s.ip6gw" % intf) or "" local apn = luci.http.formvalue("cbid.network.%s.apn" % intf) or "" local pincode = luci.http.formvalue("cbid.network.%s.pincode" % intf) or "" local delay = luci.http.formvalue("cbid.network.%s.delay" % intf) or "" @@ -281,6 +283,13 @@ function wizard_add() ucic:set("network",intf,"netmask","") ucic:set("network",intf,"gateway","") end + if ip6addr ~= "" then + ucic:set("network",intf,"ip6addr",ip6addr) + ucic:set("network",intf,"ip6gw",ip6gw) + else + ucic:set("network",intf,"ip6addr","") + ucic:set("network",intf,"ip6gw","") + end ucic:delete("openmptcprouter",intf,"lc") ucic:save("openmptcprouter") diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index e213c660c..f7e5e3c7b 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -147,7 +147,7 @@