1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Better iptables rules for omr-bypass

This commit is contained in:
Ycarus 2018-10-22 15:44:36 +02:00
parent 469830a076
commit 06a28d4227
7 changed files with 50 additions and 59 deletions

View file

@ -308,20 +308,12 @@ start_service() {
config_foreach ss_xxx "$cfgtype" "$cfgtype"
done
rules_up
#ss_rules
#ss_rules6
[ -f /etc/init.d/omr-bypass ] && /etc/init.d/omr-bypass restart
# Add rule to match traffic marked by firewall for bypass
ip rule add prio 1 fwmark 0x539 lookup 991337 > /dev/null 2>&1
}
stop_service() {
#local bin="$ss_bindir/ss-rules"
#[ -x "$bin" ] && "$bin" -f
#local bin6="$ss_bindir/ss-rules6"
#[ -x "$bin6" ] && "$bin6" -f
rules_down
[ -f /etc/init.d/omr-bypass ] && /etc/init.d/omr-bypass restart
rm -rf "$ss_confdir"
}
@ -344,6 +336,7 @@ rules_up() {
done
ss_rules
ss_rules6
[ -f /etc/init.d/omr-bypass ] && /etc/init.d/omr-bypass restart
}
rules_down() {