plugin/forward: bound DoT connection setup for retries (#8543)

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
houyuwushang
2026-09-19 07:56:31 +08:00
committed by GitHub
parent 8f2d1cb7f4
commit ce5ee05bee
6 changed files with 401 additions and 3 deletions

View File

@@ -144,6 +144,12 @@ On each endpoint, the timeouts for communication are set as follows:
* The DNS and DoT dial timeout defaults to 30s and can decrease automatically down to 1s based on early results.
The DoQ handshake timeout is 5s.
* DoT connection setup (TCP dial plus TLS handshake) is additionally bounded by the remaining
5s forwarding retry window, or an earlier request deadline. When retries are enabled, each
setup attempt is limited to half of the window available at the start of forwarding (at most
2.5s), so a stalled handshake leaves time to try a fresh connection. With `max_connect_attempts 1`,
setup may use the full remaining window. Failed handshakes close the connection; successful
connections remain reusable. These setup limits do not change the DNS exchange read timeout.
* The read timeout is static at 2s.
## Metadata