Pages

Tuesday, 1 March 2022

dns-by-yee2


DNS污染虽然很简单,但是却很管用,国内有很多无污染的DNS服务器,但却应对不了DNS抢答。DNS抢答大都只抢答UDP流量,因此将DNS设置成TCP查询可以缓解DNS抢答,配合国内支持TCP流量的DNS服务器,可以有较好的上网体验。

安装

git clone https://github.com/Yee2/dns
cd dns
make && make install

快速生成China IP列表

curl https://ftp.apnic.net/stats/apnic/delegated-apnic-latest | grep "|CN|ipv4|" | awk -F '|' '{print $4 "/" 32-log($5)/log(2)}' > ip.txt

生成 gfwlist

curl https://git.tuxfamily.org/gfwlist/gfwlist.git/plain/gfwlist.txt | base64 --decode > gfwlist.txt

配置文件

解析记录

[[records]]
name = "example.local"
type = "A"
ttl = 3600
context = "123.2.3.4"
from https://github.com/Yee2/dns

No comments:

Post a Comment