You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Netty client: proxy authentication not supported for HTTPS CONNECT tunnels, Proxy-Authorization leaks to origin #1569
The Netty client connector (NettyClientHelper) creates the CONNECT tunnel for HTTPS requests with new HttpProxyHandler(tunnelProxy), without credentials. When a proxy requires authentication, it answers 407 Proxy Authentication Required and the tunnel fails.
HeaderUtils.addGeneralHeaders also adds Proxy-Authorization (from Request.getProxyChallengeResponse()) to the request headers whatever the proxy mode. For HTTPS these headers travel inside the TLS tunnel, so the proxy credentials are sent to the origin server instead of the proxy.
Plain HTTP through a forward proxy is not affected, because there the request headers do go to the proxy.
Proposed fix
When tunneling, take the proxy credentials from the request's proxy challenge response (or from new proxyUsername / proxyPassword connector parameters) and pass them to HttpProxyHandler(address, username, password) for Basic auth.
Leave Proxy-Authorization out of requests sent through a CONNECT tunnel.
Note that tunnel connections are pooled per origin, so credentials need to be part of the pool key (or be connector-level only).
Extend ProxyTestCase with an authenticating test proxy, and assert that the origin never receives Proxy-Authorization.
Fixed by #1574: the proxy credentials go with the CONNECT request of HTTPS tunnels, Proxy-Authorization is removed from the request sent through the tunnel so it never reaches the origin, and tunnels are pooled per proxy credential. ProxyTestCase covers an authenticating proxy.
Activity
fix: send proxy credentials with the CONNECT request of HTTPS tunnels
fix: send proxy credentials with the CONNECT request of HTTPS tunnels
jlouvel commentedon Nov 5, 2026
Fixed by #1574: the proxy credentials go with the
CONNECTrequest of HTTPS tunnels,Proxy-Authorizationis removed from the request sent through the tunnel so it never reaches the origin, and tunnels are pooled per proxy credential.ProxyTestCasecovers an authenticating proxy.🤖 Generated with Claude Code