 |
Forums |
Admin Discussion Forums: help Start New Thread
By: Kornelis Sietsma
RE: podcatcher and HTTP proxies [ reply ] 2007-03-09 05:33
|
Just a note for anyone else who is stuck behind an authenticating proxy...
You can't use "http_proxy=http://user@password/myproxy:8080" because the current version of open-uri doesn't support this syntax.
I think this was originally deliberate, as passwords in an environment variable are bad. Which doesn't help much for those of use who have no other option!
Anyway, this is apparently going to be fixed in ruby 1.9 (I think - the mail trail I found was a bit confusing). In the meantime, if you don't mind some hackery, it's pretty simple to patch open-uri.rb yourself - simply find where it is installed (in cygwin at least it's /lib/ruby/1.8) and change:
if proxy
klass = Net::HTTP::Proxy(proxy.host, proxy.port)
end
to:
if proxy
if proxy.userinfo
proxy_user, proxy_pass = proxy.userinfo.split(/:/)
klass = Net::HTTP::Proxy(proxy.host, proxy.port, proxy_user, proxy_pass)
else
klass = Net::HTTP::Proxy(proxy.host, proxy.port)
end
end
At least, that seems to work for me. Maybe someone with more experience in the ruby world may have a better way to do this - I just wanted to get podcatcher up and running...
|
By: Doga Armangil
podcatcher and HTTP proxies [ reply ] 2004-12-15 08:30
|
Hi,
A user has asked me by e-mail about HTTP proxies. I am posting the answer I gave him, as this might interest other users.
If the shell environment variable http_proxy is defined, podcatcher automatically uses it. So if you execute the following command in a bash shell
export http_proxy=http://myproxy:8080/
and run podcatcher, then all podcatcher traffic will pass through myproxy:8080. You might want to put a similar line in ~/.profile, in which case http_proxy will be defined in all shell instances created after login.
The above comments apply to Linux; some adaptation might be necessary for other environments.
|
|
 |