mardi 5 novembre 2019

Use HTTP Proxy tunneling with Java

We want to use a web proxy and to tunnel trough it (tunneling trough a web proxy is described here What does the curl option CURLOPT_HTTPPROXYTUNNEL mean?) using a Java application.

It means amongs other things that the proxy will solve the domain names when connecting to a domain name from the Java application.

We are using this code and configuration set in properties file:

System.setProperty("http.proxyHost",environment.getProperty("http.proxy.host")); System.setProperty("http.proxyPort",environment.getProperty("http.proxy.port")); System.setProperty("https.proxyHost",environment.getProperty("https.proxy.host")); System.setProperty("https.proxyPort", environment.getProperty("https.proxy.port"));

But this way the application use the web proxy the usual way without tunneling traffic trough it (not using the HTTP CONNECT method etc).

We dont know the way to proceed with Java in this kind of situations.




Aucun commentaire:

Enregistrer un commentaire