diff --git a/files/Mixomo/mixomo_openwrt_install.sh b/files/Mixomo/mixomo_openwrt_install.sh index 55d87ba..1c17412 100644 --- a/files/Mixomo/mixomo_openwrt_install.sh +++ b/files/Mixomo/mixomo_openwrt_install.sh @@ -1280,6 +1280,12 @@ fi uci set hev-socks5-tunnel.@instance[0].enabled='1' uci set hev-socks5-tunnel.@instance[0].conffile='/etc/hev-socks5-tunnel/main.yml' uci commit hev-socks5-tunnel + +if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel +then +sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\1'1'/" /etc/config/hev-socks5-tunnel +fi + /etc/init.d/hev-socks5-tunnel restart sleep 2 @@ -1476,6 +1482,15 @@ cp -r "$TMP2"/* "$DIR1"/ 2>/dev/null || { rm -rf "$TMP1" "$TMP2" +if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel; then + sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\11'/g" /etc/config/hev-socks5-tunnel +fi + +if grep -qE "^[[:space:]]*option[[:space:]]+enabled[[:space:]]+'0'" /etc/config/hev-socks5-tunnel +then +sed -i -E "s/^([[:space:]]*option[[:space:]]+enabled[[:space:]]+)'0'/\1'1'/" /etc/config/hev-socks5-tunnel +fi + /etc/init.d/mihomo restart >/dev/null 2>&1 /etc/init.d/hev-socks5-tunnel restart >/dev/null 2>&1