Overview Introduction
A proxy error tells you which step of the connection failed, even when the message is short. This guide maps the errors you see in browsers, cURL, Python and scraping tools to that step, then gives the fixes in the order that solves most cases: the 407 login error first, then refused and silent connections, protocol mix-ups, TLS errors and blocks by the website. It applies to any proxy provider; notes for Fusion Proxy are marked.
Start here Find the Step That Fails
Every request through a proxy goes through the same steps: your machine looks up the proxy host, opens a TCP connection to it, logs in and asks for a tunnel (HTTP CONNECT or SOCKS5), sets up TLS with the website through that tunnel, and finally sends the request. Each error message belongs to one of these steps, and the step tells you where to look.
| Error you see | Step that failed | Most likely cause |
|---|---|---|
| 407 Proxy Authentication Required | Proxy login | Wrong username or password, special characters not encoded, or no traffic left on the plan |
| curl: (56) CONNECT tunnel failed, response 407 | Proxy login | The same as 407: the proxy refused the login for the tunnel |
| ERR_PROXY_CONNECTION_FAILED (Chrome) | TCP connect | Wrong host or port, the proxy is offline, or a firewall blocks the port |
| Connection refused, curl: (7) Failed to connect | TCP connect | Nothing listens on that port |
| ERR_TUNNEL_CONNECTION_FAILED (Chrome) | Tunnel | The proxy answered CONNECT with an error: login, a blocked site, or a failure on its side |
| Connection reset, Remote end closed connection | Tunnel | Wrong protocol for the port, an IP allowlist, or an overloaded proxy |
| Timed out | Any step | A firewall drops the packets, the wrong protocol, or a slow proxy |
| SSL or certificate errors | TLS | https:// used for an HTTP proxy, a wrong system clock, or TLS inspection on the network |
| 502, 503 or 504 from the proxy | Request | The proxy could not reach the website |
| 403, 429 or a captcha from the website | Request | The website blocks or rate-limits the exit IP |
Most common Fix 407 Proxy Authentication Required
The proxy needs a username and password and did not accept the ones it received, or received none. Work through these causes in order:
- Copy the credentials again. Copy the username and password from your provider's dashboard, without spaces or line breaks around them.
- Encode special characters inside a proxy URL. In
http://user:password@host:portthe characters@ : / ? # %in the password break the URL. Write@as%40,:as%3A,/as%2F,?as%3F,#as%23and%as%25. Tools that take the username and password in separate fields need no encoding. - Use a URL, not an export line. Many dashboards export proxies as
host:port:user:pass. That is a list format, not a proxy URL; write it ashttp://user:pass@host:port. - Check the plan. Many providers answer 407 when the traffic or the plan has run out.
- Check the username options. Providers read settings such as country or session from the username. A typo in that part is a different username, and the login fails.
- IP allowlist instead of a login. If your IP address is on the provider's allowlist, send no credentials at all, and make sure the request really leaves from that public IP.
Browsers add one more cause: Chrome and Chromium ignore a username and password written into --proxy-server. Send them with page.authenticate() in Puppeteer or the proxy option in Playwright instead (see the Puppeteer and Playwright guides).
1# a password with special characters, encoded in the URL
2curl -x "http://customer-1:p%40ss%3Aword@proxy.example.com:8080" https://example.com/
3
4# or keep the URL plain and pass the login separately (no encoding needed)
5curl -x http://proxy.example.com:8080 -U "customer-1:p@ss:word" https://example.com/
Step 1 Connection Refused, Timeouts and Resets
These errors happen before the login, so the username and password are not the problem.
- Connection refused: the host answered, but nothing listens on that port. Check the port against your dashboard. Providers often use different ports for HTTP and SOCKS5, and for rotating and sticky sessions.
- Timeout while connecting: the packets are dropped. The usual reasons are a wrong IP address, a firewall on a company network that blocks ports other than 80 and 443, or a provider that only accepts IP addresses on its allowlist. Try the same proxy from another network, such as a phone hotspot, to tell a local block from a proxy problem.
- Reset or closed during the handshake: the port speaks another protocol than the one in your URL (an HTTP port used as SOCKS5, or the other way round), the proxy drops clients that are not on its allowlist, or it is overloaded. A proxy that goes completely silent after the connection opens is almost always a protocol mismatch.
Step 2 HTTPS, SOCKS5 and Environment Variable Mix-ups
- https:// in front of the proxy.
https://proxy:portmeans TLS between you and the proxy itself. Almost every proxy sold as an "HTTPS proxy" is anhttp://proxy that tunnels HTTPS websites, so the right URL starts withhttp://. The wrong one ends in an SSL error such as "wrong version number". - socks5 or socks5h. With
socks5://your machine looks up the website's address and sends the IP to the proxy. Withsocks5h://the proxy looks it up. Usesocks5h://: your DNS stays private, sites blocked by your local DNS still work, and the lookup happens in the proxy's country. - HTTPS_PROXY=https://...
HTTPS_PROXYnames the proxy used for https:// websites. Its value is usuallyhttp://user:pass@host:port. - Only HTTP_PROXY set. cURL, Python and Go then send https:// requests directly, without the proxy. Set
HTTPS_PROXYtoo. - Uppercase and lowercase variables that differ. Tools do not agree on which one wins; cURL ignores uppercase
HTTP_PROXY. Keep one pair with the same value. - NO_PROXY. A host listed in
NO_PROXY(or a domain ending in an entry like.example.com) skips the proxy. - SOCKS5 in Chrome. Chromium does not support SOCKS5 proxies with a username and password; use the HTTP port in browsers.
1export HTTP_PROXY="http://user:pass@proxy.example.com:8080"
2export HTTPS_PROXY="http://user:pass@proxy.example.com:8080" # http://, not https://
3unset http_proxy https_proxy # no conflicting lowercase copies
Free tool Let proxy-monitor doctor Find the Problem
proxy-monitor doctor is a free, open-source command-line tool (MIT license) that checks one proxy and explains the result in plain language. It checks the URL as you typed it (export lines, unencoded characters, https:// and socks5:// mix-ups), your proxy environment variables, then connects once and shows which step failed, how long each step took, and what to try. Passwords are never printed.
Download it for Windows, macOS or Linux from GitHub, or install it with Go. To test one proxy from your browser instead, use the Proxy Tester; to clean a list of open proxies, use the Proxy Checker.
1go install github.com/FusionProxies/proxy-health-monitor/cmd/proxy-monitor@latest
2
3# password from the environment, so it stays out of your shell history
4PROXY_PASSWORD='p@ss:word' proxy-monitor doctor http://customer-1@proxy.example.com:8080
5
6# Result: auth_failed: the proxy rejected the username or password (HTTP 407)
7# What to try:
8# 1. copy the username and password again from your provider's dashboard
9# 2. percent-encode special characters in the password (@ as %40, : as %3A, # as %23)
10# ...
Step 3 When the Website Is the Problem
If the tunnel opens and the website answers with 403, 429, a captcha or a block page, the proxy works and the website does not accept its IP. Sites that fight automation, such as ticketing, travel, banking and government sites, block datacenter IP ranges most often, and some only accept IPs from their own country.
- Open a neutral page such as
https://example.com/through the same proxy. If that works, the block is on the website's side. - Try another exit IP: a new session on a rotating proxy, or another proxy from your list.
- Match the country the site expects, and use residential IPs for sites that block datacenter ranges.
- Slow down. A 429 means too many requests from one IP in a short time.
FAQ Frequently Asked Questions
What does 407 Proxy Authentication Required mean?
The proxy server requires a login and did not accept the one it received, or received none. It comes from the proxy, not from the website.
Why does my proxy work in cURL but not in Chrome?
Chrome ignores a username and password in --proxy-server, and it does not support SOCKS5 with a login. Pass the login through your automation tool (for example page.authenticate()) or use an IP allowlist.
How do I use a password with @ or : in a proxy URL?
Percent-encode it: @ becomes %40 and : becomes %3A. Or pass the username and password separately, for example with cURL's -U option.
What is the difference between 401 and 407?
401 comes from the website and asks for the website's own login. 407 comes from the proxy and asks for the proxy login.
Why do I get ERR_TUNNEL_CONNECTION_FAILED?
Chrome asked the proxy to open a tunnel to the website and the proxy answered with an error. Check the login first, then whether the proxy allows that website and port, then whether the website is up.
Should I use socks5:// or socks5h://?
Use socks5h://. The proxy then resolves the website's name, so your DNS lookups do not leave from your own network and the site sees a lookup from the proxy's location.
Summary Conclusion
Most proxy errors come down to the login, the port or the protocol. Find the step that fails, fix that step, and test again with one request before you run your whole job.