≡ Menu

Use wget with Squid Proxy Server

How do I make wget work with Squid under UNIX or Linux operating systems?

You need to define the shell variables as follows:


You can put above two directives in a file called ~/.wgetrc:
echo 'HTTP_PROXY='>> ~/.wgetrc
echo 'FTP_PROXY='>> ~/.wgetrc

Now you can use wget:
$ wget http://example.com/file.tar.gz
You can also define shell variables as follows:
export http_proxy=
OR you can pass the proxy username and password as follows:
wget --proxy-user=YOUR-USERNAME-HERE --proxy-password=YOUR-PASSWORD-HERE http://nixcraft.com/file.tar.gz

See also: