-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpClient proxy configuration per request #2746
Comments
I will take a look at this issue soon. |
@jordillachmrf Can you elaborate more about the desired solution? You know the destination URI as this is something the the one that uses the |
And that's exactly how we are tackling this, but keeping the routing solution close the proxy configuration seems to us more appropriate than moving this logic one layer above. |
@jordillachmrf I'm gonna add this to the general backlog. For the time being please use the described solution in my previous comment. |
@violetagg Is somebody working on this problem? |
@longkunbetter We are not working on this one. I marked this with |
Hi @violetagg, |
@punitdarira Do you want to provide a PR? If yes - some rough idea is to plug the implementation in |
If you would like to have a proxy per request then what should be the destination URL used for selecting proxy settings?
|
As explained here https://stackoverflow.com/questions/74893474/is-there-any-way-to-imlement-a-rotating-proxy-based-httpclient-in-reactor-netty it would be nice if reactor-netty HttpClient could be configured in a per request basis, instead of being "statically" configured as explained in the docs https://projectreactor.io/docs/netty/1.1.5/reference/index.html#_proxy_support_2
Motivation
Some of our clients are GDRP constrained and based on the location of their servers and our servers(eeuu vs eu) we get 451 status codes(legal reasons)
Desired solution
HttpClient client = HttpClient.create() .proxy((spec, req) -> spec.type(ProxyProvider.Proxy.HTTP) .host("proxy") .port(8080) .nonProxyHosts("localhost") .connectTimeoutMillis(20_000));
req -> HttpClientRequest, if HttpClientRequest would be available then we could route the request to our eeuu proxy or eu proxy based on the destination uri.
Considered alternatives
Have various HttpClients's, handle 451 in our code and fallback to the appropriate HttpClient at runtime
The text was updated successfully, but these errors were encountered: