在mac机器上。首先安装go环境,然后,
cd $GOPATH
go get -u -v github.com/csg2008/dnsproxy
(可执行文件dnsproxy就会出现在$GOBIN/里面)
wget https://raw.githubusercontent.com/csg2008/dnsproxy/master/conf/proxy.json -O dnsproxy.json
nano dnsproxy.json
(删除如下内容:
"logger": {
"Level":"debug",
"Access":true,
"Runtime":true
}
并把"mapper"段的最后的逗号去除.
删除如下内容:
sudo dnsproxy -c dnsproxy.json"normal":["223.5.5.5:53", "223.6.6.6:53", "119.29.29.29:53", "182.254.116.116:53", "101.226.4.6:53", "114.114.114.114:53", "114.114.115.115:53", "202.67.240.222:53", "203.80.96.10:53", "202.45.84.58:53"],
把default的值改为gfw)
不要关闭此terminal.
实际使用例子:
sudo wg-quick up wg0
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
sudo dnsproxy -c ~/dnsproxy.json
项目地址:github.com/csg2008/dnsproxy
No comments:
Post a Comment