AdguardTeam / AdguardTeam/dnsproxy

Support for TCP Fast Open (TFO) in DNS over TCP and DNS over TLS

Đang mở
#501 3 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
3.3k
Fork
343
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

内容 / Description
中文版本

您好,

首先感谢您对 dnsproxy 项目的持续维护和出色工作。

我想提出一个关于在 DNS over TCP(DoT)和 DNS over TLS(DoT)中支持 TCP Fast Open(TFO)的改进建议。

需要说明的是,我并不是一名专业的 Go 语言工程师,但我借助 AI 工具完成了一些相关开发工作。目前,我已经在自己的 Fork 版本中初步实现了该功能,并验证其在一定场景下能够改善连接建立性能。

本 Issue 的核心建议如下:

1. 为 DNS over TCP 和 DNS over TLS 启用 TCP Fast Open(TFO)支持
TFO 可以减少 TCP 握手延迟,在高延迟网络环境下具有明显优势,特别适用于 DNS 这类短连接请求场景。
2. 关于 OpenBSD 平台的兼容性问题
据我了解,目前 TFO 相关 socket 选项在 OpenBSD 平台上不可用。因此,可能需要针对 OpenBSD 提供不启用 TFO 的兼容实现,或进行条件编译处理。
3. Multipath TCP(MPTCP)兼容性问题
在我的测试中,启用 TFO 时需要关闭 Multipath TCP,否则可能出现兼容性问题。因此,这两者之间的关系可能需要在实现中加以处理或说明。

如果该方向符合项目设计目标,我也非常愿意整理并提交一个 PR(基于我当前的 Fork 实现)供进一步讨论和改进。

感谢您的时间与付出!

English Version

Hello,

First of all, thank you for your continuous work and maintenance of the dnsproxy project.

I would like to propose an enhancement regarding support for TCP Fast Open (TFO) in both DNS over TCP and DNS over TLS.

Please note that I am not a professional Go developer; however, with the assistance of AI tools, I have implemented a preliminary version of this feature in my own fork and verified that it can improve connection setup performance in certain scenarios.

The main points of this proposal are as follows:

1. Enable TCP Fast Open (TFO) for DNS over TCP and DNS over TLS
TFO can reduce TCP handshake latency, which is particularly beneficial in high-latency environments. This is especially relevant for DNS workloads, where connections are typically short-lived.
2. Compatibility considerations for OpenBSD
As far as I understand, TFO-related socket options are not available on OpenBSD. Therefore, it may be necessary to provide a fallback implementation without TFO or handle this via conditional compilation.
3. Interaction with Multipath TCP (MPTCP)
In my testing, enabling TFO requires disabling Multipath TCP, otherwise compatibility issues may occur. This interaction may need to be handled or documented in the implementation.

If this direction aligns with the project goals, I would be happy to prepare and submit a pull request based on my current fork for further discussion and refinement.

Thank you for your time and consideration.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by reviewing the existing DNS over TCP and DNS over TLS connection setup in the repository. Compare it with the preliminary implementation in the reporter's fork, then investigate platform-specific socket support, especially OpenBSD, and the stated interaction between TFO and MPTCP. Done means TFO works for both transports with an appropriate OpenBSD-compatible fallback and the compatibility behavior is verified.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go
Lĩnh vực
networking
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.