Method one, with parameters directly behind the command
Use the wget command to set up an HTTP proxy
wget http://www.baidu.com/-E use_proxy=yes-e http_proxy=yourproxy.com:port
Other additional parameters are necessary for downloading HTTPS files.
wget--no-check-certificate https://www.google.com/\
-e use_proxy=yes-e Https_proxy=yourproxy.com:port # #使用https_proxy才可以哟
Parameter--no-check-certificate can not check the server's certificate.
If you're having trouble, you can proxy the shell for HTTP proxy settings:
Export Http_porxy=yourproxy.com:port
Export Https_proxy=yourproxy.com:port
This allows other programs to access the network via this agent.
If wget does not require a proxy to cancel the agent using the parameter--no-proxy.
method Two, setting in the configuration file
Setting up agents in ~/.WGETRC
Http_proxy = http://ip_or_domainname:80/
Ftp_proxy = http://ip_or_domainname:80/
Use_proxy = On
wait = 15
And then straight wget Http://ip/filename's OK.