From af082db77e6cbee805a95eaf66d667f3df5859fa Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 1 Dec 2023 10:01:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE=E5=A4=8Dsi?= =?UTF-8?q?ng-box=20warp=E5=88=86=E6=B5=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 62f496d..36d894b 100644 --- a/install.sh +++ b/install.sh @@ -3217,6 +3217,18 @@ addSingBoxOutbound() { } ] } +EOF + elif echo "${tag}" | grep -q "direct"; then + + cat <"${singBoxConfigPath}config/${tag}.json" +{ + "outbounds": [ + { + "type": "direct", + "tag": "${tag}" + } + ] +} EOF else cat <"${singBoxConfigPath}config/${tag}.json" @@ -6254,6 +6266,7 @@ addWireGuardRoute() { # rule addSingBoxRouteRule "wireguard_out_${type}" "${domainList}" addSingBoxOutbound "wireguard_out_${type}" "wireguard_out" + addSingBoxOutbound direct # outbound addSingBoxWireGuardOut fi @@ -6409,14 +6422,18 @@ EOF configurationSingBoxRoute delete IPv4 configurationSingBoxRoute delete IPv6 + + removeSingBoxOutbound direct + removeSingBoxOutbound IPv4_out removeSingBoxOutbound IPv6_out + configurationSingBoxRoute delete wireguard_out_IPv4 + configurationSingBoxRoute delete wireguard_out_IPv6 + if [[ "${type}" == "IPv4" ]]; then - configurationSingBoxRoute delete wireguard_out_IPv6 removeSingBoxOutbound wireguard_out_IPv6 else - configurationSingBoxRoute delete wireguard_out_IPv4 removeSingBoxOutbound wireguard_out_IPv4 fi @@ -8453,7 +8470,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.11.21" + echoContent green "当前版本:v2.11.22" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus