![]() | 1 gamexg 2013-10-18 16:26:20 +08:00 没见过,楼主可以自己写一个。 http://blog.csdn.net/trbbadboy/article/details/8093256 + dnspython |
2 xierch 2013-10-20 00:27:40 +08:00 逻辑好复杂.. 如果只是常用几个网站想用电信 DNS 解析,用 dnsmasq 手动些规则吧? |
3 b1074549 2013-10-21 06:39:40 +08:00 ip = dnsquery(host, '8.8.8.8') if ip_in_china(ip): ....ip = dnsquery(host, '114.114.114.114') return ip |
4 xierch 2013-10-21 19:57:30 +08:00 https://gist.github.com/scturtle/6472732 也许可以改改这段程序 |
5 puppywang 2013-10-21 23:05:27 +08:00 我之前也想写这么个东西,后来觉得影响速度,而且有些cdn还是全球都有ip,于是简单想了个解决办法: 1. 先用protectdns去除poisoned ip。 2. 修改dnsmasq的配置文件,all-servers=true,dnsmaq的resovler文件同时写入本地dns和远端的dns。 3. 一般而言,本地的dns会优先返回,所以先拿到的地址应该都是离你物理地址最近的。 |
![]() | OP |
![]() | 7 tywtyw2002 OP |
![]() | 8 aveline 2013-11-15 02:33:53 +08:00 @tywtyw2002 智能 DNS 的看看支持 EDNS Subnet 否,支持的可以把 subnet 置成信 IP。 可以用 https://github.com/opendns/dnspython-clientsubnetoption |