Skip to content

Commit

Permalink
fix(脚本): 修改xray-core socks5全局、单独分流失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mack-a committed Jan 25, 2024
1 parent 3c3195e commit 0bfea0d
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 "Github:https://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus
Expand Down

0 comments on commit 0bfea0d

Please sign in to comment.