New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UDP 转发流量场景处理 doq 遇到了奇怪的问题 #935
Labels
bug
Something isn't working
Comments
应该找到原因了 hysteria/core/internal/frag/frag.go Line 44 in bb99579
这里的 Defragger 只有一个, 会要求被分片的包连续到达, 中间穿插了其他 PacketID 的包就会丢掉了 打上合适的日志可以看到
PacketID 48970 8662 58833 这些包应该是被放弃了, 没有走到 修复的话我尝试把放在 map 里面, 日志会如下
DOQ 也就不会出现超时失败和耗时久了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
描述问题
部署 UDP 转发加速 hysteria 的场景, 转发 dns over quic 时会导致 dns 请求失败
如何复现
服务器 T 运行 hysteria 服务端(bbr)
服务器 R 运行 UDP 转发到 T , 测试了 gost 和 socat 没有区别(命令 gost -L=udp://:8080/1.1.1.1:8080)
客户端 C 运行启动 hysteria 客户端和 Surge 增强模式
客户端 C 运行 DNS 查询命令如下(dns 客户端使用 https://github.com/natesales/q)
q @quic://dns.nextdns.io A google.com -S --trace --tls-key-log-file=mitmproxy_sslkeylogfile.txt --pmtud=false
预期: q 正常输出
实际: 随机结果, 大概率 DNS 解析失败, 输出
FATA[0005] opening quic session to dns.nextdns.io:853: timeout: no recent network activity
极小概率成功
另外,使用 DNS UDP 协议总是成功
q @plain://9.9.9.9 A google.com -S
, 一般的 TCP 协议也未见异常客户端抓包对比
UDP 转发的情况1
UDP 转发的情况2
使用 snell 协议的情况(正常,作为参照)
日志
均没有异常日志
设备和操作系统
T,R debian 12
C Mac
额外信息
在两组转发+hysteria服务端进行了测试,均发现该问题
怀疑过是 MTU 或者 fastopen 问题, 切换 disablePathMTUDiscovery fastOpen 开关都没有影响结果
The text was updated successfully, but these errors were encountered: