feat(conn): support HTTP proxy basic authentication
Fixes an issue where the client couldn’t attach basic authorization to HTTP proxy requests.
Thanks for the PR!
We currently are able to send proxy auth without this. For instance, reqwest adds the information based on various factors. So, part of me thinks it better to not expand the legacy API.
What do you think?
Just to clarify my use case: I’m implementing an HTTP proxy that can chain to an upstream proxy, and the auth here is for that upstream proxy.
The tricky part is that, without touching the actual request message (like HTTPS/SOCKS proxies do), there isn’t a reliable way to automatically inject a Proxy-Authorization header for plain HTTP proxy requests. That’s why pushing this into the connector layer matters.
I agree about being cautious with the legacy API surface area, but for upstream-proxy chaining this connector-level approach is the cleanest place to handle it.