From c067de84213c4b25ba3c9b83dcb3ec65c33183fa Mon Sep 17 00:00:00 2001 From: zhiyi Date: Wed, 20 Sep 2023 19:08:44 +0800 Subject: [PATCH] =?UTF-8?q?google=20fonts=20=E6=9C=8D=E5=8A=A1=E5=9B=9E?= =?UTF-8?q?=E5=BD=92=EF=BC=8C=E6=94=BE=E5=85=A5=E7=9B=B4=E6=8E=A5=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E5=9F=9F=E5=90=8D=EF=BC=9B=E8=B0=83=E6=95=B4=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E8=A7=84=E5=88=99=EF=BC=8C=E5=85=88=E5=8C=B9=E9=85=8D?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E5=9F=9F=E5=90=8D=EF=BC=8C=E5=86=8D=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E4=BB=A3=E7=90=86=E5=9F=9F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- direct-domains.txt | 7 ++++++- gfw.pac | 13 +++++++++---- pac-template | 8 ++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/direct-domains.txt b/direct-domains.txt index c94391a..26a89c2 100644 --- a/direct-domains.txt +++ b/direct-domains.txt @@ -62,4 +62,9 @@ amap.com autonavi.com meituan.com meituan.net -dianping.com \ No newline at end of file +dianping.com +adservice.google.com +fonts.googleapis.com +fonts.gstatic.com +www.gstatic.com +ssl.gstatic.com \ No newline at end of file diff --git a/gfw.pac b/gfw.pac index fa63da5..28bdcb4 100644 --- a/gfw.pac +++ b/gfw.pac @@ -11,6 +11,7 @@ var directDomains = { "21cn.com": 1, "360buyimg.com": 1, "71edge.com": 1, + "adservice.google.com": 1, "alibabausercontent.com": 1, "alicdn.com": 1, "alipay.com": 1, @@ -36,6 +37,8 @@ var directDomains = { "dingtalk.com": 1, "douyinpic.com": 1, "ecombdapi.com": 1, + "fonts.googleapis.com": 1, + "fonts.gstatic.com": 1, "gtimg.cn": 1, "gtimg.com": 1, "hdslb.com": 1, @@ -57,6 +60,7 @@ var directDomains = { "sina.cn": 1, "sinaimg.cn": 1, "sinajs.cn": 1, + "ssl.gstatic.com": 1, "taobao.com": 1, "tencent.com": 1, "tmall.com": 1, @@ -64,6 +68,7 @@ var directDomains = { "weibo.cn": 1, "weibo.com": 1, "weibocdn.com": 1, + "www.gstatic.com": 1, "xiaomi.com": 1, "ykimg.com": 1, "youku.com": 1, @@ -10990,14 +10995,14 @@ function FindProxyForURL(url, host) { } if (!ipRegExp.test(host)) { - if (isInProxyDomain(host)) { - alert(`${host} MATCHES PROXY DOMAIN`) - return proxy; - } if (isInDirectDomain(host)) { alert(`${host} MATCHES DIRECT DOMAIN`) return direct } + if (isInProxyDomain(host)) { + alert(`${host} MATCHES PROXY DOMAIN`) + return proxy; + } strIp = dnsResolve(host); } else { strIp = host diff --git a/pac-template b/pac-template index f4d99b2..0bc8393 100644 --- a/pac-template +++ b/pac-template @@ -135,14 +135,14 @@ function FindProxyForURL(url, host) { } if (!ipRegExp.test(host)) { - if (isInProxyDomain(host)) { - alert(`${host} MATCHES PROXY DOMAIN`) - return proxy; - } if (isInDirectDomain(host)) { alert(`${host} MATCHES DIRECT DOMAIN`) return direct } + if (isInProxyDomain(host)) { + alert(`${host} MATCHES PROXY DOMAIN`) + return proxy; + } strIp = dnsResolve(host); } else { strIp = host