How to use a proxy with wget
wget reads its proxy from the https_proxy and http_proxy environment variables, or from -e settings on the command line, with the login in the address or in --proxy-user and --proxy-password. It handles HTTP and HTTPS proxies only: for a SOCKS5 proxy, use curl. Every command here was run once on Oct 19, 2026, with GNU Wget 1.21.4, against a test proxy that takes a username and password; the address in the output is replaced with a documentation address and the login with placeholders.
Setup guide · Last revised Oct 20, 2026
On this page
The quickest way
https_proxy="http://USERNAME:[email protected]:8000" wget -q -O - https://api.ipify.org
prints the address the site saw:
203.0.113.24
Run it again without the https_proxy=... part: if the address is the same, wget is not using the proxy. https_proxy is for https:// pages and http_proxy for http:// pages; wget’s manual says they “should contain the URLs of the proxies for HTTP and HTTPS connections respectively” (GNU Wget manual, Proxies). Set both if your job fetches both.
The login on its own
A password with @, : or # breaks the address. Pass the login separately:
wget -q -O - -e use_proxy=yes -e https_proxy=proxy.example.com:8000 \
--proxy-user=USERNAME --proxy-password=PASSWORD https://api.ipify.org
wget sends it with Basic authentication; the manual notes that “For proxy authorization only the Basic authentication scheme is currently implemented”, which is what proxy providers use. To keep the login out of commands, put https_proxy, proxy_user and proxy_password in your ~/.wgetrc, readable only by you.
Turn it off for one run
--no-proxy makes wget connect directly “even if the appropriate *_proxy environment variable is defined” (manual). no_proxy=".example.org" skips the proxy for one domain and everything under it.
What wget prints when it fails
| wget prints | What happened | Next step |
|---|---|---|
Proxy tunneling failed: Proxy Authentication Required |
The proxy refused your login | 407 Proxy Authentication Required |
ERROR 403: Forbidden. |
The site refused the request | 403 Forbidden |
Error parsing proxy URL socks5h://...: Unsupported scheme. |
wget has no SOCKS support | Use curl |
Connecting to proxy.example.com... failed: Connection refused. |
Nothing answered on that port | Check the host and port in the dashboard |
Downloading many files
wget’s recursive mode (-r) can fetch a whole site through the proxy, and each file counts against a plan billed by the GB. Limit it to what you need (-l 1 for one level, -A pdf for one file type, --wait=1 between requests) before you start. What a large crawl costs: how much bandwidth web scraping uses.
Next
How to test a proxy checks the location and speed. For the codes a site can send back: proxy errors.
Price it for your amount
Today's checkout totals, every billing type competing. Change the amount to recalculate.
Geonode
$34.65Residential monthly subscription · Monthly
Checked Oct 24, 2026 · $0.69 per GB used
Buy at Geonode →GB and IP packages use separate amounts and billing units.