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

Merge branch 'test' into develop

This commit is contained in:
suyuan 2021-02-06 11:49:43 +08:00
commit 89460b0cd8
23 changed files with 473 additions and 276 deletions

View file

@ -308,6 +308,7 @@ start_service() {
# Add rule to match traffic marked by firewall for bypass
ip rule add prio 1 fwmark 0x539 lookup 991337 > /dev/null 2>&1
rules_up
[ -f /etc/firewall.gre-tunnel ] && sh /etc/firewall.gre-tunnel > /dev/null 2>&1
}
stop_service() {
@ -320,7 +321,7 @@ reload_service() {
}
rules_exist() {
[ -n "$(iptables -t nat -L -n | grep ssr)" ] && return 0
[ -n "$(iptables-save | grep 'A ssr')" ] && return 0
return 1
}
@ -347,6 +348,7 @@ rules_up() {
config_foreach ss_rules_restart "$cfgtype" "$cfgtype"
done
config_foreach ss_rules ss_rules
[ -z "$(iptables-save | grep :ssr)" ] && logger -t "Shadowsocks" "Rules not applied"
[ -f /etc/init.d/omr-bypass ] && {
logger -t "Shadowsocks" "Reload omr-bypass rules"
/etc/init.d/omr-bypass reload_rules