google fonts 服务回归,放入直接访问域名;调整匹配规则,先匹配直接域名,再匹配代理域名

This commit is contained in:
zhiyi
2023-09-20 19:08:44 +08:00
parent 6b8f248140
commit c067de8421
3 changed files with 19 additions and 9 deletions

View File

@@ -62,4 +62,9 @@ amap.com
autonavi.com
meituan.com
meituan.net
dianping.com
dianping.com
adservice.google.com
fonts.googleapis.com
fonts.gstatic.com
www.gstatic.com
ssl.gstatic.com

13
gfw.pac
View File

@@ -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

View File

@@ -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