I want to download something using wget tool. but I want to use this settings for wget:

HTTP Proxy: 127.0.0.1
Port: 8080

without username and password.

How can I do this? I checked many sites and many suggestions, but nothing worked to me...

share|improve this question
8  
Hakim - I noticed you did not accept any of the answers. Does that mean they are wrong and I should not follow the advice given? If so, did you solve the problem with something else? – jww Dec 17 '13 at 23:49

Via ~/.wgetrc file:

use_proxy=yes
http_proxy=127.0.0.1:8080
https_proxy=127.0.0.1:8080

or via -e options placed after the URL:

wget ... -e use_proxy=yes -e http_proxy=127.0.0.1:8080 ...
share|improve this answer
1  
Thank you,hovanessyan's answer works well. but I don't know why I can't use user1464130's way. I prefer setting proxy settings temporarily when calling wget. but now it seems that I have to change the configuration in the settings file... – Hakim Jun 26 '12 at 17:16
1  
Change use-proxy to use_proxy and http-proxy to http_proxy and it works. – FloppyDisk Apr 18 '13 at 21:53
3  
My wget says it must be use_proxy=on, not use_proxy=yes. Works well otherwise. – Thomas Jensen Feb 26 '14 at 12:24
17  
note you also need to set https_proxy if url is HTTPS – fiat Jul 8 '14 at 11:31
2  
Checked. It works with wget -e <http_proxy>=127.0.0.01:8080 <download>;..., omitting the "use_proxy=yes" command parameter. Thanks! – user3285866 Sep 25 '15 at 15:45

Type in command line :

$ export http_proxy=http://proxy_host:proxy_port

for authenticated proxy,

$ export http_proxy=http://username:password@proxy_host:proxy_port

and then run

$ wget fileurl

for https, just use https_proxy instead of http_proxy. You could also put these lines in your ~/.bashrc file so that you don't need to execute this everytime.

share|improve this answer

the following possible configs are located in /etc/wgetrc just uncomment and use...

# You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
#use_proxy = on
share|improve this answer

wget uses environment variables somthing like this at command line can work:

export http_proxy=http://your_ip_proxy:port/
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export dns_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
share|improve this answer
    
It helped on homebrew too! – Miao1007 Nov 21 '15 at 11:16

After trying many tutorials to configure my Ubuntu 16.04 LTS behind a authenticated proxy, it worked with these steps:

Edit /etc/wgetrc:

$ sudo nano /etc/wgetrc

Uncomment these lines:

#https_proxy = http://proxy.yoyodyne.com:18023/
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/
#use_proxy = on

Change http://proxy.yoyodyne.com:18023/ to http://username:password@domain:port/

IMPORTANT: If it still doesn't work, check if your password has special characters, such as #, @, ... If this is the case, escape them (for example, replace passw@rd with passw%40rd).

share|improve this answer

In Ubuntu 12.x, I added the following lines in $HOME/.wgetrc

http_proxy = http://uname:passwd@proxy.blah.com:8080

use_proxy = on

share|improve this answer

In my ubuntu, following lines in $HOME/.wgetrc did the trick!

http_proxy = http://uname:passwd@proxy.blah.com:8080

use_proxy = on

share|improve this answer

In Debian Linux wget can be configured to use a proxy both via environment variables and via wgetrc. In both cases the variable names to be used for HTTP and HTTPS connections are

http_proxy=hostname_or_IP:portNumber
https_proxy=hostname_or_IP:portNumber

Note that the file /etc/wgetrc takes precedence over the environment variables, hence if your system has a proxy configured there and you try to use the environment variables, they would seem to have no effect!

share|improve this answer

In Windows - for Fiddler say - using environment variables:

set http_proxy=http://127.0.0.1:8888
set https_proxy=http://127.0.0.1:8888
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.