From b891700a377881df2ae68512badbe62e9c904c03 Mon Sep 17 00:00:00 2001 From: StressOzz <131419324+StressOzz@users.noreply.github.com> Date: Wed, 2 Sep 2026 20:34:30 +0500 Subject: [PATCH] Enable hev-socks5-tunnel if disabled Added checks to enable the hev-socks5-tunnel if it is currently disabled. --- files/Mixomo/mixomo_openwrt_install.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/files/Mixomo/mixomo_openwrt_install.sh b/files/Mixomo/mixomo_openwrt_install.sh index 605daf3..7a5335f 100644 --- a/files/Mixomo/mixomo_openwrt_install.sh +++ b/files/Mixomo/mixomo_openwrt_install.sh @@ -1291,6 +1291,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 @@ -1487,6 +1493,15 @@ cp -r /tmp/zashboard/* "$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