本文纯技术实验帖,不适合小白使用。

配置好v2ray_config_script,配置方法和范例在这里:https://diveng.io/configure-project-v-on-padavan.html

本文的重点来了:


自定义配置文件 “dnsmasq.conf”

#all-servers
dhcp-option=252,”\n”
#no-resolv #AdGuardHome
#dns-forward-max=1000 #AdGuardHome
#server=10.1.1.2#5353 #AdGuardHome

bogus-nxdomain=120.209.138.64
bogus-nxdomain=211.139.136.73
bogus-nxdomain=221.179.46.190
bogus-nxdomain=221.179.46.194
bogus-nxdomain=183.207.232.253
bogus-nxdomain=223.82.248.117
bogus-nxdomain=211.138.74.132
bogus-nxdomain=211.137.130.101
bogus-nxdomain=211.136.113.1
bogus-nxdomain=211.138.102.198
bogus-nxdomain=120.192.83.163
bogus-nxdomain=183.221.242.172
bogus-nxdomain=183.221.250.11
bogus-nxdomain=111.11.208.2
bogus-nxdomain=183.224.40.24

自定义配置文件 “dnsmasq.servers”

server=211.140.188.188
#server=211.138.122.216
#server=211.138.122.217
#server=211.138.122.215
#server=211.138.122.218
server=211.140.13.188
server=223.5.5.5
server=223.6.6.6
#server=119.28.28.28
#server=211.138.180.3
#server=114.114.114.114
#server=119.29.29.29
#server=211.138.180.2
#server=180.76.76.76
server=2409:8028:2000::2222
server=2409:8028:2000::1111
#server=240c::6666
#server=2400:da00::6666
#server=2001:da8::666
#server=2001:da8:8000:1:202:120:2:101
#server=2620:0:ccc::2
server=/a1.mzstatic.com/114.114.114.114
server=/a2.mzstatic.com/114.114.114.114
server=/a3.mzstatic.com/114.114.114.114
server=/a4.mzstatic.com/114.114.114.114
server=/a5.mzstatic.com/114.114.114.114
server=/adcdownload.apple.com/114.114.114.114
server=/appldnld.apple.com/114.114.114.114
server=/appldnld.g.aaplimg.com/114.114.114.114
server=/apps.mzstatic.com/114.114.114.114
server=/cdn-cn1.apple-mapkit.com/114.114.114.114
server=/cdn-cn2.apple-mapkit.com/114.114.114.114
server=/cdn-cn3.apple-mapkit.com/114.114.114.114
server=/cdn-cn4.apple-mapkit.com/114.114.114.114
server=/cdn.apple-mapkit.com/114.114.114.114
server=/cdn1.apple-mapkit.com/114.114.114.114
server=/cdn2.apple-mapkit.com/114.114.114.114
server=/cdn3.apple-mapkit.com/114.114.114.114
server=/cdn4.apple-mapkit.com/114.114.114.114
server=/cds.apple.com/114.114.114.114
server=/cl1.apple.com/114.114.114.114
server=/cl2.apple.com.edgekey.net.globalredir.akadns.net/114.114.114.114
server=/cl2.apple.com/114.114.114.114
server=/cl3.apple.com/114.114.114.114
server=/cl4-cn.apple.com/114.114.114.114
server=/cl4.apple.com/114.114.114.114
server=/cl5.apple.com/114.114.114.114
server=/configuration.apple.com/114.114.114.114
server=/gs-loc.apple.com/114.114.114.114
server=/gsp11-cn.ls.apple.com/114.114.114.114
server=/gsp12-cn.ls.apple.com/114.114.114.114
server=/gsp13-cn.ls.apple.com/114.114.114.114
server=/gsp4-cn.ls.apple.com.edgekey.net.globalredir.akadns.net/114.114.114.114
server=/gsp4-cn.ls.apple.com.edgekey.net/114.114.114.114
server=/gsp4-cn.ls.apple.com/114.114.114.114
server=/gsp5-cn.ls.apple.com/114.114.114.114
server=/gspe19-cn.ls-apple.com.akadns.net/114.114.114.114
server=/gspe19-cn.ls.apple.com/114.114.114.114
server=/gspe21-ssl.ls.apple.com/114.114.114.114
server=/gspe21.ls.apple.com/114.114.114.114
server=/gspe35-ssl.ls.apple.com/114.114.114.114
server=/icloud.cdn-apple.com/114.114.114.114
server=/images.apple.com/114.114.114.114
server=/init-p01md.apple.com/114.114.114.114
server=/init-p01st.push.apple.com/114.114.114.114
server=/init-s01st.push.apple.com/114.114.114.114
server=/iphone-ld.apple.com/114.114.114.114
server=/is1-ssl.mzstatic.com/114.114.114.114
server=/is1.mzstatic.com/114.114.114.114
server=/is2-ssl.mzstatic.com/114.114.114.114
server=/is2.mzstatic.com/114.114.114.114
server=/is3-ssl.mzstatic.com/114.114.114.114
server=/is3.mzstatic.com/114.114.114.114
server=/is4-ssl.mzstatic.com/114.114.114.114
server=/is4.mzstatic.com/114.114.114.114
server=/is5-ssl.mzstatic.com/114.114.114.114
server=/is5.mzstatic.com/114.114.114.114
server=/itunes-apple.com.akadns.net/114.114.114.114
server=/itunes.apple.com/114.114.114.114
server=/itunesconnect.apple.com/114.114.114.114
server=/mesu-cdn.apple.com.akadns.net/114.114.114.114
server=/mesu-china.apple.com.akadns.net/114.114.114.114
server=/mesu.apple.com/114.114.114.114
server=/oscdn.apple.com/114.114.114.114
server=/pancake.apple.com/114.114.114.114
server=/phobos.apple.com/114.114.114.114
server=/s.mzstatic.com/114.114.114.114
server=/s1.mzstatic.com/114.114.114.114
server=/s2.mzstatic.com/114.114.114.114
server=/s3.mzstatic.com/114.114.114.114
server=/s4.mzstatic.com/114.114.114.114
server=/s5.mzstatic.com/114.114.114.114
server=/store.apple.com/114.114.114.114
server=/store.storeimages.cdn-apple.com/114.114.114.114
server=/support.apple.com/114.114.114.114
server=/swcdn.apple.com/114.114.114.114
server=/swcdn.g.aaplimg.com/114.114.114.114
server=/swdist.apple.com/114.114.114.114
server=/swscan.apple.com/114.114.114.114
server=/updates-http.cdn-apple.com.akadns.net/114.114.114.114
server=/updates-http.cdn-apple.com/114.114.114.114
server=/valid.apple.com/114.114.114.114
server=/www.apple.com.edgekey.net/114.114.114.114
server=/www.apple.com/114.114.114.114

server=/.itunes.com/114.114.114.114
server=/.me.com/114.114.114.114
server=/.icloud.com/114.114.114.114
server=/.icloud-content.com/114.114.114.114
server=/.autonavi.com/114.114.114.114
server=/.weather.com/114.114.114.114

server=/.mi.com/223.5.5.5
server=/.mi-img.com/223.5.5.5
server=/.xiaomi.com/223.5.5.5
server=/.xiaomi.net/223.5.5.5
server=/.umeng.com/223.5.5.5
server=/.xiami.net/223.5.5.5
server=/.miwifi.com/223.5.5.5

server=/extshort.weixin.qq.com/114.114.114.114
server=/short.weixin.qq.com/114.114.114.114
server=/minorshort.weixin.qq.com/114.114.114.114
server=/wup.imtt.qq.com/114.114.114.114
server=/mttstr.beacon.qq.com/114.114.114.114
server=/mtteve.beacon.qq.com/114.114.114.114
server=/.qq.com/114.114.114.114
server=/.qqurl.com/114.114.114.114
server=/.qpic.cn/114.114.114.114

server=/.gtimg.cn/211.140.188.188
server=/.sinaimg.cn/211.140.188.188
server=/.weibo.com/211.140.188.188
server=/.weibo.cn/211.140.188.188
server=/.miaopai.com/211.140.188.188
server=/.weico.cc/211.140.188.188

server=/.baidu.com/180.76.76.76
server=/.baidupcs.com/180.76.76.76
server=/.bdimg.com/180.76.76.76

server=/.tb.cn/223.5.5.5
server=/.taobao.com/223.5.5.5
server=/.tmall.com/223.5.5.5
server=/.alibaba.com/223.5.5.5
server=/.alipay.com/223.5.5.5
server=/.alicdn.com/223.5.5.5
server=/.tanx.com/223.5.5.5
server=/.mmstat.com/223.5.5.5
server=/.aliyuncs.com/223.5.5.5
server=/.alipayobjects.com/223.5.5.5
server=/.aliapp.org/223.5.5.5
server=/.ele.me/223.5.5.5
server=/.elemecdn.com/223.5.5.5
server=/.alipay-eco.com/223.5.5.5
server=/.youku.com/223.5.5.5

server=/.soku.com/211.140.188.188
server=/.irs01.com/211.140.188.188
server=/.ykimg.com/211.140.188.188
server=/.sohu.com/211.140.188.188
server=/.sohu.com.cn/211.140.188.188
server=/.itc.cn/211.140.188.188
server=/.sohucs.com/211.140.188.188
server=/.iqiyi.com/211.140.188.188
server=/.qy.net/211.140.188.188
server=/.gitv.tv/211.140.188.188
server=/.71edge.com/211.140.188.188
server=/.iqiyipic.com/211.140.188.188
server=/.cmpassport.com/211.140.188.188
server=/.fengshows.com/211.140.188.188
server=/.ifengimg.com/211.140.188.188
server=/.mob.com/211.140.188.188
server=/.ifeng.com/211.140.188.188
server=/.dcocsp.cn/211.140.188.188
server=/.localnetwork.uop/211.140.188.188
server=/.tuotiao.com/211.140.188.188
server=/.snssdk.com/211.140.188.188
server=/.byteimg.com/211.140.188.188
server=/.amemv.com/211.140.188.188
server=/.crashytics.com/211.140.188.188
server=/.pstatp.com/211.140.188.188
server=/.bytecdn.cn/211.140.188.188
server=/.ixigua.com/211.140.188.188
server=/.netease.com/211.140.188.188
server=/.music.126.net/211.140.188.188
server=/.music.163.com/211.140.188.188
server=/.sinaapp.com/211.140.188.188
server=/.jd.com/211.140.188.188
server=/.cnzz.com/211.140.188.188
server=/.tiktokcdn.com/211.140.188.188
server=/.p16-tiktokcdn-com.akamaized.net/211.140.188.188
server=/.ibytedtos.com/211.140.188.188

server=/.twitter.com/9.9.9.9
server=/.gstatic.com/9.9.9.9
server=/.crashlytics.com/9.9.9.9
server=/.twimg.com/9.9.9.9
server=/.douyin.com/9.9.9.9

自定义配置文件 “hosts”

# Localhost (DO NOT REMOVE) Start
127.0.0.1 localhost
::1 localhost

# Custom user hosts file
# Example:
# 192.168.123.100 Boo

104.160.185.171 opt.cn2qq.com
151.101.76.133 raw.githubusercontent.com
104.20.31.130 static.adguard.com

192.30.255.110 www.github.com
192.30.255.112 github.com
192.30.253.118 gist.github.com

203.107.6.88 ntp4.aliyun.com
203.107.6.88 ntp3.aliyun.com
203.107.6.88 ntp2.aliyun.com
203.107.6.88 ntp1.aliyun.com

127.0.0.1 ts.139site.com
127.0.0.1 rd.139site.com


清空DNS1、2、3的设置和Hosts的设置,这样做是完全仰赖dnsmasq的并发查询,每次DNS查询都会去上面的DNSip地址,自动使用最快且正确的地址,并且做1万条的缓存,下次查询的时候会在路由器端执行,速度非常快。

本地DNS测试可以用DNS benchmark:

https://www.grc.com/dns/benchmark.htm