-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for Proxy Protocol v1 & v2 for HTTP/1.x #3277
base: master
Are you sure you want to change the base?
Conversation
I really appreciate your work on this feature. As it happens I'm actually working on this at the lower level with the ambition to introduce a generic stream wrapper as part of the HttpServer builder that allows both more flexible TLS config as well as PROXY protocol. With more eyes on this feature, I'm definitely motivated to pick this up again. |
Ah! I searched across the actix-web repo but didn't think to look in actix-net! At the moment I added in support for HTTP/1.x only as that is what we use for our platform but HTTP/2 still needs some work. I'm happy to contribute to implementing this properly in actix-net as it is something we rely on. What is remaining from that PR to be implemented? |
I can probably clean it up as-is. I remember leaving it unfinished in terms of the PP2 extensions but it's likely that an MVP will be useful for most people. |
The main TLV is the authority one that people seem to use and that is implemented. If I get some time I can try completing the rest. |
This is great info. I actually don't have significant practical experience using PROXY yet. |
It isn't widely used but should be. At the moment in Rust there isn't a lot of support for it in web frameworks. The only web server I've found support is an axum-server fork https://github.com/valorem-labs-inc/hyper-server/ . It is especially useful in those platforms which allow HTTP Host spoofing etc. |
Yea for sure. I have a medium term need for it at work for exactly that reason. |
PR Type
Feature
PR Checklist
Overview
This PR adds support for Proxy Protocol v1 & v2 for HTTP/1.x
Closes #1751