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