How to set nonProxyHosts for a SOCKS proxy
问题 I want to set the nonProxyHosts list for a SOCKS5 proxy, i.e. the list of hostnames to which a direct connection should be used. As the oracle docs describe, there are options named http.nonProxyHosts and ftp.nonProxyHosts to set proxy exclusions for HTTP and FTP, but there is no specific setting for SOCKS proxies. I tried http.nonProxyHosts , but this doesn't affect SOCKS connections. The SOCKS proxy is set up via: System.setProperty("socksProxyHost", "192.168.10.10"); System.setProperty(