wget proxy authentication, and why HTTPS_PROXY is ignored

wget reads only the lowercase variable, and only the one for the URL's scheme. Get either wrong and it doesn't fail: it fetches the page from your own IP.

5 min readTested on GNU Wget 1.25 · BusyBox 1.37
GNU wget uses only the lowercase https_proxy variable for https URLs; HTTPS_PROXY in capitals and http_proxy are ignored, and SOCKS is not supported.wget https://ipinfo.io/ip, four environments$ https_proxy=http://USER:PASS@…:9000 wget …through the proxy$ HTTPS_PROXY=http://USER:PASS@…:9000 wget …ignored, your own IP$ http_proxy=http://USER:PASS@…:9000 wget https://…ignored, your own IP$ https_proxy=socks5h://… wget …Unsupported schemeGNU Wget 1.25 · October 20, 2026

In short

For https:// URLs, wget uses https_proxy in lowercase and nothing else. Set it to http://via.proxies.vision:9000 and pass the login with --proxy-user and --proxy-password. Proxy tunneling failed: Proxy Authentication Required means that login was missing or wrong.

https_proxy (lowercase)--proxy-user / --proxy-password

wget picks the proxy by the scheme of the URL you fetch: https_proxy for https://, http_proxy for http://. GNU wget reads these names in lowercase only. Many tools, curl included, also accept HTTPS_PROXY in capitals, so an environment that works for everything else can leave wget going direct. We set one variable at a time and compared the IP wget reached the site from with our own:

proxiedhttps_proxy=http://USER:PASS@via.proxies.vision:9000the one wget uses
own IPHTTPS_PROXY=http://USER:PASS@via.proxies.vision:9000capitals are ignored
own IPhttp_proxy=… only, https:// URLwrong scheme
own IPhttps_proxy=… and no_proxy=ipinfo.iohost excluded
own IPhttps_proxy=… and --no-proxyproxy switched off

None of these printed a warning. The download succeeded, just not through the proxy. If it matters where a request comes from, check the IP once: wget -qO- https://ipinfo.io/ip through the proxy should not print your own address.

Login in the URL or in flags

http://USER:PASS@host:port in the variable works, but a password with @ in it breaks it: wget then tried to resolve ss@via.proxies.vision as the host. --proxy-user and --proxy-password (or proxy_user and proxy_password in ~/.wgetrc) need no escaping and keep the password out of the variable.

Every message, reproduced

GNU Wget 1.25.0 in Debian trixie against via.proxies.vision, https://ipinfo.io as the target.

What we setwget saysExit
Wrong password, or no loginProxy tunneling failed: Proxy Authentication RequiredUnable to establish SSL connection.4
Wrong password, http:// URLProxy request sent, awaiting response... 407 Proxy Authentication Required8
Username -country-usa, or Chicago with country deProxy tunneling failed: …Unable to establish SSL connection.4
https_proxy=socks5h://…Error parsing proxy URL socks5h://…: Unsupported scheme.8
No scheme: USER:PASS@host:9000Error parsing proxy URL …: Scheme missing.8
HTTP to the SOCKS port 11000Proxy tunneling failed: ?Unable to establish SSL connection.4
Password with @, not encodedunable to resolve host address 'ss@via.proxies.vision'4
Fig. 1 — wget’s last line for each case and its exit code, October 20, 2026.

wget hides the status code

For a refused tunnel, wget prints the proxy’s reason text and no number. On our gateway a username it can’t read (403) and filters no exit matches (465) each come with their own text, but you can’t tell the codes apart from wget’s output. Run the same login through curl -v -x http://via.proxies.vision:9000 -U USER:PASS https://ipinfo.io/ip once; curl prints the status. What each code means.

403 and 465

Targeting goes into the proxy username. 403 is a value the gateway can’t read, such as a three-letter country code or a session on the rotating port. 465 means no residential exit matches every filter right now: drop the narrowest one, usually the city.

No SOCKS in wget

GNU wget has no SOCKS support at all. Use our HTTP port 9000 with the same login, or switch to curl, which speaks SOCKS5: curl -x socks5h://via.proxies.vision:11000 -U USER:PASS https://ipinfo.io/ip.

Alpine images, and many other small containers, ship BusyBox’s wget, not GNU wget. It looks the same on the command line and behaves differently with proxies. We ran the same cases with BusyBox 1.37 in Alpine 3.22:

own IPhttps_proxy=http://USER:PASS@…:9000 wget https://…https_proxy is ignored
errorhttp_proxy=http://USER:PASS@…:9000 wget https://…error getting response: Resource temporarily unavailable
proxiedhttp_proxy=http://USER:PASS@…:9000 wget http://…plain http only
unrecognized option--proxy-user, --no-proxyGNU-only flags

Install the real one

apk add wget replaced it with GNU Wget 1.25 in our test, and https_proxy then worked as described above. In a Dockerfile, apk add --no-cache wget before the first download. Or install curl, which handles HTTPS through a proxy in BusyBox images too.

A setup that works

Both ran unchanged with GNU Wget 1.25, with PROXY_USER and PROXY_PASS set in the shell.

terminal
# Flags: nothing to escape, the login never goes into a URL
wget -qO- \
  -e use_proxy=yes \
  -e https_proxy=http://via.proxies.vision:9000 \
  -e http_proxy=http://via.proxies.vision:9000 \
  --proxy-user="$PROXY_USER-country-de" \
  --proxy-password="$PROXY_PASS" \
  https://ipinfo.io/json
txt
{
  "ip": "…",
  "city": "Köln",
  "country": "DE",
  …
~/.wgetrc
use_proxy = on
https_proxy = http://via.proxies.vision:9000
http_proxy = http://via.proxies.vision:9000
proxy_user = USER-country-de
proxy_password = PASS

A new IP per run

Each wget run opens a new connection, and port 9000 gives every connection a new exit. For the same IP across runs, add a session to the username and use port 10000: USER-country-de-session-job1-lifetime-10.

How do I use wget with a proxy that needs a username and password?
Set https_proxy (lowercase) to http://host:port and pass the login with ‑‑proxy-user and ‑‑proxy-password, or write it into the variable as http://user:pass@host:port. For http:// URLs wget reads http_proxy, so set both.
Why does wget ignore my HTTPS_PROXY variable?
GNU wget reads only the lowercase names https_proxy and http_proxy. With HTTPS_PROXY in capitals, wget 1.25 connected straight to the website from our own IP, without an error. curl and most libraries accept both spellings, which is why the same environment works for them.
What does 'Proxy tunneling failed: Proxy Authentication Required' mean?
The proxy refused to open a tunnel for an https:// URL because the login was missing or wrong. wget then gives up with 'Unable to establish SSL connection' and exit code 4. Check ‑‑proxy-user and ‑‑proxy-password, or the user:pass part of https_proxy.
Does wget support SOCKS5 proxies?
No. GNU wget rejects socks5:// and socks5h:// with 'Unsupported scheme'. Use the proxy's HTTP port, or curl with -x socks5h://host:port.
Why does wget in Alpine or BusyBox not use the proxy?
BusyBox wget, the default in Alpine images, ignored https_proxy in our test and fetched https:// URLs directly. Install GNU wget with apk add wget, or use curl.

Residential proxies, pay per GB

HTTP and SOCKS5. Country, city and sticky sessions in the username. No subscription.