fix(脚本): 修复sing-box IPv6全局、warp全局导致核心启动失败问题

pull/909/head^2
mack-a 2023-12-24 22:10:07 +08:00
parent 7745311fe8
commit a85f615264
1 changed files with 77 additions and 68 deletions

View File

@ -5537,8 +5537,9 @@ ipv6Routing() {
read -r -p "是否确认设置?[y/n]:" IPv6OutStatus
if [[ "${IPv6OutStatus}" == "y" ]]; then
if [[ "${coreInstallType}" == "1" ]]; then
cat <<EOF >${configPath}10_ipv4_outbounds.json
{
{
"outbounds":[
{
"protocol":"freedom",
@ -5548,11 +5549,11 @@ ipv6Routing() {
"tag":"IPv6_out"
}
]
}
}
EOF
rm ${configPath}09_routing.json >/dev/null 2>&1
echoContent green " ---> IPv6全局出站设置成功"
fi
if [[ "${coreInstallType}" == "2" ]]; then
configurationSingBoxRoute delete wireguard_out_IPv4
configurationSingBoxRoute delete wireguard_out_IPv6
removeSingBoxOutbound IPv4_out
@ -5560,8 +5561,11 @@ EOF
removeSingBoxOutbound wireguard_outbound
addSingBoxOutbound IPv6_out
fi
echoContent green " ---> IPv6全局出站设置成功"
else
echoContent green " ---> 放弃设置"
exit 0
fi
@ -6169,7 +6173,7 @@ warpRoutingReg() {
if [[ "${warpOutStatus}" == "y" ]]; then
readConfigWarpReg
if [[ "${coreInstallType}" == "1" ]]; then
cat <<EOF >${configPath}10_ipv4_outbounds.json
{
"outbounds":[
@ -6200,6 +6204,9 @@ warpRoutingReg() {
EOF
rm ${configPath}09_routing.json >/dev/null 2>&1
fi
if [[ "${coreInstallType}" == "2" ]]; then
configurationSingBoxRoute delete IPv4
configurationSingBoxRoute delete IPv6
@ -6220,6 +6227,8 @@ EOF
# outbound
addSingBoxOutbound "wireguard_out_${type}" "wireguard_out"
addSingBoxWireGuardOut
fi
echoContent green " ---> WARP全局出站设置成功"
else
echoContent green " ---> 放弃设置"
@ -8283,7 +8292,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者mack-a"
echoContent green "当前版本v3.1.14"
echoContent green "当前版本v3.1.15"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus