Does Java8 SSLSocketFactory obey the relevant network proxy properties?

87 Views Asked by At

I'm wondering whether SSLSocketFactory provides out of the box support for network proxies as documented here: https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html#Proxies

i.e. is communication through sockets created with sslSocketFactory.createSocket()... supposed to be proxied as expected?

My local tests show that this is not the case but before digging deeper I wanted to clarify whether support exists in the first place.

1

There are 1 best solutions below

0
Emanuel George Hategan On

This answer says java.net.Proxy, or the https.proxyHost/proxyPort properties, only support HTTP proxying via HttpURLConnection, not via a Socket.

The answer seems to be NO!