How to set proxy for wget?

Hakim picture Hakim · Jun 26, 2012 · Viewed 620.5k times · Source

I want to download something with wget using a proxy:

HTTP Proxy: 127.0.0.1
Port: 8080

The proxy does not need username and password.

How can I do this?

Answer

amaksr picture amaksr · Jun 26, 2012

For all users of the system via the /etc/wgetrc or for the user only with the ~/.wgetrc file:

use_proxy=yes
http_proxy=127.0.0.1:8080
https_proxy=127.0.0.1:8080

or via -e options placed after the URL:

wget ... -e use_proxy=yes -e http_proxy=127.0.0.1:8080 ...