Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'll take a shot. If the proxy server is using basic authentication, you could use the following snippet as an example:</p> <pre><code>DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient.getCredentialsProvider().setCredentials( new AuthScope("PROXY HOST", 8080), new UsernamePasswordCredentials("username", "password")); HttpHost targetHost = new HttpHost("TARGET HOST", 443, "https"); HttpHost proxy = new HttpHost("PROXY HOST", 8080); httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); </code></pre> <p>If the proxy server is using NTLM authentication, I do not believe NTLM support is available for all proxy server versions (it will work with some NTLM authentication proxy server versions - check if the proxy is using v1 or v2 of NTLM authentication). For reference &amp; workarounds, you can check the following:</p> <p><a href="http://hc.apache.org/httpcomponents-client-ga/ntlm.html" rel="noreferrer">http://hc.apache.org/httpcomponents-client-ga/ntlm.html</a></p> <p><a href="http://htmlunit.sourceforge.net/ntlm.html" rel="noreferrer">http://htmlunit.sourceforge.net/ntlm.html</a></p> <p><a href="http://devsac.blogspot.com/2010/10/supoprt-for-ntlmv2-with-apache.html" rel="noreferrer">http://devsac.blogspot.com/2010/10/supoprt-for-ntlmv2-with-apache.html</a></p> <p>Depending on your proxy server, you may need to look into NTCredentials instead of UserPasswordCredentials. </p> <p>I would also suggest that you may wish to look into using wireshark to capture network packets and check the response from the proxy server to be absolutely sure what is causing the problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload