Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If ran without parameters my wget prints:

D:\>wget
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = c:/progra~1/wget/etc/wgetrc
D:\Apps\Util\wget: missing URL
Usage: D:\Apps\Util\wget [OPTION]... [URL]...

Try `D:\Apps\Util\wget --help' for more options.

This probably means, that is looks for file wgetrc in c:/progra~1/wget/etc/wgetrc. Unfortunately, this location is unavailable for non-root programs. I was thinking I can modify SYSTEM_WGETRC or syswgetrc environment variables, but this looks having no effect

D:\>echo %SYSTEM_WGETRC%
d:\apps\util\wgetrc

D:\>echo %syswgetrc%
D:\APPS\Util\wgetrc
share|improve this question
    
Ouch that is so darn weird. Why do you get forward slashes c:/ ? It should be C:\ –  barlop Jan 1 '13 at 19:49
    
also funny that your wget tells you about wgetrc, mine doesn't. Maybe we have some setting different. But what version of wget do you have? –  barlop Jan 1 '13 at 20:04
add comment

3 Answers

barlop's answer in general is fine, but a few comments:

on the dos/windows command line or batch file, you specify

set http[s]_proxy=http[s]://proxyserver:port/

then wget works fine.

it will usually also take your windows single sign-on credentials if you are in a company network with NTLM authentication against the proxy (no need to hassle around with domain - backslash - user)

share|improve this answer
add comment

wget --help doesn't tell you much. The online wget manual tells you more. Or man wget

In short, here's an example

C:\sdf>wget -e http_proxy=127.0.0.1:8118 www.google.com

and another

C:\sdf>set http_proxy=127.0.0.1:8118
C:\sdf>wget www.google.com

The manual mentions wgetrc commands. You see some things about http proxies listed there.

6.3 Wgetrc Commands

  • http_proxy = string
    Use string as http proxy, instead of the one specified in environment.
  • https_proxy = string
    Use string as https proxy, instead of the one specified in environment.

8.1 Proxies

Wget supports proxies for both http and ftp retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables:

  • http_proxy
  • https_proxy
    If set, the http_proxy and https_proxy variables should contain the urls of the proxies for http and https connections respectively.
share|improve this answer
    
man wget seems to have a more recent version than the webpage. e.g. --content-on-error is on that 2013 man wget page, but not on the wget online manual that lists the options. –  barlop Dec 17 '13 at 20:58
add comment

I think you just want to set the HTTP_PROXY environment variable.

From : http://www.gnu.org/software/wget/manual/html_node/Proxies.html:

Wget supports proxies for both http and ftp retrievals. The standard way to specify proxy location, which Wget recognizes, is using the following environment variables:

http_proxy
https_proxy

If set, the http_proxy and https_proxy variables should contain the urls of the proxies for http and https connections respectively.

share|improve this answer
add comment

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.