Proxies are special-purpose http servers designed to transfer data from remote servers to local clients. One typical use of proxies is lightening network load for users behind a slow connection. This is achieved by channeling all http and ftp requests through the proxy which caches the transferred data. When a cached resource is requested again, proxy will return the data from cache. Another use for proxies is for companies that separate (for security reasons) their internal networks from the rest of Internet. In order to obtain information from the Web, their users connect and retrieve remote data using an authorized proxy.
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:
https_proxyvariables should contain the urls of the proxies for http and https connections respectively.
ftp_proxyare set to the same url.
no_proxyis ‘.mit.edu’, proxy will not be used to retrieve documents from MIT.
In addition to the environment variables, proxy location and settings may be specified from within Wget itself.
Some proxy servers require authorization to enable you to use them. The
authorization consists of username and password, which must
be sent by Wget. As with http authorization, several
authentication schemes exist. For proxy authorization only the
Basic authentication scheme is currently implemented.
You may specify your username and password either through the proxy url or through the command-line options. Assuming that the company's proxy is located at ‘proxy.company.com’ at port 8001, a proxy url location containing authorization data might look like this:
Alternatively, you may use the ‘proxy-user’ and
‘proxy-password’ options, and the equivalent .wgetrc
proxy_password to set the proxy
username and password.