[Rubygems-developers] [PATCH] Authenticated proxy support

Neil Kohl nakohl at gmail.com
Mon Jan 10 22:28:24 EST 2005

Hi, all.

At work I'm behind a proxy server that requires authentication. I
noticed on the list archives that this isn't supported by rubygems.
After a bit of tinkering I came up with the attached patch that adds

Username and password must be part of the proxy URL,


Notes and caveats:

* I'm a complete ruby newbie so please sanity check this code.

* Patch modifies open-uri.rb and remote_installer.rb which appear to
be the only files that contain methods that do network stuff.

* The patch was tested on Windows XP and Mac OS X installs of ruby
1.8.2 and gem 0.8.4 against two different proxy servers. It was tested
for installation (gem install)  and remote search (gem query -r ).

* Proxy login is Basic only and will fail if NTLM authentication is
required.  NTLM is a royal pain to implement.


Neil Kohl
nakohl at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: proxy-auth.patch
Type: application/octet-stream
Size: 1495 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20050110/16dcdfcc/proxy-auth.obj

More information about the Rubygems-developers mailing list