Total Pageviews

Sunday 27 October 2019

利用yadd解决dns污染问题

在本地机器mac上。
首先安装rust环境。然后,
git clone https://github.com/sticnarf/yadd yadd-by-sticnarf
cd yadd-by-sticnarf
cargo build --release
稍等一下,在当前目录下会生成target目录。
cd target/release

wget https://github.com/sticnarf/yadd/raw/master/chnroutes.txt

wget https://github.com/sticnarf/yadd/raw/master/config.toml

nano config.toml
把第4行bind的值改为"127.0.0.1:53" ,
删除第7行至第13行。
./yadd -c config.toml
保持此terminal不要关闭。

使用例子:
sudo wg-quick up wg0
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/yadd-by-sticnarf/target/release && sudo ./yadd -c config.toml

项目地址: https://github.com/sticnarf/yadd