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

Bypass changes

This commit is contained in:
Ycarus 2018-10-20 19:20:51 +02:00
parent 008cdcc468
commit 703e376d60
5 changed files with 62 additions and 40 deletions

View file

@ -307,17 +307,21 @@ start_service() {
for cfgtype in ss_local ss_redir ss_server ss_tunnel; do
config_foreach ss_xxx "$cfgtype" "$cfgtype"
done
ss_rules
ss_rules6
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
#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"
}