在mac机器上。先安装go环境。
git clone https://github.com/guonaihong/ChinaDNSGo
cd ChinaDNSGo
git clone https://github.com/guonaihong/ChinaDNSGo
cd ChinaDNSGo
env GOPATH=`pwd` go get -u -v github.com/miekg/dns env GOPATH=`pwd` go build src/chinadns.go
(在当前目录下,会生成可执行文件chinadns)
sudo ./chinadns -fn chnroute.txt
项目地址:https://github.com/guonaihong/ChinaDNSGo
实际使用例子: sudo wg-quick up wg0 sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/ChinaDNSGo && sudo ./chinadns -fn chnroute.txt
No comments:
Post a Comment