-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
I'm new to the Proxy protocol, but from what I can tell:
- When using a TLS-passthrough for a load balancer (mine happens to be DigitalOcean), Proxy protocol is added before the TLS connection starts (since it has no way to add it just after it starts, of course, if it is passthrough).
- The
ProxyParserin uWS is called inHttpParser::getHeaders, which is after TLS parsing.
Thus, even with Proxy parsing enabled, the TLS connection fails since it is trying to parse the Proxy protocol.
I confirmed that if I hacked ssl_on_data in openssl.c, that I can see the proxy packets as expected.
So the open questions I have are:
- Is it important to support parsing the Proxy protocol both before and after TLS, since it could come either time? My specific case is before, but it could be either in theory. The current logic is implemented to support after.
- Open to suggestions on a reasonable approach for implementing it that I could submit as a PR. My brief investigation makes me consider sticking the parsed proxy data into
loop_ssl_data, and then still exposing it similarly as today through at leastHttpResponse.