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

Fix check of ShadowSocks rules

This commit is contained in:
Ycarus 2018-10-13 21:40:15 +02:00
parent 7159fde4a9
commit 5e435e3194
3 changed files with 20 additions and 13 deletions

View file

@ -163,7 +163,7 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ]; then
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "" ] && [ "$(uci -q get shadowsocks-libev.hi2.mode)" = "tcp_and_udp" ]; 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_status ; then
if /etc/init.d/shadowsocks-libev rules_exist ; then
/etc/init.d/shadowsocks-libev rules_down
/etc/init.d/shadowsocks-libev rules_up
/etc/init.d/omr-bypass reload >/dev/null 2>&1
@ -181,7 +181,7 @@ if [ "$OMR_TRACKER_INTERFACE" = "glorytun" ] || [ "$OMR_TRACKER_INTERFACE" = "om
if [ "$(uci -q get shadowsocks-libev.sss0.disabled)" != "1" ] && [ "$(uci -q get shadowsocks-libev.ss_rules.redir_udp)" = "hi2" ]; 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_status ; then
if /etc/init.d/shadowsocks-libev rules_exist ; then
/etc/init.d/shadowsocks-libev rules_down
/etc/init.d/shadowsocks-libev rules_up
/etc/init.d/omr-bypass reload >/dev/null 2>&1