fix(脚本): 修复sing-box warp分流问题

pull/852/head
mack-a 2023-12-01 10:01:00 +08:00
parent 1e94d39a2b
commit af082db77e
1 changed files with 20 additions and 3 deletions

View File

@ -3217,6 +3217,18 @@ addSingBoxOutbound() {
}
]
}
EOF
elif echo "${tag}" | grep -q "direct"; then
cat <<EOF >"${singBoxConfigPath}config/${tag}.json"
{
"outbounds": [
{
"type": "direct",
"tag": "${tag}"
}
]
}
EOF
else
cat <<EOF >"${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 "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus