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 ALPN for TCP + TLS routers #8913
Conversation
This draft can be reviewed, code does the expected things, but docs and probably tests are left to be done |
Validate broke due to "misspell" triggering by |
Hello @sh7dm,
No worries, we will take a look at the unit tests during the review phase. |
I have tested that, looks like nothing broke, but it should be reviewed to ensure it fits great and does not induce a risk of regressions. Thanks for informing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
Add a rule matcher ALPN(proto) for matching any of available protocols, able to take over default handlers like h2 Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👌
Co-authored-by: mpl <mathieu.lonjaret@gmail.com>
Co-authored-by: mpl <mathieu.lonjaret@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code again, I'm confused by some aspects of the (existing) behaviour of clientHelloInfo, but double-checking that is out of the scope of this PR. Will do later.
What does this PR do?
Support matching ALPN protocols when initiating connection with a TLS client, thus allowing to multiplex different service behind a single TLS entrypoint (e.g. handling
h2
in Traefik and connectingmqtt
to an MQTT broker)Motivation
fixes #7906
More
Additional Notes
Tested using client code from https://github.com/jefferai/golang-alpn-example/blob/master/alpnexample.go as
foo
protocol (On Go 1.16) and Chrome M102 as h2 client