From 7d1037b9c0db747221b9e751ee65e5646d720e10 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Sat, 6 May 2023 17:46:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=9A=E6=9C=AC):=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=B1=8F=E8=94=BDCN=E6=97=B6=E5=BF=BD=E7=95=A5gstatic.com?= =?UTF-8?q?=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 54ec23b..33751f7 100644 --- a/install.sh +++ b/install.sh @@ -5015,10 +5015,6 @@ blacklist() { } # 添加routing配置 addInstallRouting() { - # 如果文件存在 则读取后添加,如果重复则不添加 - # 如果不存在则创建文件然后添加内容 - # 默认使用geosite 如果没有默认域名则默认使用域名 - # https://github.com/v2fly/domain-list-community 校验 local tag=$1 # warp-socks local type=$2 # outboundTag/inboundTag @@ -5069,6 +5065,12 @@ EOF done < <(echo "${domain}" | tr ',' '\n') unInstallRouting "${tag}" "${type}" + if ! grep -q "gstatic.com" ${configPath}09_routing.json && [[ "${tag}" == "blackhole-out" ]]; then + local routing= + routing=$(jq -r ".routing.rules += [{\"type\": \"field\",\"domain\": [\"gstatic.com\"],\"outboundTag\": \"direct\"}]" ${configPath}09_routing.json) + echo "${routing}" | jq . >${configPath}09_routing.json + fi + routing=$(jq -r ".routing.rules += [${routingRule}]" ${configPath}09_routing.json) echo "${routing}" | jq . >${configPath}09_routing.json } @@ -6894,7 +6896,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.8.14" + echoContent green "当前版本:v2.8.15" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus