Skip to content

Commit

Permalink
从直连域名列表中删除部分域名,防止哪天又解析到墙外;直连域名增加169.254.169.254这个不知道哪个框架一直自动访问的ip;从代理…
Browse files Browse the repository at this point in the history
…域名列表删除google域名,因为有些服务有国内cdn。
  • Loading branch information
zhiyi7 committed Oct 3, 2024
1 parent 48aa309 commit f78408a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 43 deletions.
34 changes: 1 addition & 33 deletions direct-domains.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
gov.cn
169.254.169.254
115.com
123pan.com
123957.com
Expand Down Expand Up @@ -80,68 +81,35 @@ meituan.com
meituan.net
sogou.com
dianping.com
o.pki.goog
www.googletagmanager.com
www.google-analytics.com
pagead2.googlesyndication.com
adservice.google.com
fonts.googleapis.com
safebrowsing.googleapis.com
fonts.gstatic.com
www.gstatic.com
ssl.gstatic.com
quark.cn
push.apple.com
time-ios.apple.com
time.apple.com
time-macos.apple.com
setup.icloud.com
www.apple.com.cn
play.itunes.apple.com
appldnld.apple.com
configuration.apple.com
mesu.apple.com
oscdn.apple.com
osrecovery.apple.com
skl.apple.com
swcdn.apple.com
swdist.apple.com
swdownload.apple.com
swscan.apple.com
updates-http.cdn-apple.com
updates.cdn-apple.com
xp.apple.com
audiocontentdownload.apple.com
devimages-cdn.apple.com
devstreaming-cdn.apple.com
icloud.cdn-apple.com
iosdm-cn.cdn-apple.com
js-cdn.music.apple.com
oscdn.apple.com
speed-test-cnc.cdn-apple.com
download.developer.apple.com
playgrounds-assets-cdn.apple.com
sylvan.apple.com
diagassets.apple.com
doh.dns.apple.com
certs.apple.com
crl.apple.com
ocsp.apple.com
ocsp2.apple.com
valid.apple.com
appleid.cdn-apple.com
apzones.com
icloud.com.cn
guzzoni.apple.com
app-site-association.cdn-apple.com
smp-device-content.apple.com
idv.cdn-apple.com
weatherkit.apple.com
adcdownload.apple.com
alpdownloadit.cdn-apple.com
bricks.cdn-apple.com
pancake.apple.com
storage.live.com
blob.core.windows.net
self.events.data.microsoft.com
mobile.events.data.microsoft.com
Expand Down
4 changes: 1 addition & 3 deletions gfw-pac.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-

import urllib.parse
import json
import urllib.request, urllib.error, urllib.parse
from argparse import ArgumentParser
import ipaddress
import json

def parse_args():
parser = ArgumentParser()
Expand All @@ -22,7 +20,7 @@ def parse_args():
help='直连的域名文件,每行一个')
parser.add_argument('--localtld-domains', dest='localtld_rule',
help='本地 TLD 规则文件, 不走代理, 每行一个,以 . 开头')
parser.add_argument('--ip-file', dest='ip_file',
parser.add_argument('--ip-file', dest='ip_file', required=True,
help='中国IP地址段文件')
return parser.parse_args()

Expand Down
4 changes: 2 additions & 2 deletions gfw.pac
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var proxy = "PROXY 127.0.0.1:3128";

var direct = 'DIRECT';

var directDomains = ["gov.cn","115.com","123pan.com","123957.com","baidu.com","baidupcs.com","baidustatic.com","bdimg.com","bdstatic.com","cdn.bcebos.com","cdnnode.cn","qq.com","weixinbridge.com","gtimg.com","gtimg.cn","qstatic.com","cdn-go.cn","qpic.cn","qlogo.cn","qqmail.com","tencent.com","bilibili.com","hdslb.com","bilivideo.cn","biliapi.net","iqiyi.com","iqiyipic.com","qy.net","71edge.com","youku.com","ykimg.com","tower.im","weibo.com","weibo.cn","weibocdn.com","sinaimg.cn","sinajs.cn","sina.cn","taobao.com","aliyun.com","aliyuncs.com","alicdn.com","alibabausercontent.com","alipay.com","alipayobjects.com","aliyundrive.com","dingtalk.com","mmstat.com","tmall.com","jd.com","360buyimg.com","300hu.com","126.com","163.com","189.cn","21cn.com","139.com","10086.cn","pinduoduo.com","pddpic.com","zijieapi.com","amemv.com","ecombdapi.com","baike.com","byteimg.com","douyin.com","douyinpic.com","douyinstatic.com","douyinvod.com","supercachenode.com","bytedance.com","bytescm.com","bytecdn.cn","cmbchina.com","mi.com","xiaomi.com","amap.com","autonavi.com","meituan.com","meituan.net","sogou.com","dianping.com","o.pki.goog","www.googletagmanager.com","www.google-analytics.com","pagead2.googlesyndication.com","adservice.google.com","fonts.googleapis.com","safebrowsing.googleapis.com","fonts.gstatic.com","www.gstatic.com","ssl.gstatic.com","quark.cn","push.apple.com","time-ios.apple.com","time.apple.com","time-macos.apple.com","setup.icloud.com","www.apple.com.cn","play.itunes.apple.com","appldnld.apple.com","configuration.apple.com","mesu.apple.com","oscdn.apple.com","osrecovery.apple.com","skl.apple.com","swcdn.apple.com","swdist.apple.com","swdownload.apple.com","swscan.apple.com","updates-http.cdn-apple.com","updates.cdn-apple.com","xp.apple.com","audiocontentdownload.apple.com","devimages-cdn.apple.com","devstreaming-cdn.apple.com","icloud.cdn-apple.com","iosdm-cn.cdn-apple.com","js-cdn.music.apple.com","oscdn.apple.com","speed-test-cnc.cdn-apple.com","download.developer.apple.com","playgrounds-assets-cdn.apple.com","sylvan.apple.com","diagassets.apple.com","doh.dns.apple.com","certs.apple.com","crl.apple.com","ocsp.apple.com","ocsp2.apple.com","valid.apple.com","appleid.cdn-apple.com","apzones.com","icloud.com.cn","guzzoni.apple.com","app-site-association.cdn-apple.com","smp-device-content.apple.com","idv.cdn-apple.com","weatherkit.apple.com","adcdownload.apple.com","alpdownloadit.cdn-apple.com","bricks.cdn-apple.com","pancake.apple.com","storage.live.com","blob.core.windows.net","self.events.data.microsoft.com","mobile.events.data.microsoft.com","browser.events.data.microsoft.com","ocsp.globalsign.com","ocsp2.globalsign.com","ocsp.digicert.cn","ocsp.dcocsp.cn"];
var directDomains = ["gov.cn","169.254.169.254","115.com","123pan.com","123957.com","baidu.com","baidupcs.com","baidustatic.com","bdimg.com","bdstatic.com","cdn.bcebos.com","cdnnode.cn","qq.com","weixinbridge.com","gtimg.com","gtimg.cn","qstatic.com","cdn-go.cn","qpic.cn","qlogo.cn","qqmail.com","tencent.com","bilibili.com","hdslb.com","bilivideo.cn","biliapi.net","iqiyi.com","iqiyipic.com","qy.net","71edge.com","youku.com","ykimg.com","tower.im","weibo.com","weibo.cn","weibocdn.com","sinaimg.cn","sinajs.cn","sina.cn","taobao.com","aliyun.com","aliyuncs.com","alicdn.com","alibabausercontent.com","alipay.com","alipayobjects.com","aliyundrive.com","dingtalk.com","mmstat.com","tmall.com","jd.com","360buyimg.com","300hu.com","126.com","163.com","189.cn","21cn.com","139.com","10086.cn","pinduoduo.com","pddpic.com","zijieapi.com","amemv.com","ecombdapi.com","baike.com","byteimg.com","douyin.com","douyinpic.com","douyinstatic.com","douyinvod.com","supercachenode.com","bytedance.com","bytescm.com","bytecdn.cn","cmbchina.com","mi.com","xiaomi.com","amap.com","autonavi.com","meituan.com","meituan.net","sogou.com","dianping.com","quark.cn","push.apple.com","setup.icloud.com","appldnld.apple.com","oscdn.apple.com","osrecovery.apple.com","swcdn.apple.com","swdist.apple.com","swdownload.apple.com","swscan.apple.com","updates-http.cdn-apple.com","updates.cdn-apple.com","audiocontentdownload.apple.com","devimages-cdn.apple.com","devstreaming-cdn.apple.com","oscdn.apple.com","certs.apple.com","ocsp.apple.com","ocsp2.apple.com","valid.apple.com","appleid.cdn-apple.com","icloud.com.cn","guzzoni.apple.com","app-site-association.cdn-apple.com","smp-device-content.apple.com","idv.cdn-apple.com","adcdownload.apple.com","alpdownloadit.cdn-apple.com","bricks.cdn-apple.com","blob.core.windows.net","self.events.data.microsoft.com","mobile.events.data.microsoft.com","browser.events.data.microsoft.com","ocsp.globalsign.com","ocsp2.globalsign.com","ocsp.digicert.cn","ocsp.dcocsp.cn"];

var domainsUsingProxy = ["google.com","google.com.hk","googleapis.com","gstatic.com","ggpht.com","googleusercontent.com","youtube.com","googlevideo.com","ytimg.com","github.com","github.io","githubusercontent.com","githubassets.com","bing.com","bing.cn","bing.net","live.com","stackoverflow.com","wikipedia.org","godaddy.com","cloudflare.com","twitter.com","twimg.com","docker.com","facebook.com","facebook.net","fbcdn.net","segment.io","unpkg.com","jsdelivr.com","tv.apple.com"];
var domainsUsingProxy = ["google.com.hk","ent.com","youtube.com","googlevideo.com","ytimg.com","github.com","github.io","githubusercontent.com","githubassets.com","bing.com","bing.cn","bing.net","live.com","stackoverflow.com","wikipedia.org","godaddy.com","cloudflare.com","twitter.com","twimg.com","docker.com","facebook.com","facebook.net","fbcdn.net","segment.io","unpkg.com","jsdelivr.com","tv.apple.com"];

var localTlds = [".test",".localhost"];

Expand Down
6 changes: 1 addition & 5 deletions proxy-domains.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
google.com
google.com.hk
googleapis.com
gstatic.com
ggpht.com
googleusercontent.com
ent.com
youtube.com
googlevideo.com
ytimg.com
Expand Down

0 comments on commit f78408a

Please sign in to comment.