Skip to content

http-netty: ON_NEW_CONNECTION discovery ignores proxy config - #3682

Merged
idelpivnitskiy merged 1 commit into
apple:mainfrom
idelpivnitskiy:proxy
Oct 8, 2026
Merged

idelpivnitskiy merged 1 commit into
apple:mainfrom
idelpivnitskiy:proxy

Conversation

@idelpivnitskiy

Copy link
Copy Markdown
Member

Motivation:

With DiscoveryStrategy.ON_NEW_CONNECTION, the connection factory always resolved the origin address captured at build time, even when it was given the proxy address. Clients with a proxy configured connected directly to the origin server instead.

Modifications:

  • Map the resolved address back with r -> (U) r instead of returning the captured origin address.
  • Add proxy tests in HttpProxyTest and HttpsProxyTest that run with each DiscoveryStrategy.

Result:

Clients that use ON_NEW_CONNECTION strategy with a custom service discoverer send traffic through the configured proxy.

Motivation:

With `DiscoveryStrategy.ON_NEW_CONNECTION`, the connection factory always
resolved the origin address captured at build time, even when it was given
the proxy address. Clients with a proxy configured connected directly to the
origin server instead.

Modifications:

- Map the resolved address back with `r -> (U) r` instead of returning the
  captured origin address.
- Add proxy tests in `HttpProxyTest` and `HttpsProxyTest` that run with each
  `DiscoveryStrategy`.

Result:

Clients that use `ON_NEW_CONNECTION` strategy with a custom service
discoverer send traffic through the configured proxy.
@idelpivnitskiy
idelpivnitskiy requested a review from daschl October 7, 2026 19:48

@daschl daschl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find 👍

@idelpivnitskiy
idelpivnitskiy merged commit 7f9ad8a into apple:main Oct 8, 2026
14 checks passed
@idelpivnitskiy
idelpivnitskiy deleted the proxy branch October 8, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants