Skip to content

Commit

Permalink
fix(脚本): 修复分流查看域名错误判断
Browse files Browse the repository at this point in the history
  • Loading branch information
mack-a committed Mar 20, 2024
1 parent 7383310 commit bcdfb89
Showing 1 changed file with 22 additions and 18 deletions.
40 changes: 22 additions & 18 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5874,15 +5874,16 @@ ipv6Routing() {
fi

fi

if [[ -f "${singBoxConfigPath}IPv6_out_route.json" ]]; then
echoContent yellow "sing-box"
jq -r -c '.route.rules[]|select (.outbound=="IPv6_out")' "${singBoxConfigPath}IPv6_out_route.json" | jq -r
elif [[ ! -f "${singBoxConfigPath}IPv6_out_route.json" && -f "${singBoxConfigPath}IPv6_out.json" ]]; then
echoContent yellow "sing-box"
echoContent green " ---> 已设置IPv6全局分流"
else
echoContent yellow " ---> 未安装IPv6分流"
if [[ -n "${singBoxConfigPath}" ]]; then
if [[ -f "${singBoxConfigPath}IPv6_out_route.json" ]]; then
echoContent yellow "sing-box"
jq -r -c '.route.rules[]|select (.outbound=="IPv6_out")' "${singBoxConfigPath}IPv6_out_route.json" | jq -r
elif [[ ! -f "${singBoxConfigPath}IPv6_out_route.json" && -f "${singBoxConfigPath}IPv6_out.json" ]]; then
echoContent yellow "sing-box"
echoContent green " ---> 已设置IPv6全局分流"
else
echoContent yellow " ---> 未安装IPv6分流"
fi
fi

exit 0
Expand Down Expand Up @@ -6287,15 +6288,18 @@ showWireGuardDomain() {
fi

# sing-box
if [[ -f "${singBoxConfigPath}wireguard_out_${type}_route.json" ]]; then
echoContent yellow "sing-box"
jq -r -c '.route.rules[]' "${singBoxConfigPath}wireguard_out_${type}_route.json" | jq -r
elif [[ ! -f "${singBoxConfigPath}wireguard_out_${type}_route.json" && -f "${singBoxConfigPath}wireguard_out_${type}.json" ]]; then
echoContent yellow "sing-box"
echoContent green " ---> 已设置warp ${type}全局分流"
else
echoContent yellow " ---> 未安装warp ${type}分流"
if [[ -n "${singBoxConfigPath}" ]]; then
if [[ -f "${singBoxConfigPath}wireguard_out_${type}_route.json" ]]; then
echoContent yellow "sing-box"
jq -r -c '.route.rules[]' "${singBoxConfigPath}wireguard_out_${type}_route.json" | jq -r
elif [[ ! -f "${singBoxConfigPath}wireguard_out_${type}_route.json" && -f "${singBoxConfigPath}wireguard_out_${type}.json" ]]; then
echoContent yellow "sing-box"
echoContent green " ---> 已设置warp ${type}全局分流"
else
echoContent yellow " ---> 未安装warp ${type}分流"
fi
fi

}

# 添加WireGuard分流
Expand Down Expand Up @@ -8773,7 +8777,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者:mack-a"
echoContent green "当前版本:v3.2.31"
echoContent green "当前版本:v3.2.32"
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus
Expand Down

0 comments on commit bcdfb89

Please sign in to comment.