DEV Community

karenpanahi
karenpanahi

Posted on

proxy with wget

https://askubuntu.com/questions/346649/how-do-i-force-wget-to-use-a-proxy-server-without-modifying-system-files

https://www.thegeekdiary.com/how-to-use-wget-to-download-file-via-proxy/

follow:

Without modifying your system files at /etc/wgetrc you could create a file at your home directory ~/.wgetrc. It will enable you to modify wget settings locally at user level. Now write the following at ~/.wgetrc to use wget behind a proxy server:

use_proxy = on
http_proxy =  http://username:password@proxy.server.address:port/
https_proxy =  http://username:password@proxy.server.address:port/
ftp_proxy =  http://username:password@proxy.server.address:port/
Enter fullscreen mode Exit fullscreen mode

If you do not have proxy username and password just write the proxy-address and port everywhere like,

http_proxy =  http://proxy.server.address:port/
Enter fullscreen mode Exit fullscreen mode

example :

export http_proxy=http://110.232.67.44:55443/
export https_proxy=http://110.232.67.44:55443/
export ftp_proxy=http://110.232.67.44:55443/
Enter fullscreen mode Exit fullscreen mode

for checking the environement variables you can do :

env | grep proxy 

Enter fullscreen mode Exit fullscreen mode

This should work. I am assuming you already have proxy settings for all other applications.

Top comments (0)