---
title: "ERR_TUNNEL_CONNECTION_FAILED: causes and fixes"
url: https://proxy.wiki/guides/err-tunnel-connection-failed/
type: Guide
author: "proxy.wiki editorial"
published: 2026-10-21
updated: 2026-10-21
site: proxy.wiki
topics: ["Proxy fundamentals"]
license: CC BY 4.0; quote freely with attribution to https://proxy.wiki/
---

# ERR_TUNNEL_CONNECTION_FAILED: causes and fixes

> What Chrome's ERR_TUNNEL_CONNECTION_FAILED means, each cause we reproduced with real proxies, and how to find and fix the one you have.

## Key takeaways

- ERR_TUNNEL_CONNECTION_FAILED (net error -111) means a proxy answered Chrome's CONNECT with something other than 200 or a usable 407.
- Chrome discards the proxy's error body on purpose, so check the real answer with curl -v, a raw CONNECT probe or a chrome://net-export log.
- Only HTTPS shows it: plain http:// pages through the same proxy display the proxy's own error page instead.
- A dead proxy gives ERR_PROXY_CONNECTION_FAILED and a silent or wrong-protocol proxy gives ERR_EMPTY_RESPONSE, so the code itself narrows the cause.
- A Cloudflare 10xx page means the tunnel worked and the site's owner blocked the request; a proxy hostname behind Cloudflare gets a 400 to CONNECT.

`ERR_TUNNEL_CONNECTION_FAILED` is what Chrome, Edge, Opera and every other Chromium browser show when they asked a proxy to open a tunnel to an HTTPS site and the proxy did not agree. Chromium lists it as net error -111, “A tunnel connection through the proxy could not be established.” Your browser never exchanged a byte with the website. The problem is the proxy, or the fact that a proxy is in the path at all.

This is the page Chrome 155 rendered when we pointed it at a test proxy that answered `403 Forbidden`:

```
This site can’t be reached

The web page at https://127.0.0.1:39543/ might be temporarily down or it may have moved permanently to a new web address.

ERR_TUNNEL_CONNECTION_FAILED
```

The wording misleads. The site was up the whole time. Chrome also hides what the proxy said, so every fix below starts with finding that out.

## What the error actually means

For an `https://` address, a browser that uses an HTTP proxy first sends an [HTTP CONNECT](/glossary/http-connect/) request naming the host and port. It waits for the proxy’s answer and only then starts TLS with the site, through the tunnel. [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6) is plain about the rule: a 2xx answer means the tunnel is open, and any other answer means it is not.

Chromium’s handling of that answer fits on one screen. In `net/http/http_proxy_client_socket.cc`, a 200 opens the tunnel, a 407 starts proxy sign-in, and every other status code ends here:

```
switch (response_.headers->response_code()) {
  case 200:  // OK
    if (http_stream_parser_->IsMoreDataBuffered())
      // The proxy sent extraneous data after the headers.
      return ERR_TUNNEL_CONNECTION_FAILED;
    ...
  case 407:  // Proxy Authentication Required
    ...
  default:
    // Ignore response to avoid letting the proxy impersonate the target
    // server.  (See http://crbug.com/137891.)
    return ERR_TUNNEL_CONNECTION_FAILED;
}
```

Two things follow from those lines.

- **Chrome discards the proxy’s explanation on purpose.** A proxy allowed to render its own page under the site’s address could impersonate the site. In our Squid test the thrown-away body was a 3,863-byte page that said, in so many words, `Unable to determine IP address from host name pw-test.invalid`.

- **Only HTTPS shows this error.** A plain `http://` page is sent to the proxy as an ordinary request, so the same refusing proxy gets its own error page displayed and Chrome reports no net error at all. We confirmed that with the 403 test proxy.

The source comment adds that Squid reports DNS errors with a 404. Squid 6.13 sent `503 Service Unavailable` instead, with an `X-Squid-Error: ERR_DNS_FAIL 0` header.

## What each kind of broken proxy produces in Chrome

**How these results were produced.** We ran everything on 21 October 2026, on one Mac (macOS 26.6.2, arm64). Squid 6.13 and a Python script exposing eleven test proxies listened on 127.0.0.1: ten built to fail one way each, one working relay as the control. A local HTTPS server was the destination. Clients were Google Chrome 155.0.8059.85 headless, driven over the DevTools protocol so the exact `errorText` of each navigation could be read; curl 8.7.1; Python 3.9.6 with requests 2.32.3 and httpx 0.27.2; and Node.js v24.2.0. Each client ran each case once. The Cloudflare rows are single requests to the Cloudflare edge in front of this site’s own hostname. Chrome was started with `--proxy-bypass-list="<-loopback>"`, because [Chromium never proxies 127.0.0.1 by default](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md).

| What the proxy did | Chrome 155 reported |
| --- | --- |
| Answered 403 Forbidden | ERR_TUNNEL_CONNECTION_FAILED |
| Answered 502 Bad Gateway | ERR_TUNNEL_CONNECTION_FAILED |
| Squid: 503, X-Squid-Error: ERR_DNS_FAIL 0 | ERR_TUNNEL_CONNECTION_FAILED |
| Squid: 503, X-Squid-Error: ERR_CONNECT_FAIL 61 | ERR_TUNNEL_CONNECTION_FAILED |
| Squid: 403, X-Squid-Error: ERR_ACCESS_DENIED 0 (port 8443) | ERR_TUNNEL_CONNECTION_FAILED |
| A web server, not a proxy: 501 Unsupported method ('CONNECT') | ERR_TUNNEL_CONNECTION_FAILED |
| Cloudflare edge: 400 Bad Request, Server: cloudflare | ERR_TUNNEL_CONNECTION_FAILED |
| 200 Connection established with extra bytes after the headers | ERR_TUNNEL_CONNECTION_FAILED |
| 407, no credentials available | ERR_INVALID_AUTH_CREDENTIALS |
| 407, credentials written into --proxy-server | ERR_NO_SUPPORTED_PROXIES |
| 407, wrong credentials supplied over DevTools | ERR_TOO_MANY_RETRIES |
| Closed the connection without answering | ERR_EMPTY_RESPONSE |
| A SOCKS5-only server configured as http:// | ERR_EMPTY_RESPONSE |
| Answered with a line that is not HTTP | ERR_INVALID_HTTP_RESPONSE |
| 200, then dropped the connection | ERR_CONNECTION_RESET |
| 200, then TLS with a certificate from its own CA | ERR_CERT_AUTHORITY_INVALID |
| Nothing listening on the proxy port | ERR_PROXY_CONNECTION_FAILED |
| https:// proxy scheme against Squid’s plain port | ERR_PROXY_CONNECTION_FAILED |
| Accepted the connection and never answered | No error within our 20 s probe limit |

Read the table as a rule. `ERR_TUNNEL_CONNECTION_FAILED` means the proxy answered in valid HTTP with something other than a 200 or a 407 Chrome could act on. A proxy that is unreachable, silent or speaking another protocol gets a different code. That alone rules out much of the usual advice about DNS caches and firewalls.

## The causes, most common first

The order is our judgement, based on the Chromium source and on what the top search results and browser forums describe. It is not a measured frequency.

### 1. A proxy is configured that you did not choose

Often nobody set a proxy on purpose. Something else did: a VPN app, a browser’s built-in VPN, an extension, a PAC file pushed by an employer, or unwanted software. Extensions can change the browser’s proxy through the [chrome.proxy API](https://developer.chrome.com/docs/extensions/reference/api/proxy). Opera’s forum has [threads of users](https://forums.opera.com/topic/72204/err_tunnel_connection_failed-when-trying-to-use-the-vpn) meeting the error with Opera’s free VPN switched on.

The fastest test is to start Chrome once with every proxy setting ignored. We ran this with a refusing proxy also configured, and the page loaded:

```
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --no-proxy-server --user-data-dir=/tmp/chrome-noproxy https://example.com/
```

On Windows, pass the same flag to `chrome.exe`. If the page loads, a proxy setting is the cause. Then find out which one. On macOS, `scutil --proxy` prints what the system hands to Chrome. A Mac with no proxy set shows only this:

```
$ scutil --proxy
<dictionary> {
  ExceptionsList : <array> {
    0 : *.local
    1 : 169.254/16
  }
  FTPPassive : 1
}
```

Anything more, such as an HTTPS proxy host or an auto-configuration URL, came from somewhere. On Windows the same settings live under Settings, Network & internet, Proxy. Check `chrome://extensions` for anything that manages proxies, and the VPN app’s own settings. The fix is to switch off the VPN or extension, remove the system proxy, or ask whoever manages the device.

### 2. The proxy refused the destination

The proxy works, but its policy says no. Company and school filters do this, proxy services may block whole categories of site, and many proxies limit which ports may be tunnelled. RFC 9110 tells proxies they SHOULD restrict CONNECT to a known set of ports. Squid’s default configuration does exactly that:

```
acl SSL_ports port 443
http_access deny CONNECT !SSL_ports
```

So `https://example.com/` works through a stock Squid and `https://example.com:8443/` fails. This is what Squid 6.13 logged for our port-8443 attempt, and what curl printed:

```
TCP_DENIED/403 CONNECT localhost:8443 - - ERR_ACCESS_DENIED/-

curl: (56) CONNECT tunnel failed, response 403
```

An [IP allowlist](/glossary/ip-whitelisting/) that no longer includes your address can look the same, depending on whether the proxy answers 403 or 407. Fix: use port 443 where the service offers it, or ask the operator to allow the destination. On your own Squid, add the port to `SSL_ports` (`acl SSL_ports port 443 8443`) and reload.

### 3. The proxy could not reach the site

Here the proxy tried and failed: it could not resolve the name, the site refused the connection, or the connection timed out. You get a 502, 503 or 504 at the proxy and `ERR_TUNNEL_CONNECTION_FAILED` in the browser. Squid 6.13 wrote these lines for a nonexistent domain and for a closed port:

```
TCP_TUNNEL/503 CONNECT pw-test.invalid:443 - - ERR_DNS_FAIL/-
TCP_TUNNEL/503 CONNECT 127.0.0.1:443 - 127.0.0.1 ERR_CONNECT_FAIL/errno=61
```

Errno 61 is “connection refused” on macOS. One run surprised us. Squid resolved `localhost` to `::1`, our test server listened only on IPv4, and the result was the same 503. The name resolved differently at the proxy than it did for us, which is the general shape of this cause. Internal hostnames, split DNS and VPN-only addresses can resolve on your laptop and fail at the proxy.

To check, run the request from the proxy host itself (`curl -v https://site/` there), or read the proxy’s log. Fix the name, or route internal hosts around the proxy with `NO_PROXY`, as described in [HTTP_PROXY, HTTPS_PROXY and NO_PROXY explained](/guides/proxy-environment-variables/). Chromium does define a separate code for this case, `ERR_PROXY_UNABLE_TO_CONNECT_TO_DESTINATION` (-186), but with an ordinary HTTP proxy Chrome 155 still reported -111 in every run.

### 4. Proxy sign-in went wrong

A 407 is the one non-200 answer Chrome does not treat as fatal. On a desktop it opens a sign-in prompt. According to a comment in the same source file, cancelling that prompt is the path that ends in `ERR_TUNNEL_CONNECTION_FAILED`. We did not reproduce the desktop prompt. In headless Chrome, the three ways to get it wrong produced three different codes:

- No credentials at all: `ERR_INVALID_AUTH_CREDENTIALS`.

- Credentials typed into the flag, `--proxy-server=http://user:pass@host:port`: `ERR_NO_SUPPORTED_PROXIES`. Chromium’s documentation says Chrome will not use credentials embedded in proxy settings, and in our test it rejected the whole entry.

- Wrong credentials answered through DevTools: `ERR_TOO_MANY_RETRIES`.

In automation, pass credentials the way the tool expects. Playwright takes `username` and `password` next to `server` in its [proxy option](https://playwright.dev/docs/network); Puppeteer has [page.authenticate()](https://pptr.dev/api/puppeteer.page.authenticate). With raw DevTools, which is what we used, enable auth interception and answer the challenge. This is the part of our probe that did it, run on Node v24.2.0 against Chrome 155:

```
await send('Fetch.enable', { handleAuthRequests: true }, sessionId);

// inside the WebSocket message handler, for every Fetch.authRequired event
if (m.method === 'Fetch.authRequired') {
  send('Fetch.continueWithAuth', { requestId: m.params.requestId, authChallengeResponse:
    { response: 'ProvideCredentials', username: auth.split(':')[0], password: auth.split(':')[1] } }, m.sessionId);
}
```

If a proxy service answers bad credentials or an empty balance with a code other than 407, Chrome shows `ERR_TUNNEL_CONNECTION_FAILED` and nothing about sign-in. The probe script further down shows which code your proxy actually sends. [403 vs 407 vs 429](/guides/403-vs-407-vs-429/) covers reading those codes, and [proxy authentication](/glossary/proxy-authentication/) the schemes themselves.

### 5. The proxy address is a web server or a CDN

A typo in the port, or a hostname that points somewhere else, sends your CONNECT to something that is not a forward proxy. Python 3.15’s built-in `http.server` answered `HTTP/1.0 501 Unsupported method ('CONNECT')`. Cloudflare’s edge, in front of this site’s hostname, answered this on port 80:

```
$ printf 'CONNECT example.com:443 HTTP/1.1\r\nHost: example.com:443\r\n\r\n' | nc proxy.wiki 80
HTTP/1.1 400 Bad Request
Server: cloudflare
Content-Type: text/html
Content-Length: 155
Connection: close
CF-RAY: -
```

Port 8080 gave the same 400, since Cloudflare [listens on 8080 as an HTTP port](https://developers.cloudflare.com/fundamentals/reference/network-ports/). Port 3128 timed out, curl exit 28. If you run a proxy on a hostname managed in Cloudflare, the record must be [DNS-only](https://developers.cloudflare.com/dns/proxy-status/), or clients must use the server’s IP. More on Cloudflare below.

### 6. The proxy speaks a different protocol

A SOCKS5 conversation starts with the version byte 5, per [RFC 1928](https://www.rfc-editor.org/rfc/rfc1928.html). Our SOCKS5-only test server, set up as an `http://` proxy, read the letter C of `CONNECT` instead and dropped the connection. Chrome reports `ERR_EMPTY_RESPONSE` and curl reports `(56) Proxy CONNECT aborted`, so this is not strictly our error, but the two get mixed up all the time. Use `socks5://host:port` for a [SOCKS5](/glossary/socks5/) proxy. The reverse mistake, `https://` for a proxy that speaks plain HTTP, gave `ERR_PROXY_CONNECTION_FAILED` against Squid and a timeout against a proxy that waited for more input.

### 7. The proxy broke the reply format

RFC 9110 says a server MUST NOT send `Content-Length` or `Transfer-Encoding` in a 2xx reply to CONNECT, because everything after the headers belongs to the tunnel. Our test proxy sent `200 Connection established` and then a greeting line in the same write. Chrome rejected it as extra data, exactly as the source says. curl 8.7.1 instead fed those bytes to its TLS library and failed with `(35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version`. Only the proxy software can fix this one.

### 8. TLS interception (usually a different error)

An intercepting proxy accepts the CONNECT, then presents a certificate it signed itself. Chrome showed `ERR_CERT_AUTHORITY_INVALID`; curl printed `(60) SSL certificate problem: self signed certificate`. A certificate error means the tunnel opened and something re-signed the site, which is a separate problem covered under [TLS interception](/glossary/tls-interception/). Interception produces `ERR_TUNNEL_CONNECTION_FAILED` only when its policy refuses the CONNECT outright, which is cause 2.

**A fallback proxy list will not catch this.** Chromium’s proxy documentation says that since Chrome 67 only connection-level failures, such as a dead proxy, trigger fallback to the next entry. A refused CONNECT does not. We checked: with `--proxy-server="http://127.0.0.1:39101,direct://"` and a proxy answering 403, Chrome 155 still showed `ERR_TUNNEL_CONNECTION_FAILED`. With a dead first proxy it fell back to a direct connection and the page loaded.

## Finding out what the proxy actually said

Because the browser hides the answer, ask the proxy directly. `curl -v` prints the CONNECT exchange (more in [How to use a proxy with curl](/guides/how-to-use-a-proxy-with-curl/)):

```
$ curl -v -p -x http://127.0.0.1:39128 https://pw-test.invalid/ -o /dev/null
* Establish HTTP proxy tunnel to pw-test.invalid:443
> CONNECT pw-test.invalid:443 HTTP/1.1
> Host: pw-test.invalid:443
> User-Agent: curl/8.7.1
>
< HTTP/1.1 503 Service Unavailable
< Server: squid/6.13
< Content-Type: text/html;charset=utf-8
< X-Squid-Error: ERR_DNS_FAIL 0
<
* CONNECT tunnel failed, response 503
```

Where curl is not available, this standard-library script sends one CONNECT and prints the reply headers. We ran it with Python 3.15.0:

```
#!/usr/bin/env python3
"""usage: python3 connect_probe.py PROXY_HOST PROXY_PORT TARGET_HOST:PORT [user:pass]"""
import base64, socket, sys

host, port, target = sys.argv[1], int(sys.argv[2]), sys.argv[3]
lines = [f"CONNECT {target} HTTP/1.1", f"Host: {target}"]
if len(sys.argv) > 4:
    token = base64.b64encode(sys.argv[4].encode()).decode()
    lines.append(f"Proxy-Authorization: Basic {token}")
req = ("\r\n".join(lines) + "\r\n\r\n").encode()

with socket.create_connection((host, port), timeout=10) as s:
    s.sendall(req)
    data = b""
    try:
        while b"\r\n\r\n" not in data and len(data) < 65536:
            chunk = s.recv(4096)
            if not chunk:
                break
            data += chunk
    except socket.timeout:
        print("no answer within 10 s")
if not data:
    print("proxy closed the connection without answering")
else:
    print(data.split(b"\r\n\r\n", 1)[0].decode("latin-1"))
```

```
$ python3 connect_probe.py 127.0.0.1 39128 pw-test.invalid:443
HTTP/1.1 503 Service Unavailable
Server: squid/6.13
Mime-Version: 1.0
Date: Wed, 21 Oct 2026 19:44:04 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3644
X-Squid-Error: ERR_DNS_FAIL 0
Vary: Accept-Language
Content-Language: en
```

Inside Chrome, open `chrome://net-export`, start logging, reproduce the failure and stop. The [Chromium instructions](https://www.chromium.org/for-testers/providing-network-details/) cover the details. In the saved JSON, look for the event `HTTP_TRANSACTION_READ_TUNNEL_RESPONSE_HEADERS`. Ours held the answer Chrome never showed on screen:

```
HTTP_TRANSACTION_READ_TUNNEL_RESPONSE_HEADERS
  "HTTP/1.1 503 Service Unavailable", "Server: squid/6.13",
  "Content-Length: 3863", "X-Squid-Error: ERR_DNS_FAIL 0", ...
HTTP_PROXY_CONNECT_JOB_CONNECT  net_error: -111
```

## The same failures in curl, Python and Node

Libraries are more honest than the browser. Each one below printed the proxy’s status line, except Node’s `fetch`. Cells with a dash were not run for that client.

| Proxy answer | curl 8.7.1 | requests 2.32.3 | httpx 0.27.2 | Node v24.2.0 fetch |
| --- | --- | --- | --- | --- |
| 403 Forbidden | (56) CONNECT tunnel failed, response 403 | ProxyError … Tunnel connection failed: 403 Forbidden | ProxyError: 403 Forbidden | fetch failed, cause Request was cancelled. |
| 502 Bad Gateway | (56) CONNECT tunnel failed, response 502 | Tunnel connection failed: 502 Bad Gateway | ProxyError: 502 Bad Gateway | — |
| 407, wrong credentials | (56) CONNECT tunnel failed, response 407 | Tunnel connection failed: 407 Proxy Authentication Required | ProxyError: 407 Proxy Authentication Required | fetch failed, cause Request was cancelled. |
| Squid 503, DNS failure | (56) CONNECT tunnel failed, response 503 | Tunnel connection failed: 503 Service Unavailable | ProxyError: 503 Service Unavailable | — |
| Closed without answering | (56) Proxy CONNECT aborted | ConnectionError, RemoteDisconnected | RemoteProtocolError: Server disconnected without sending a response. | Never settled on its own (see below) |
| Nothing on the proxy port | (7) Failed to connect to 127.0.0.1 port 39199 … Couldn't connect to server | ProxyError … [Errno 61] Connection refused | ConnectError: [Errno 61] Connection refused | fetch failed, cause ECONNREFUSED |

Two of these mislead. requests wrapped every tunnel refusal we produced in the words `Unable to connect to proxy`, even when it connected fine and the proxy answered. Read the status line at the end instead. Node’s `fetch` with `NODE_USE_ENV_PROXY=1` gave the same cause for a 403 and a 407, so it cannot tell you which happened. Node’s lower-level `http.request({ method: 'CONNECT' })` does show it: `CONNECT -> 403 Forbidden`. Client setup for each library is in [Using proxies in Python](/guides/proxies-in-python-requests-httpx/) and [Using proxies in Node.js](/guides/proxies-in-nodejs/).

_Cumulative CONNECT requests from one fetch() call, Node v24.2.0, proxy closes without answering, loopback, one run, 21 October 2026_

| Seconds after fetch() | CONNECT requests received |
| --- | --- |
| 1 | 1403 |
| 2 | 3373 |
| 3 | 5225 |
| 4 | 6860 |
| 5 | 8017 |
| 6 | 10082 |
| 7 | 11903 |
| 8 | 13160 |

**Bound every proxied fetch in Node.** Against a test proxy that read the CONNECT and closed without replying, a single `fetch()` on Node v24.2.0 with `NODE_USE_ENV_PROXY=1` sent the CONNECT again and again: 13,160 times in 8 seconds. An `AbortSignal.timeout(5000)` rejected the promise at 5,000 ms, but the requests kept coming until we ended the process at 8 seconds. This was one run on loopback, so the rate reflects a proxy with no network latency, and we did not retest on newer Node releases. The [Node documentation](https://nodejs.org/api/cli.html#node_use_env_proxy1) marks the feature as active development. Put a timeout on every proxied request, check the proxy’s log the first time you use the feature, and test on the Node release you actually deploy.

## Cloudflare and the 10xx error codes

Cloudflare comes up with this error in two unrelated ways.

**The proxy’s hostname is behind Cloudflare.** Cloudflare’s edge is not a forward proxy, so it answers CONNECT with the 400 shown under cause 5 and Chrome reports `ERR_TUNNEL_CONNECTION_FAILED`. Plain HTTP through the same “proxy” produces Cloudflare’s own codes instead. A proxied request for a host that is not on Cloudflare returned `409 Conflict` with the body `error code: 1001`. A request sent straight to a Cloudflare IP address, with the IP as the hostname, returned `403 Forbidden` with `error code: 1003`. Cloudflare documents [1001](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1001/) as a request sent to a Cloudflare IP for a domain that is not on Cloudflare, and [1003](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1003/) as direct access to a Cloudflare IP. For the person running the proxy, the fix is a DNS-only record.

**The tunnel worked and the website blocked the request.** Then you do not see `ERR_TUNNEL_CONNECTION_FAILED` at all. You see a Cloudflare page with a code in the 1000s, served by the site through a tunnel that opened fine. Each code is a choice the site owner configured, or a fault in the owner’s setup. [Cloudflare’s reference](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/) describes them like this:

| Code | HTTP | What Cloudflare says it means | If you are the visitor | If you run the site |
| --- | --- | --- | --- | --- |
| 1000 | 403 | DNS points to a prohibited IP. Also returned when X-Forwarded-For is longer than 100 characters, appears twice, or a CF-Connecting-IP header is present | A proxy chain that keeps appending [X-Forwarded-For](/glossary/x-forwarded-for/) can trigger it; try with one hop fewer | Point the record at the origin, not a Cloudflare IP, and remove any reverse proxy that loops back through Cloudflare |
| 1005 | 403 | The owner banned the network ([ASN](/glossary/asn/)) your address belongs to | Send the owner a screenshot of the error | Find the Ray ID in Security Events and review IP Access rules |
| 1006, 1007, 1008 | 403 | The owner banned your IP address | Ask the owner; Cloudflare support cannot override it | Review the security setting that matched |
| 1009 | 403 | The owner banned your country or region | Ask the owner to allow your address | Check IP Access rules |
| 1010 | 403 | Blocked on the browser’s signature | Notify the owner | Browser Integrity Check can be turned off in security settings |
| 1012 | 403 | Blocked for malicious activity seen from your network | Scan your device; contact the owner | Review the rule and the reported address |
| 1015 | 429 | You are being rate limited | Wait; retrying quickly can extend the block | Review the [rate-limiting](/glossary/rate-limiting/) thresholds |
| 1020 | 403 | A security rule with a Block action matched | Send the owner the error with its Ray ID | Search Security Events for the Ray ID to find the rule |

None of these is a proxy fault. Cloudflare’s guidance to visitors for most of them is to contact the site owner. If a code appears only when you browse through a proxy, the rule is matching the proxy’s address or network, not your own.

## Cause-to-fix table

| What you see | What happened | How to check | Fix |
| --- | --- | --- | --- |
| Error on every HTTPS site, and you never set a proxy | A VPN, extension, PAC file or system setting added one | Start Chrome with --no-proxy-server; run scutil --proxy or open the Windows proxy settings | Turn off the VPN or extension, or remove the proxy |
| Error on some sites or ports only | Proxy policy answered 403 | curl -v -p -x shows < HTTP/1.1 403 | Use port 443 or ask the operator to allow the destination |
| Error on one hostname that works without the proxy | Proxy could not resolve or reach it (502, 503, 504) | Proxy log, or curl -v from the proxy host | Fix the name or DNS at the proxy, or bypass with NO_PROXY |
| Error after a sign-in prompt was dismissed | 407 not answered | Probe script with and without user:pass | Enter or correct the proxy credentials |
| ERR_NO_SUPPORTED_PROXIES in automation | Credentials inside --proxy-server | Look at the launch arguments | Use Playwright’s username/password or page.authenticate() |
| Error with a new proxy address | It is a web server or a CDN (501, 400 from Cloudflare) | Probe script shows Server: cloudflare or a 501 | Use the proxy’s real host and port; DNS-only record |
| Error from a proxy that “says 200” | Extra bytes after the 200 headers | Raw capture with nc or the probe | Fix or replace the proxy software |
| ERR_EMPTY_RESPONSE instead | Wrong protocol, usually SOCKS set as HTTP | Probe prints “closed the connection without answering” | Use socks5:// |
| ERR_CERT_AUTHORITY_INVALID instead | TLS interception; the tunnel worked | Inspect the certificate issuer | Install the organisation’s CA or get an exemption |
| ERR_PROXY_CONNECTION_FAILED instead | Proxy unreachable | curl exit 7 | Correct the host and port, or start the proxy |
| A Cloudflare page with a 10xx code | Tunnel worked; the site blocked you | Read the code and Ray ID | Contact the site owner |

## Frequently asked questions

### Is ERR_TUNNEL_CONNECTION_FAILED a problem with the website?

Almost never. Chrome raises it after reading the proxy's answer to CONNECT, before any traffic reaches the site. The site can be perfectly healthy. The exception is a site the proxy cannot reach, where the proxy reports that with a 502 or 503.

### Why do http:// sites load while https:// sites fail?

For ordinary page loads, only HTTPS uses a CONNECT tunnel. Plain HTTP requests are handed to the proxy whole, so a refusal comes back as a normal page that Chrome displays. In our test, the proxy that caused ERR_TUNNEL_CONNECTION_FAILED on HTTPS simply showed its own 403 page on HTTP.

### What is the difference from ERR_PROXY_CONNECTION_FAILED?

ERR_PROXY_CONNECTION_FAILED (-130) means Chrome could not reach the proxy at all: wrong host, wrong port, or nothing listening. ERR_TUNNEL_CONNECTION_FAILED (-111) means it reached the proxy and the proxy said no. Chromium's own comment on -130 says it does not cover failures during CONNECT.

### Why does Puppeteer or Playwright report net::ERR_TUNNEL_CONNECTION_FAILED?

When they drive Chromium, they use the same network code, so the meaning is identical: the proxy answered CONNECT with an error. Check the proxy's reply with curl or the probe script. If the proxy needs a password, pass it through the tool's proxy credentials rather than inside --proxy-server, which Chrome 155 rejected with ERR_NO_SUPPORTED_PROXIES.

### Will clearing the cache or flushing DNS fix it?

Not by itself. The error comes from the proxy's live answer to CONNECT, and no browser cache stores that. Flushing local DNS can matter only when the proxy's own hostname resolves to the wrong place.

### Can a VPN cause this error?

Yes, when the VPN works by setting a proxy for the browser, as browser VPNs and proxy extensions do. If the VPN's server refuses or fails the CONNECT, you get this error. Turn the VPN off and test again to confirm.

## Sources

1. [Chromium source: net_error_list.h (TUNNEL_CONNECTION_FAILED is -111)](https://chromium.googlesource.com/chromium/src/+/main/net/base/net_error_list.h)
2. [Chromium source: http_proxy_client_socket.cc, CONNECT response handling](https://chromium.googlesource.com/chromium/src/+/main/net/http/http_proxy_client_socket.cc)
3. [Chromium: Proxy support in Chrome (implicit bypass, credentials, fallback)](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md)
4. [Chromium: capturing a NetLog with chrome://net-export](https://www.chromium.org/for-testers/providing-network-details/)
5. [RFC 9110 section 9.3.6: CONNECT](https://www.rfc-editor.org/rfc/rfc9110.html#section-9.3.6)
6. [RFC 1928: SOCKS Protocol Version 5](https://www.rfc-editor.org/rfc/rfc1928.html)
7. [Squid configuration reference: http_access and the default CONNECT port rule](https://www.squid-cache.org/Doc/config/http_access/)
8. [libcurl error codes (7, 28, 35, 56, 60)](https://curl.se/libcurl/c/libcurl-errors.html)
9. [Node.js CLI documentation: NODE_USE_ENV_PROXY](https://nodejs.org/api/cli.html#node_use_env_proxy1)
10. [Chrome extensions: chrome.proxy API](https://developer.chrome.com/docs/extensions/reference/api/proxy)
11. [Playwright: HTTP proxy configuration](https://playwright.dev/docs/network)
12. [Puppeteer: Page.authenticate()](https://pptr.dev/api/puppeteer.page.authenticate)
13. [Opera forums: ERR_TUNNEL_CONNECTION_FAILED with the browser VPN](https://forums.opera.com/topic/72204/err_tunnel_connection_failed-when-trying-to-use-the-vpn)
14. [Cloudflare: 1xxx errors reference](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/)
15. [Cloudflare: Error 1000](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1000/)
16. [Cloudflare: Error 1001](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1001/)
17. [Cloudflare: Error 1003](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1003/)
18. [Cloudflare: Error 1005](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1005/)
19. [Cloudflare: Errors 1006, 1007, 1008](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1006/)
20. [Cloudflare: Error 1009](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1009/)
21. [Cloudflare: Error 1010](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1010/)
22. [Cloudflare: Error 1012](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1012/)
23. [Cloudflare: Error 1015](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1015/)
24. [Cloudflare: Error 1020](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1020/)
25. [Cloudflare: network ports it proxies](https://developers.cloudflare.com/fundamentals/reference/network-ports/)
26. [Cloudflare: proxied and DNS-only records](https://developers.cloudflare.com/dns/proxy-status/)
