mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix omr-bypass
This commit is contained in:
parent
c54350533e
commit
4820cfe7e2
2 changed files with 7 additions and 4 deletions
|
@ -179,23 +179,26 @@ start_service() {
|
|||
COMMIT
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
iptables-save --counters | grep -v omr-bypass-dpi | iptables-restore --counters
|
||||
ip6tables-save --counters | grep -v omr-bypass-dpi | ip6tables-restore --counters
|
||||
iptables-restore --wait=60 --noflush <<-EOF
|
||||
*mangle
|
||||
:omr-bypass-dpi -
|
||||
-A PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
|
||||
-A POSTROUTING -m addrtype --dst-type LOCAL -j omr-bypass-dpi
|
||||
COMMIT
|
||||
EOF
|
||||
ip6tables-save --counters | grep -v omr-bypass-dpi | ip6tables-restore --counters
|
||||
ip6tables-restore --wait=60 --noflush <<-EOF
|
||||
*mangle
|
||||
:omr-bypass-dpi -
|
||||
-A PREROUTING -m addrtype ! --dst-type LOCAL -j omr-bypass-dpi
|
||||
-A POSTROUTING -m addrtype --dst-type LOCAL -j omr-bypass-dpi
|
||||
COMMIT
|
||||
EOF
|
||||
config_load omr-bypass
|
||||
config_foreach _bypass_proto dpis
|
||||
|
||||
logger -t "omr-bypass" "OMR-ByPass is running"
|
||||
}
|
||||
|
||||
|
|
|
@ -49,9 +49,9 @@ if [ -n "$(uci -q get dhcp.dnsmasq[0].ipset)" ]; then
|
|||
}
|
||||
fi
|
||||
|
||||
if [ "$(uci -q get ucitrack.@shadowsocks-libev[-1].affects | grep omr-bypass)" = "" ]; then
|
||||
if [ "$(uci -q get ucitrack.@shadowsocks-libev[-1].affects | grep omr-bypass)" != "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
add_list ucitrack.@shadowsocks-libev[-1].affects=omr-bypass
|
||||
del_list ucitrack.@shadowsocks-libev[-1].affects=omr-bypass
|
||||
EOF
|
||||
fi
|
||||
s=firewall.omr-bypass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue