mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Only put shadowsocks-libev rules when IPv6 enabled
This commit is contained in:
parent
16811e2e63
commit
485a180286
1 changed files with 3 additions and 3 deletions
|
@ -339,7 +339,7 @@ rules_up() {
|
|||
config_foreach ss_rules_restart "$cfgtype" "$cfgtype"
|
||||
done
|
||||
ss_rules
|
||||
ss_rules6
|
||||
[ "$(sysctl -n net.ipv6.conf.all.disable_ipv6 | tr -d '\n')" = "1" ] || ss_rules6
|
||||
[ -f /etc/init.d/omr-bypass ] && /etc/init.d/omr-bypass reload
|
||||
}
|
||||
|
||||
|
@ -347,9 +347,9 @@ rules_down() {
|
|||
rules_exist || return 0
|
||||
logger -t "Shadowsocks" "Rules DOWN"
|
||||
local bin="$ss_bindir/ss-rules"
|
||||
[ -x "$bin" ] && "$bin" -f
|
||||
[ -x "$bin" ] && "$bin" -f >/dev/null 2>&1
|
||||
local bin6="$ss_bindir/ss-rules6"
|
||||
[ -x "$bin6" ] && "$bin6" -f
|
||||
[ -x "$bin6" ] && "$bin6" -f >/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue