To make GNU Wget (wget command) work behind a proxy, wgetrc (which is found in /etc/ directory) file must be edited.

Open wgetrc file with preferred editor:

nano /etc/wgetrc

And add a new line with the proxy settings (or update if the line is already present):

http_proxy = http://user:password@server:port/

Protect the proxy settings

By removing READ permissions for “all other users”:

stat /etc/wgetrc
chmod 640 /etc/wgetrc

Categories & Tags


Related


Share