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

Abort reverse tunnel connections early if the proxy is already claimed #27683

Merged
merged 5 commits into from Jun 9, 2023

Conversation

espadolini
Copy link
Contributor

We don't need to complete the SSH handshake if we can tell from the principals of the server (that we read in the host key callback) that the proxy is already claimed.

We still only attempt to claim the proxy after the handshake has completed, which can still fail (two connections at the same time onto the same proxy might both pass the early check), but that's fine as this is only an optimization which saves some time and some CPU.

lib/reversetunnel/agent_dialer.go Show resolved Hide resolved
@espadolini espadolini enabled auto-merge June 9, 2023 19:19
@espadolini espadolini added this pull request to the merge queue Jun 9, 2023
Merged via the queue into master with commit 7ebaf6a Jun 9, 2023
22 checks passed
@espadolini espadolini deleted the espadolini/reversetunnel-early-abort branch June 9, 2023 19:54
@public-teleport-github-review-bot

@espadolini See the table below for backport results.

Branch Result
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

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.

None yet

3 participants