Problems with Java and internet proxies solved


What is it with Java and Internet Proxies proxies.?

Google on the internet for Java and Proxies and you will find a staggering number of questions and discussions concerning endless frustrations with Java applications and their ability to break through an internet proxy.

Sure, I have seen the usual recommendations about setting the internet proxy at the command line. I suspect they must work for some people, but they have never worked for me. I will spend endless hours tinkering with the parameters, changing the syntax, removing or replacing the dots and dashes. However the result is always the same, a silent network failure and a deep frustrated growl.

But, recently I was pointed in the direction of this tool - Cntlm - Fast NTLM Authentication.

I can best describe this tool as a proxy, proxy.

It takes the request from your Java application and it handles the complex protocol discussion with your internet proxy.

Sure, you need to point your Java application to Cntlm using the normal proxy settings. This difference this time is that your Java application is talking to a proxy which appears to understand the needs of its client and wants to shield it from the undeniable ridiculous complexities of a proxy interface.

My experiences with this tool has been Linux based, but I am told the windows version works just as well.

The command I have used looks like this

cntlm -l 9090 -u <userid>@<domain> -p <password> <proxy>:<port number>

So an example might be

cntlm -l 9090 -u paulr@mydomain.com -p password proxy.mydomain.com:89

This would set up cntlm running locally listening on port 9090. It would use paulr and its password to connect into the proxy listening on port 89.

There is a configuration file with cntlm which removes the need for some of these command line parameters.

Finally, my proxy problems have been solved.





Comments

Popular posts from this blog

Vaadin - GRID Component

Connecting a Vaadin SQL Container to a Combo Box

Web Cam and Vaadin