You need to define the shell variables as follows:
HTTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here}You can put above two directives in a file called ~/.wgetrc:
FTP_PROXY={YOUR-PROXY-Server-IP-HERE}:{YOUR-PROXY-SERVER-Port-Here}
echo 'HTTP_PROXY=192.168.1.254:3128'>> ~/.wgetrc
echo 'FTP_PROXY=192.168.1.254:3128'>> ~/.wgetrc
Now you can use wget:
$ wget http://example.com/file.tar.gz
You can also define shell variables as follows:
export http_proxy=http://192.168.1.254:3128/
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:
- How To Use wget With Username and Password for FTP / HTTP File Retrieval
No comments:
Post a Comment