Proxy
February 6th, 2003
Erik pointed me (once again) to something that looked interesting: a pure Java Microsoft MSN Messenger clone. I got the files, unzipped, started, tried to login... and got disappointed again. The authors didn't provide any way to configure a HTTP proxy. This is the nth time I've seen it. It's kind of weird: every C, C++ or .NET application I get, has a "proxy settings" box somewhere. None of the Java programs have it. Is it that hard to configure proxies in Java (I've never tried it)? Or are most Java programmers using direct T1 lines?
Note: I know there is some arcane -D setting you can provide to use a HTTP proxy, but I forget every time what it is, and Google doesn't return too many useful hits on that one. It should be configurable anyways.
Note: This is in no way an attack on the authors of JMSN. It is just a general remark. My hope is that at least one Java programmer who is about to release some nifty code, now thinks "Ah, I'll quickly add that before I release".

April 21st, 2008 at 10:16 PM Setting proxies in Java *is* trivial. java -DproxyHost=[proxy name] -DproxyPort=[proxy port] -jar ... It's that simple, and yes, programs can set system properties.
April 21st, 2008 at 10:16 PM It's easy to do that; there are a couple of other settings that help, like the http.DontProxyHosts="localhost|*.foo.com" list of hosts you don't want to proxy. Unfortunately for those of us with relatively paranoid proxy servers, there is no trivial way to set a proxy server username and password. That requires a Proxy-Authentication header to be set with the username and password (base64). [the easiest solution for this might be to set up a Java-friendly proxy server that chains to the paranoid server and supplies the appropriate credentials.] Java 1.4.2 is supposed to include NTLM authentication, which is Microsoft's proprietary way to pass NT credentials to web servers from IE. And, finally, a number of .NET programs don't understand proxy servers, or can't handle authentication. Synderella, last I checked, didn't. Programs that use the cruddy WININET.DLL piggyback on IE's proxy settings, which is especially handy when there's a fancy proxy configuration file required. [Too many years fighting proxy servers....]