mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix use shadowsocks UDP when VPN down
This commit is contained in:
parent
94a14ed67e
commit
8db989a903
1 changed files with 3 additions and 3 deletions
|
@ -646,9 +646,9 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
|
|||
config_foreach set_route interface $OMR_TRACKER_INTERFACE
|
||||
config_foreach set_route6 interface $OMR_TRACKER_INTERFACE
|
||||
fi
|
||||
if [ "$(uci -q get openmptcprouter.settings.shadowsocksudp)" = "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get openmptcprouter.omr.shadowsocks)" = "up" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "" ] && [ "$(uci -q get shadowsocks-libev.hi2.mode)" = "tcp_and_udp" ] && [ "$(uci -q get shadowsocks-libev.sss0.obfs)" != "1" ]; then
|
||||
if [ "$(uci -q get openmptcprouter.settings.shadowsocksudp)" = "1" ] && [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get openmptcprouter.omr.shadowsocks)" = "up" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "" ] && [ "$(uci -q get shadowsocks-libev.hi1.mode)" = "tcp_and_udp" ] && [ "$(uci -q get shadowsocks-libev.sss0.obfs)" != "1" ]; then
|
||||
_log "Tunnel down use ShadowSocks for UDP"
|
||||
uci -q set shadowsocks-libev.ss_rules.redir_udp='hi2'
|
||||
uci -q set shadowsocks-libev.ss_rules.redir_udp='hi1'
|
||||
if /etc/init.d/shadowsocks-libev rules_exist ; then
|
||||
/etc/init.d/shadowsocks-libev rules_down
|
||||
/etc/init.d/shadowsocks-libev rules_up
|
||||
|
@ -699,7 +699,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
|
|||
ip route replace default scope global nexthop via $OMR_TRACKER_DEVICE_GATEWAY dev $OMR_TRACKER_DEVICE
|
||||
/etc/init.d/openmptcprouter-vps restart >/dev/null 2>&1
|
||||
fi
|
||||
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi2" ]; then
|
||||
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi1" ]; then
|
||||
_log "Tunnel up disable use of ShadowSocks for UDP"
|
||||
uci -q delete shadowsocks-libev.ss_rules.redir_udp
|
||||
if /etc/init.d/shadowsocks-libev rules_exist ; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue