Comments (12)
日志呢?
from chinadns-ng.
油管肯定走了trust上游(tag:gfw),看log,解析花了多长时间,我看你trust上游是这个127.0.0.1#11051
另外,dig自己测下 youtube.com 相关域名解析时间。
我没遇到这个问题。
先从dns解析日志入手,先测试chinadns-ng的解析结果以及时长,然后是127.0.0.1#11051的解析结果以及时长
先确定是不是dns问题,因为油管会走quic的,要排除是不是quic问题。
from chinadns-ng.
2024-04-18 08:58:16 E [Upstream.zig:191 do_send_tcp] connect(12, 'tcpi://127.0.0.1#11051') failed: (111) Connection refused
是我的上游只有udp协议,配置不加 udp:// 会导致时间很长,加了就没问题。
因为不支持tcp,配置又没有明确指定只走udp,tcp影响到了udp,感觉还有优化的空间。
看日志是先尝试tcp,不成功再走udp,所以时间很久。
from chinadns-ng.
因为客户端与chinadns-ng是tcp通信(可以从log观察到这一点),所以chinadns-ng与上游的查询协议也是tcp。
默认的无协议限定的上游 就是这个设定的,文档有说明。
如果上游明确不支持 tcp,那就加上 udp://
2024.03.07 版本起,支持 UDP + TCP 上游(根据查询方的传入协议决定)。
2024.03.07 版本起,可在上游地址前加上 tcp:// 来强制使用 TCP DNS。
2024.04.13 版本起,可在上游地址前加上 udp:// 来强制使用 UDP DNS。
from chinadns-ng.
感觉客户端不是用tcp通信的,我手机上用cnbeta客户端打开cnbeta也是一样的问题,第一次内容加载不出来,关掉APP再打开才行
2024-04-18 08:58:08 I [server.zig:305 QueryLog.query] query(id:49435, tag:gfw, qtype:28, 'github.com') from 192.168.222.200#51834
2024-04-18 08:58:08 I [server.zig:313 QueryLog.noaaaa] query(id:49435, tag:gfw, qtype:AAAA, 'github.com') filtered by rule: tag:gfw
2024-04-18 08:58:08 I [server.zig:305 QueryLog.query] query(id:23088, tag:gfw, qtype:1, 'github.com') from 192.168.222.200#50379
2024-04-18 08:58:08 I [server.zig:366 QueryLog.forward] forward query(qid:7, from:udp, 'github.com') to trust group
2024-04-18 08:58:08 I [Upstream.zig:511 Group.send] forward query(qid:7, from:udp) to upstream udpi://127.0.0.1#11051
2024-04-18 08:58:08 I [server.zig:561 ReplyLog.reply] reply(qid:7, tag:gfw, qtype:1, 'github.com') from udpi://127.0.0.1#11051 [accept]
2024-04-18 08:58:08 I [server.zig:561 ReplyLog.reply] reply(qid:7, tag:null, qtype:1, 'github.com') from udpi://127.0.0.1#11051 [ignore]
2024-04-18 08:58:08 I [server.zig:561 ReplyLog.reply] reply(qid:7, tag:null, qtype:1, 'github.com') from udpi://127.0.0.1#11051 [ignore]
2024-04-18 08:58:08 I [server.zig:206 service_tcp] new connection:9 from 192.168.222.200#50324
2024-04-18 08:58:08 I [server.zig:305 QueryLog.query] query(id:23088, tag:gfw, qtype:1, 'github.com') from 192.168.222.200#50324
2024-04-18 08:58:08 I [server.zig:366 QueryLog.forward] forward query(qid:8, from:tcp, 'github.com') to trust group
2024-04-18 08:58:08 I [Upstream.zig:511 Group.send] forward query(qid:8, from:tcp) to upstream tcpi://127.0.0.1#11051
2024-04-18 08:58:08 E [Upstream.zig:191 do_send_tcp] connect(10, 'tcpi://127.0.0.1#11051') failed: (111) Connection refused
2024-04-18 08:58:11 I [server.zig:206 service_tcp] close connection:8 from 192.168.222.200#50314
2024-04-18 08:58:11 W [server.zig:824 on_timeout] query(qid:5, id:13964, tag:gfw) from tcp://192.168.222.200#50314 [timeout]
from chinadns-ng.
forward query(qid:8, from:tcp, 'github.com')****
from chinadns-ng.
看到这个 from:tcp 没?
看到 [service_tcp] new connection:9 from 192.168.222.200#50324 没?
from chinadns-ng.
chrome浏览器用代理扩展和 手机APP,是否会产生tcp 的 dns请求不清楚
总之就是上游协议一定一定要配置正确,否则就会出现这种问题。
这个最好在readme里提醒下
from chinadns-ng.
嗯,在上游配置那里,强调下这个问题。
from chinadns-ng.
非trust上游运营商的DNS也要指定udp://。。。。。
如果chinadns-ng不监听tcp可能就没问题,问题是默认监听了tcp
from chinadns-ng.
你可以使用 bind-port 53@udp 仅监听udp
from chinadns-ng.
已更新 readme。
from chinadns-ng.
Related Issues (20)
- oops, it's gone~ HOT 3
- trust-dns DoT Error:[Upstream.zig:822 Group.parse_failed] invalid proto: 'tls://' HOT 2
- 能同时监听多个端口吗? HOT 6
- 支持bridge协议添加到set HOT 3
- TODO HOT 5
- 能否优化下dns查询的分组机制,防止ddos。 HOT 5
- 【兼容性】对于收到的每个 query msg,都尽量进行”回复“,即使是 bad msg HOT 27
- 是否有办法对特定的局域网内某IP返回过滤掉AAAA HOT 3
- 能否增加域名列表reload的功能? HOT 7
- verdict缓存、dns缓存 持久化 HOT 18
- 服务参数改成配置文件时遇到的一些No such file or directory错误 HOT 3
- 请教:是否支持单纯的dns转发 HOT 10
- 米家智能非标准域名mijia cloud解析问题
- 请教:上游DNS是否支持IPV6地址? HOT 5
- release中没有mips64架构的版本 HOT 11
- 上游 TCP/DoT 服务器的 限流/限速 问题 HOT 7
- 可以增加一个测速优选功能吗? HOT 4
- failed to build on arm64 device panther-x2 HOT 2
- ipv6 dns的支持格式 HOT 1
- 多个上游dns是什么工作模式 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chinadns-ng.