Repository navigation
Bound blackholed upstream connections with TCP_USER_TIMEOUT - #2
Merged
Merged
Conversation
An upstream that stops acknowledging otherwise holds its CONNECT tunnel for tcp_retries2's ~16 minutes, and clients keep reusing it. Defaults to 30s, overridable with --upstream-tcp-user-timeout. Tested at the 30s default with iptables blackholes over a CONNECT tunnel. An unreachable peer is dropped after ~30s whether data is in flight, the receive window is closed, the SYN goes unanswered, or nothing is in flight at all. A reachable peer acknowledges at the TCP layer well before its application replies, so a response that takes 45s still arrives. A peer whose TCP stack answers while its application is gone stays undetected and needs an app-layer probe, which we're doing with HTTP2 keepalives in the Rust clients.
Coverage Report for CI Build 30508961051Coverage increased (+0.001%) to 54.376%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
gautamg795
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An upstream that stops acknowledging otherwise holds its CONNECT tunnel for tcp_retries2's ~16 minutes, and clients keep reusing it. Defaults to 30s, overridable with --upstream-tcp-user-timeout.
Tested at the 30s default with iptables blackholes over a CONNECT tunnel. An unreachable peer is dropped after ~30s whether data is in flight, the receive window is closed, the SYN goes unanswered, or nothing is in flight at all. A reachable peer acknowledges at the TCP layer well before its application replies, so a response that takes 45s still arrives. A peer whose TCP stack answers while its application is gone stays undetected and needs an app-layer probe, which we're doing with HTTP2 keepalives in the Rust clients.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.