Giter VIP home page Giter VIP logo

freedns-go's People

Contributors

blahgeek avatar kookxiang avatar louchenyao avatar tounan avatar zh99998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freedns-go's Issues

提几个意见

感谢作者开发此工具,代替了停止维护的ChinaDNS,以下提几个意见给作者参考:

  1. 建议不要硬编码ipip数据。支持参数引用ipip文件,用户自己使用脚本定时更新ipip文件。
  2. 可以设置开启缓存功能,因为下级接DNSmasq已经有缓存功能
  3. 国外可信DNS,支持多地址。并发请求使用返回最快的
  4. 可以设置不输出日志
  5. 可以设置超时时间

错误的缓存状态导致 DNS 解析失败

最近我发现有些域名无法解析。检查日志之后发现缓存的问题可能是元凶。
过程如下:
dig command
我向 FreeDNS-Go 询问 login.live.com 的 DNS 解析记录。很明显它选择的是干净的上游,但此时应该是发生了错误而返回了一个空结果,没有 SOA 记录。
log
检查日志之后发现在请求上游时出错,但是之后它使用“缓存”里的内容来应答客户端今后的请求。显然从空缓存中是什么都得不到的。
经过对相同域名的测试,我确定上游都可以正常解析。
这个问题偶尔会发生,目前还无法稳定复现。
系统环境: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

支持指定协议 upstream 和 listen

现在在部分运营商可能会封锁 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.