tuna / freedns-go Goto Github PK
View Code? Open in Web Editor NEWOptimized DNS Server for Chinese users.
License: MIT License
Optimized DNS Server for Chinese users.
License: MIT License
感谢作者开发此工具,代替了停止维护的ChinaDNS,以下提几个意见给作者参考:
最近我发现有些域名无法解析。检查日志之后发现缓存的问题可能是元凶。
过程如下:
我向 FreeDNS-Go 询问 login.live.com 的 DNS 解析记录。很明显它选择的是干净的上游,但此时应该是发生了错误而返回了一个空结果,没有 SOA 记录。
检查日志之后发现在请求上游时出错,但是之后它使用“缓存”里的内容来应答客户端今后的请求。显然从空缓存中是什么都得不到的。
经过对相同域名的测试,我确定上游都可以正常解析。
这个问题偶尔会发生,目前还无法稳定复现。
系统环境:Debian 10 Buster,FreeDNS-Go v2020.1.16
Recently I found that some domain names failed to resolve. After checking the log, I assume that an issue about cache status is to blame.
Let's see what happened:
I sent a DNS resolve request of login.live.com to FreeDNS-Go. Apperantly it chose the clean upstream to handle my request. But at that time an error occured and it gave me an empty response, even without an SOA record.
After checking the log, I could figure out that it got an error while asking the clean upstream for the answer. But then it use the "cache" to answer clients' future questions. Of course we got nothing from empty cache.
I can completely be sure that both my upstreams are able to work, for I've tested the same domain with them.
It occurs randomly. So far I can't reproduce it deliberately.
Environment: Debian 10 Buster, FreeDNS-Go v2020.1.16
现在在部分运营商可能会封锁 TCP 53 的 DNS 请求,也有部分 DNS 提供商不支持 TCP Request,比如使用
λ .\freedns-go.exe -f 1.2.4.8:53 -c 127.0.0.1:10053 -l 0.0.0.0:53
λ dig baidu.com @127.0.0.1 +tcp
的时候就会出现 fast dns timeout 的现象,详细 log
time="2020-04-14T18:10:22+08:00" level=info domain=baidu.com. op=update_cache type=A upstream="127.0.0.1:10053"
time="2020-04-14T18:10:22+08:00" level=info domain=baidu.com. op=handle status=NOERROR type=A upstream="127.0.0.1:10053"
time="2020-04-14T18:10:22+08:00" level=error msg="dial tcp 1.2.4.8:53: i/o timeout" domain=baidu.com. op=naive_resolve upstream="1.2.4.8:53"
建议可以指定 upstream 和 listen 的协议类型,譬如指定监听 udp://0.0.0.0:53 ,作为 upstream 的 server 也可以指定譬如 tcp://114.114.114.114:53 和 tcp://8.8.8.8:53
建议调整为
λ .\freedns-go.exe -f udp://1.2.4.8:53 -c tcp://8.8.8.8:53 -l udp://0.0.0.0:53
λ # 监听 udp+tcp
λ .\freedns-go.exe -f udp://1.2.4.8:53 -c tcp://8.8.8.8:53 -l udp+tcp://0.0.0.0:53
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.