hyper-util icon indicating copy to clipboard operation
hyper-util copied to clipboard

feat(conn): support HTTP proxy basic authentication

Open chen-hongzhi opened this issue 3 weeks ago • 2 comments

Fixes an issue where the client couldn’t attach basic authorization to HTTP proxy requests.

chen-hongzhi avatar Dec 24 '25 07:12 chen-hongzhi

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?

seanmonstar avatar Jan 05 '26 14:01 seanmonstar

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.

chen-hongzhi avatar Jan 05 '26 15:01 chen-hongzhi