SOCK5 proxy support #511
ramazangirgin
started this conversation in
General
Replies: 2 comments
-
@ramazangirgin you are welcome to contribute the changes necessary to allow you to implement your own |
Beta Was this translation helpful? Give feedback.
0 replies
-
I made |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We use the rabbitmq http api managing the exchanges and queues.
We want to access the rabbitMQ api via SOCK5 proxy with rabbitmq http api.
I checked the support for the library and it is visible as possible to configure HTTP proxy with customProxySelector as below;
and registering it with
but it doesn't work, it doesn't use configured SOCKS proxy.
The reason is RabbitMQ http client library uses HttpClient and
HttpClient is designed primarily for handling HTTP proxies and ignores SOCKS proxies during the proxy selection process.
see implementation from jdk.internal.net.http.HttpRequestImpl#retrieveProxy ( jdk 21 )
some additional explanation/discussion from stackoverflow.
https://stackoverflow.com/questions/70011046/how-to-use-a-socks-proxy-with-java-jdk-httpclient
I tried to create a custom HttpLayer to use HttpURLConnection which has SOCKS proxy support instead of HttpClient but it is not possible to implement custom com.rabbitmq.http.client.HttpLayer.
The reason is ;
com.rabbitmq.http.client.ParameterizedTypeReference class in the com.rabbitmq.http.client package is not public, which prevents me having a custom HttpLayer implementation.
My question is;
is there way have SOCKS proxy support by using rabbitmq http api ?
Thanks in advance,
Best regards
Ramazan Girgin
Beta Was this translation helpful? Give feedback.
All reactions