Cntlm
My place of employment just shutdown their old proxy servers. Now, everyone is forced to use the NTLM proxy servers. This is fine for Internet Explorer and Firefox, but it breaks Safari, Eclipse and just about every command line tool available.
cntlm is a small proxy written in C. This tiny proxy allows programs running on your workstation it use it as a proxy, and it passes the correct authentication credentials through to the NTLM proxy.
I attempted to install it via the Win32 installer, however, because I have a newer version of Cygwin installed on my machine, the program wouldn't run. I downloaded the tarball, and built it myself. Oddly, I had to dos2unix configure, VERSION, and proxy.c. After this it built ok, but the default install wouldn't work.
I installed it manually like so: <geshi lang="bash"> install -D -m 755 -s cntlm /usr/local/bin/cntlm; install -D -m 644 doc/cntlm.1 /usr/local/man/man1/cntlm.1 install -D -m 600 doc/cntlm.conf /usr/local/etc/cntlm.conf; </geshi>
The auto-detected settings didn't work, so I tweaked the settings in /usr/local/etc/cntlm.conf. Next I ran it manually in the foreground. <geshi> cntlm -c /usr/local/etc/cntlm.conf -v </geshi>
My first test was to use wget <geshi> export http_proxy=localhost:3128 wget http://vimcolorschemetest.googlecode.com/svn/colors/darkslategray.vim </geshi>
Once this was working, I fired up Safari and tested a regular web page. After everything checked out, I stopped the manual process, and installed cntlm as a service.
<geshi> cygrunsrv -I cntlm -t auto -p /usr/local/bin/cntlm -a "-c /usr/local/etc/cntlm.conf" $ net start cntlm The cntlm service is starting. The cntlm service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534. </geshi>
Even though it reported an error, the service was running just fine.
Once you have the proxy working, you can use tools like ruby gems by passing in the proxy info. Note, for gems, the proxy must be a url, so you need to include the http bit, and the options go at the END of the command. <geshi> gem update --http-proxy http://$http_proxy </geshi>