Wget doesn’t take variable http_proxy

http-proxyPROXYwget

If I run:

echo $http_proxy

It output:

http://user:pass@host:port

But when I run:

wget www.google.com

It output:

Resolviendo www.google.com... 209.85.195.104
Caching www.google.com => 209.85.195.104
Conectando a www.google.com|209.85.195.104|:80... Closed fd 3
falló: Expiró el tiempo de conexión.
Releasing 0x088293a8 (new refcount 1).
Reintentando.

--2010-07-07 19:40:00--  (intento: 2)  http://www.google.com/
Found www.google.com in host_name_addresses_map (0x88293a8)
Conectando a www.google.com|209.85.195.104|:80...

In English:

Resolving www.google.com... 209.85.195.104
Caching www.google.com => 209.85.195.104
conecting to www.google.com|209.85.195.104|:80... Closed fd 3
fail: conection time has expired.
Releasing 0x088293a8 (new refcount 1).
retrying.
...

What I am doing wrong?

NOTE: the https_proxy and ftp_proxy have the same value. And I already try to modify /etc/wgetrc and reinit without success.

Best Answer

Thanks for the debug logs.

So you're clearly not using up the env proxy settings you expect based on that output.

See http://www.gnu.org/software/wget/manual/wget.html#Proxies for some alternate methods of configuring the proxy settings.

It's not clear if you're in some kind of controlled environment, but it's also possible that the wget you're calling has been modified in some how -- perhaps there's a wrapper script that's stripping out the environment or disabling the proxy settings from being used (--no-proxy). Does file $(which wget) show it's an executable?