Skip to content
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

fix: compatible issue when DNS msg not be compressed #646

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

EkkoG
Copy link
Contributor

@EkkoG EkkoG commented Sep 21, 2024

Background

在 PS5 上打开糖豆人会卡在启动界面,一段时间后提示网络异常,抓包显示其一直在尝试发送 api.epicgames.dev 的 DNS 请求,猜测可能是 DNS 方面的问题,对比正常配置时的 DNS 数据包,发现正常配置时,DNS 响应中的域名对应数据都是一个很短的十六进制数字且都以 C0 开头
CleanShot 2024-09-21 at 18 07 57@2x
而异常的时候,域名对应的数据都是一个完整域名的十六进制
CleanShot 2024-09-23 at 10 17 46@2x

查询资料后得知这是 DNS 协议中的压缩选项,定义在 RFC 1035 中 https://datatracker.ietf.org/doc/html/rfc1035#section-4.1.4
所以怀疑是糖豆人客户端不兼容未压缩的 DNS 消息导致的,在修改代码开启压缩后,糖豆人正常启动,如测试结果所示,DNS 消息都正常压缩了

另外查看了国内阿里和腾讯的 DNS 都是默认开启压缩的,也就是业界是推荐默认开启压缩的,所以此改动应该不会造成兼容性问题,RFC 1305 中也提到客户端应该能解析两种格式的消息
阿里的
CleanShot 2024-09-21 at 18 22 00@2x
腾讯的
CleanShot 2024-09-21 at 18 23 57@2x
抓包数据
归档.zip

Checklist

Full Changelogs

  • fix: compatible issue when DNS msg not be compressed

Issue Reference

Closes #338

Test Result

CleanShot 2024-09-21 at 18 20 20@2x

Copy link
Contributor

@mzz2017 mzz2017 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@dae-prow dae-prow bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧪 Since the PR has been fully tested, please consider merging it.

@mzz2017
Copy link
Contributor

mzz2017 commented Sep 24, 2024

感谢你的贡献,我们一起让 dae 变得更好!

@mzz2017 mzz2017 merged commit a767598 into daeuniverse:main Sep 24, 2024
25 checks passed
@dae-prow dae-prow bot mentioned this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] 在开启 dae 的情况下,PS5 上的糖豆人游戏无法登录
2 participants