fix(脚本): 修改xray-core socks5全局、单独分流失败问题

pull/928/head
mack-a 2024-01-25 11:13:12 +08:00
parent 3c3195ec6e
commit 0bfea0d769
1 changed files with 10 additions and 13 deletions

View File

@ -6680,18 +6680,6 @@ setSocks5OutboundRoutingAll() {
if [[ "${socksOutStatus}" == "y" ]]; then
if [[ "${coreInstallType}" == "1" ]]; then
cat <<EOF >${configPath}10_ipv4_outbounds.json
{
"outbounds":[
{
"protocol":"freedom",
"settings":{
},
"tag":"socks5_outbound"
}
]
}
EOF
rm ${configPath}09_routing.json >/dev/null 2>&1
fi
if [[ -n "${singBoxConfigPath}" ]]; then
@ -6975,6 +6963,15 @@ setSocks5OutboundRouting() {
fi
fi
done < <(echo "${socks5RoutingOutboundDomain}" | tr ',' '\n')
if [[ ! -f "${configPath}09_routing.json" ]]; then
cat <<EOF >${configPath}09_routing.json
{
"routing":{
"rules": []
}
}
EOF
fi
routing=$(jq -r ".routing.rules += [{\"type\": \"field\",\"domain\": ${domainRules},\"outboundTag\": \"socks5_outbound\"}]" ${configPath}09_routing.json)
echo "${routing}" | jq . >${configPath}09_routing.json
fi
@ -8927,7 +8924,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者mack-a"
echoContent green "当前版本v3.1.38"
echoContent green "当前版本v3.1.39"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus