在mac机器上。首先安装go环境,然后,
git clone https://github.com/wjzhangq/dnsproxy dnsproxy-by-wjzhangq
cd dnsproxy-by-wjzhangq
go build -o dnsproxy dnsproxy.go
(会在当前目录下,生成可执行文件dnsproxy)
sudo ./dnsproxy -dns 8.8.8.8:53:udp,8.8.4.4:53:udp -local :53
不要关闭此terminal.
实际使用例子:
sudo wg-quick up wg0
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/dnsproxy-by-wjzhangq && sudo ./dnsproxy -dns 8.8.8.8:53:udp,8.8.4.4:53:udp -local :53
No comments:
Post a Comment