Monday, August 8, 2011

How to use wget through proxy

To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command prompt / console:

For Windows:
set http_proxy=

For Linux/Unix:
export http_proxy=""

Replace with your actual proxy server.
Replace 8080 with your actual proxy server port.

You can similarly use ftp_proxy to proxy ftp requests. An example on Linux would be:
export ftp_proxy=""

Then you should specify the following option in wget command line to turn the proxy behavior on:

Alternatively you can use the following to turn it off:

You can use –proxy-username="user name" –proxy-passwd="password" to set proxy user name and password where required.
Replace user name with your proxy server user name and password with your proxy server password. Another alternative is to specify them in http_proxy / ftp_proxy environment variable as follows:
export http_proxy="

For more info read the following article: How to use wget through proxy

No comments:

Post a Comment