# Proxy Authentication

**URL:** <https://www.ruby-forum.com/t/proxy-authentication/100855>\
**Category:** Ruby\
**Created:** [August 1, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855 "2006-08-01T15:49:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nayak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nayak](https://www.ruby-forum.com/u/nayak)\
**Post date:** [August 1, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855/1 "2006-08-01T15:49:09Z")

</div>

Hi

I’m behind an authenticated proxy and want to install few plugins (for  
rails and radrails) for which I tried using NTLM proxy Authenticator  
but  
could not succeed

I also tried  
[http://blog.pomozov.info/posts/the-end-of-gem-vs-proxy-war.html](http://blog.pomozov.info/posts/the-end-of-gem-vs-proxy-war.html)  
[http://pomozov.info/downloads/gems/rubygems-update-0.8.11.6-patched.gem](http://pomozov.info/downloads/gems/rubygems-update-0.8.11.6-patched.gem)  
which corrupted my gem and had to reinstall all again ☹

Is there any other alternative for the same within ruby? (A non ruby  
solution will also be thanked)

(I also found a bug reported for the same at RubyForge  
[http://rubyforge.org/tracker/index.php?func=detail&aid=1289&group\_id=126&atid=575](http://rubyforge.org/tracker/index.php?func=detail&aid=1289&group_id=126&atid=575)  
)

Thanks in advance

Vishwanath Nayak K

---

<div class="post-metadata">

**Author:** ![nayak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nayak](https://www.ruby-forum.com/u/nayak)\
**Post date:** [August 1, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855/2 "2006-08-01T17:46:41Z")

</div>

On 8/1/06, NAYAK [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi
> 
> I’m behind an authenticated proxy and want to install few plugins (for  
> rails and radrails) for which I tried using NTLM proxy Authenticator but  
> could not succeed

I wrote a gem that will authenticate with such a proxy using your  
current  
credentials. It is Win32 only.

To use it, follow these steps:

1. Download and (locally) install the rubysspi gem found at  
[http://rubyforge.org/projects/rubysspi/](http://rubyforge.org/projects/rubysspi/)
2. Copy “spa.rb” from the gem’s installation directory to your site\_ruby  
directory (this allows the library to be included from the command line)
3. Find “gem.cmd” in your ruby bin directory and add “-rspa” to the  
command  
line arguments passed to ruby there.
4. Make sure the environment variable http\_proxy is set to your proxy  
and is  
a valid URL (e.g. [http://www.proxy.corp:8080](http://www.proxy.corp:8080))

That’s it! YOu can now run “gem install ” from the command  
line.

If you need a non-Win32 solution, or one that will authenticate as a  
given  
user, check out the Python APS server at  
[http://ntlmaps.sourceforge.net/](http://ntlmaps.sourceforge.net/)

---

<div class="post-metadata">

**Author:** ![nayak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nayak](https://www.ruby-forum.com/u/nayak)\
**Post date:** [August 3, 2006, 12:07pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855/3 "2006-08-03T12:07:21Z")

</div>

Hey Justin,

I followed the steps you told me and I am still not able to pass  
authentication details the proxy server when I run ruby script/plugin

Regards  
NAYAK

---

<div class="post-metadata">

**Author:** ![nayak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nayak](https://www.ruby-forum.com/u/nayak)\
**Post date:** [August 3, 2006, 2:21pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855/4 "2006-08-03T14:21:50Z")

</div>

Thanks Justin,  
It is working fine now

Thanks,  
NAYAK

---

<div class="post-metadata">

**Author:** ![nayak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/90ced4/32.png) [@nayak](https://www.ruby-forum.com/u/nayak)\
**Post date:** [August 3, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/proxy-authentication/100855/5 "2006-08-03T12:45:36Z")

</div>

On 8/1/06, NAYAK [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hey Justin,
> 
> I followed the steps you told me and I am still not able to pass  
> authentication details the proxy server when I run ruby script/plugin

Try ruby -rspa script/plugin

Email me offline with more details if you wish.

Justin
