1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Use shadowsocks for UDP when VPN down only when plugin disabled

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-09-07 11:05:18 +02:00
parent d5ce786684
commit eebaee9ead

View file

@ -355,7 +355,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
config_load network
config_foreach set_route interface $OMR_TRACKER_INTERFACE
fi
if [ "$(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" ]; then
if [ "$(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
_log "Tunnel down use ShadowSocks for UDP"
uci -q set shadowsocks-libev.ss_rules.redir_udp='hi2'
if /etc/init.d/shadowsocks-libev rules_exist ; then