I want to set nonProxyHosts list for SOCKS5 proxy, i.e. A list of host names to which to use a direct connection.
As described by oracle docs , there are options called http.nonProxyHosts and ftp.nonProxyHosts for setting proxy exceptions for HTTP and FTP, but there is no specific setting for SOCKS proxies.
I tried http.nonProxyHosts , but this does not affect SOCKS connections.
SOCKS proxy is configured through:
System.setProperty("socksProxyHost", "192.168.10.10"); System.setProperty("socksProxyPort", "3128");
But this leads to the fact that even DB connections to localhost use SOCKS proxies, which is unacceptable.
How is it supposed to be used? How can I exclude certain nodes from proxied compounds?
source share