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

Support proxy protocol v2 #11684

Merged
merged 9 commits into from
Apr 5, 2022
Merged

Support proxy protocol v2 #11684

merged 9 commits into from
Apr 5, 2022

Conversation

probakowski
Copy link
Contributor

This change add multiplexer support for proxy protocol v2 (binary).
I've tested it manually using local HAProxy instance with config:

backend teleport
    balance leastconn
    mode tcp
    retries 3
    option redispatch
    server localhost:3080 127.0.0.1:3080 send-proxy-v2

frontend proxy
    bind  :5816
    log global
    mode tcp
    default_backend teleport

    maxconn 60000
    timeout client 10m

and then:

tsh --proxy=localhost:5816 login

Closes #4904

@probakowski probakowski added enhancement networking Network connectivity features/problems labels Apr 2, 2022
@github-actions github-actions bot requested review from ibeckermayer and zmb3 April 2, 2022 00:56
Copy link
Contributor

@ibeckermayer ibeckermayer left a comment

Choose a reason for hiding this comment

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

Don't have the context to review how it works, but the code itself LGTM after addressing Zac's comments.

@probakowski probakowski requested a review from zmb3 April 4, 2022 16:48
@probakowski probakowski enabled auto-merge (squash) April 4, 2022 19:01
@probakowski probakowski merged commit 3ff19cf into master Apr 5, 2022
@probakowski probakowski deleted the probakowski/proxy-v2 branch April 5, 2022 00:48
probakowski added a commit that referenced this pull request Apr 5, 2022
This change add multiplexer support for proxy protocol v2 (binary).

Closes #4904

(cherry picked from commit 3ff19cf)
@probakowski
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
branch/v9

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

probakowski added a commit that referenced this pull request Apr 5, 2022
This change add multiplexer support for proxy protocol v2 (binary).

Closes #4904

(cherry picked from commit 3ff19cf)
@webvictim webvictim mentioned this pull request Apr 19, 2022
probakowski added a commit that referenced this pull request May 18, 2022
#11684 added support for proxy protocol v2 for SSH and Postgres but MySQL uses different code path and it was missing. This change fixes that.
It also adds tests for v2 protocol support for MySQL, Postgres, Mongo and Redis
probakowski added a commit that referenced this pull request May 27, 2022
#11684 added support for proxy protocol v2 for SSH and Postgres but MySQL uses different code path and it was missing. This change fixes that.
It also adds tests for v2 protocol support for MySQL, Postgres, Mongo and Redis

(cherry picked from commit 17fc073)
probakowski added a commit that referenced this pull request Jun 7, 2022
#11684 added support for proxy protocol v2 for SSH and Postgres but MySQL uses different code path and it was missing. This change fixes that.
It also adds tests for v2 protocol support for MySQL, Postgres, Mongo and Redis

(cherry picked from commit 17fc073)
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement networking Network connectivity features/problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Teleport doesn't support proxy protocol v2
3 participants