Resolution: Not A Problem
Affects Version/s: 4.5.5, 4.5.6
Fix Version/s: None
Component/s: HttpClient (Windows)
I have created a proxy server basing on squid solution. And I have hidden the server (Apache Tomcat 8) which I would like to access behind this proxy (it's not available from my local machine directly). Then, I have created an example project which only connects to this hidden server basing on Apache HttpClient libraries:
The code looks like:
Unfortunately, as squid does not support SOCKS protocol, opening socket and waiting for response hangs the program. I was thinking that maybe I'm basing on invalid server configuration however when using below code everything works fine for same system properties:
So java itself handles it correctly. What is more if I simply remove the socksProxyHost and socksProxyPort settings, then Apache HttpClient connects correctly to the hidden server. I don't think that having both HTTPS proxy configuration and SOCKS is incorrect as according to Oracle documentation:
As in Apache HttpClient I'm using system properties (useSystemProperties) I would expect that it is handled the same as Oracle does (the SOCK proxy should be ignored). I also checked it for simple HTTP proxy (http.proxyHost, http.proxyPort) and it acts the same (fails).
Could you please help me with this issue?