Total Pageviews

Tuesday 24 April 2018

利用simple-dns-by-wynemo解决dns污染问题(不稳定,不建议使用)

a very simple and stupid DNS server to bypass the DNS pollution 破DNS污染.

introduction

a very simple and stupid DNS server to bypass the DNS pollution. DNS proxy server,破DNS污染。

how it works:

your remote server listen on a port other than 53, (as you can see in config.json.remote, it's 60053). 你远程DNS服务器监听的端口不是53。

configuration

change remote_ip in config.json.local to your remote server's ip. 改一下这个字段.

on your remote server ,run:
python dns-client.py config.json.remote
(因为命令:python dns-client.py config.json.remote是运行在前台的,容易退出,
我们可以利用systemd把该命令运行为service:
nano /etc/systemd/system/simple-dns-by-wynemo.service 
其内容为:
[Unit]
After=network.target

[Service]
ExecStart=/usr/bin/python /root/simple-dns-by-wynemo/dns-client.py /root/simple-dns-by-wynemo/config.json.remote
Restart=always

[Install]
WantedBy=multi-user.target
 
然后,运行:
systemctl start simple-dns-by-wynemo
systemctl enable simple-dns-by-wynemo
服务器端搭建完成。)
 
 
on your local machine ,run:
git clone https://github.com/wynemo/simple-dns simple-dns-by-wynemo
cd simple-dns-by-wynemo
sudo python dns-client.py config.json.local
保持此terminal不要关闭。

(使用例子:
sudo wg-quick up wg0 
sudo networksetup -setdnsservers "Wi-Fi" 127.0.0.1
cd ~/simple-dns-by-wynemo && sudo python dns-client.py config.json.local)






win7 set localhost dns

netsh interface ipv4 set dnsservers "Wireless Network Connection" static 127.0.0.1 
 
from https://github.com/wynemo/simple-dns 
-----

这个simple-dns-by-wynemo是通过先连接境外的vps,再通过境外的vps去连接8.8.8.8,这样就保证能连接上8.8.8.8 。并非通过给simple-dns-by-wynemo套一层本地的socks proxy,然后再去连接8.8.8.8