# When Chrome falls back to a direct connection

> Chrome falls back to a direct connection only when DIRECT is in its proxy list or a PAC file fails to load. A dead proxy should break the page.

Source: https://mosaicbrowser.com/blog/chrome-proxy-fallback-to-direct

## When Chrome falls back to a direct connection

Chrome falls back to a direct connection only when DIRECT is in its proxy list or a PAC file fails to load. A dead proxy should break the page.

![A dead proxy has to fail closed, beside a screenshot: a proxy check result in Mosaic: latency, IP address, ISP, HTTPS support and reputation](https://mosaicbrowser.com/covers/chrome-proxy-fallback-to-direct.webp)

Chrome falls back to a direct connection in two cases: when `DIRECT` is one of the entries in the proxy list it was given, and when a PAC file it was told to use cannot be fetched. Start it with `--proxy-server=http://127.0.0.1:47119` and nothing after the address, kill whatever listens there, and you get `ERR_PROXY_CONNECTION_FAILED` and nothing else. That error page is what you want to see, because the fallback is indistinguishable from a working proxy.

## How Chrome's proxy list works

Chromium resolves every request to a list of proxies, tried in order, and `net/docs/proxy.md` in its source tree calls stepping down that list "proxy fallback". `DIRECT` is just another entry. In a PAC file it is the word `DIRECT`; on the command line it is `direct://`. So `--proxy-server="http://gate.example:8080,direct://"` reads as: try the gateway, and on failure leave from this machine's own address.

Not every failure moves Chrome down the list. A refused socket, a reset or a timeout does. A gateway that accepts the connection and then answers with an error does not; you see its error. Then there is the retry memory. If the gateway failed and the next entry worked, Chrome marks the gateway bad and moves it to the back of the list for a while, so for a stretch afterwards requests go straight to `DIRECT` without trying it. The same document says no setting turns that cache off.

Put those together with a PAC file that ends `PROXY gate.example:8080; DIRECT`. The gateway resets one connection. That request goes out direct and succeeds, the gateway lands in the bad list, and everything after it leaves from your home address until the entry expires. Every tab keeps loading. The address bar shows no warning.

## The PAC file that never arrived

The second case has no `DIRECT` in it at all. The settings name a PAC URL, the server hosting it is down, and Chrome carries on to the next option, which is usually no proxy. Chrome's managed policies can mark a PAC script as mandatory, and then Chrome refuses the fallback and fails the request instead. Without that policy, a PAC on a dead server turns into no proxy at all, without a word.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: A new IP for every profile](https://mosaicbrowser.com/features/proxy-providers)

## Why a fallback is worse than an error

An `ERR_PROXY_CONNECTION_FAILED` page costs you a reload. A fallback costs you the address: the site you opened through a Frankfurt IP now sees your ISP in Leeds, and nothing on screen says so. For a Mosaic profile it is worse again, because the profile's timezone, `Accept-Language` and geolocation were set from the IP. After the fallback the site gets a Berlin timezone from a Leeds address, which is a contradiction a consistency scanner checks first.

That is the line in our engineering notes from 2026-09-18, when the proxy check was written: a browser that quietly falls back to the direct connection looks, from outside, exactly like everything working. It also decided where the check takes its readings. A browser that has gone around its proxy will still report that it is using one, so the check asks the proxy instead.

## What Mosaic gives Chrome

Mosaic launches every profile in Tesseract Chrome, our own Chromium build, and `args.ts` pushes exactly one `--proxy-server` value: a local address on your computer, where Mosaic logs in to the profile's proxy for Chrome. Nothing follows it, so there is no `direct://` to fall back to, and no PAC is passed beside it. Three other switches go with it:

- `--proxy-bypass-list=<-loopback>`. Chrome normally lets `localhost` skip the proxy; `<-loopback>` removes that exception, so a page asking for `127.0.0.1` sends the request to the gateway. The one name added back is the companion extension's own local host, because residential gateways refuse loopback with `464 Connection to the specified target is not permitted due to security policies`.
- `--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE 127.0.0.1"`, when DNS through the proxy is on. Chrome cannot look up any name on the machine, so a lookup that would have gone to your ISP's resolver fails instead. ([A numeric CONNECT](https://mosaicbrowser.com/blog/a-numeric-connect-means-dns-leaked) is what the proxy sees when this is missing.)
- The launch gate. A profile whose proxy has not answered and carried a connection is not started, and the refusal says which of the two failed.

We do write one PAC file, and only for profiles with no proxy while the local-network block is on, which is the default. It returns `DIRECT` for public sites, where those profiles go anyway, and sends `localhost`, `127.x`, `10.x`, `192.168.x`, `172.16` to `172.31` and link-local addresses, among others, to `PROXY 127.0.0.1:1`. Port 1 is tcpmux, which nothing runs, so a page cannot use the browser to scan your network. The file lives in the profile's own folder rather than a temp directory, because Chromium re-reads a `file:` PAC when its network service restarts, and a PAC that has gone missing by then fails open.

## How we test that a dead proxy fails closed

`scripts/check-proxy.mjs` takes every reading at a proxy of our own. For the dead-proxy case it creates a profile behind `127.0.0.1:47119`, a high port with nothing on it, starts the browser, calls `POST /running/navigate` with `https://example.com/`, waits eight seconds, and reads the page's URL and title.

If example.com loaded, the check fails with "the browser went around a proxy that was not answering". The test needs two conditions, not one, because a Chromium error page quotes the URL it could not load. A page that mentions example.com proves an attempt, not a fetch. So a bypass is a page that matches `example.com` and does not match `chrome-error`.

`npm run check:exit` covers the other way to be wrong. It runs the identity logic against six synthetic IPs, Chicago, Berlin, Tokyo, São Paulo, London and Sydney, and asserts the timezone, language and geolocation follow each one. Synthetic, because a live residential IP moves between runs and a pass on one would say nothing about our code. One check proves the packets went through the proxy; the other proves the profile then agreed with where they came out. [Checking a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it) is the by-hand version of both.

## Checking your own Chrome

1. Open `chrome://net-internals/#proxy`. It shows the proxy settings in effect and any proxies currently marked bad, with a Clear bad proxies button.
2. If a PAC file is in use, open it and search for `DIRECT` at the end of a return line. That one word is the usual cause.
3. Point the browser at a port with nothing listening and load a site you have not opened today. The answer should be `ERR_PROXY_CONNECTION_FAILED` ([the first-hop error](https://mosaicbrowser.com/blog/err-proxy-connection-failed) goes through that code and its neighbours). A page that loads means something in the chain falls back.
4. For the full record, save a log from `chrome://net-export`. Each request in it lists the proxy list Chrome resolved and the entry it actually used after skipping bad ones.

A proxy checker that prints "connected" cannot see any of this, since the fallback only starts once the proxy has failed ([a green tick that only means the socket opened](https://mosaicbrowser.com/blog/proxy-checker-says-working) is the same blind spot one layer down). Break it on purpose: stop the proxy, reload, and if the page still comes up, find the `DIRECT` before that browser holds a login you care about.

## Questions

### Does Chrome fall back to a direct connection if the proxy is down?

Not with a single proxy set by hand. It falls back to DIRECT when DIRECT is an entry in the proxy list, which is common in PAC files, or when the PAC file itself cannot be fetched and the setting is not marked mandatory.

### How do I stop Chrome from falling back to DIRECT?

Give it a proxy list with no DIRECT in it. On the command line that is one --proxy-server entry and no direct:// after a comma. In a PAC file, return PROXY lines only, with no trailing DIRECT.

### How can I tell whether Chrome used the proxy or went direct?

Do not ask the browser. Point it at a proxy you control, or at a dead port, and watch what arrives. chrome://net-export records the resolved proxy list for each request, and chrome://net-internals/#proxy shows the proxies Chrome has marked bad.

### Why does Chrome keep skipping a proxy that works again?

Because a proxy that failed while a later entry succeeded is marked bad and moved to the end of the list for a while. The Clear bad proxies button on chrome://net-internals/#proxy resets it.

## Related

[ERR_PROXY_CONNECTION_FAILED is about the first hop](https://mosaicbrowser.com/blog/err-proxy-connection-failed): Chrome's proxy connection failed error means it never reached the proxy address it was given. Check the host, the port and anything local first.

[A green tick that means the socket opened is worthless](https://mosaicbrowser.com/blog/proxy-checker-says-working): A proxy checker can pass while sites fail, because most test plain HTTP and the browser needs a CONNECT connection. IP and stability are separate answers too.

[How to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it): Check that a proxy answers and connects, where its IP really is, whether the address is residential or blocklisted, and that the browser stays behind it.

[A CONNECT to a raw IP means your machine resolved the name](https://mosaicbrowser.com/blog/a-numeric-connect-means-dns-leaked): To check if DNS goes through your proxy, read what the proxy is asked for. CONNECT example.com:443 means it resolved the name; a raw IP means you did.

[Provider accounts: one proxy line, one IP per profile](https://mosaicbrowser.com/features/proxy-providers): Paste your proxy seller's line once and Mosaic makes a separate session for every profile, so each one browses from its own IP address.



[Inspecting your traffic changes the TLS handshake a site sees](https://mosaicbrowser.com/blog/an-inspector-changes-the-handshake): Yes. mitmproxy and Proxyman open TLS to show you plaintext, so the site gets the inspector's ClientHello, not Chrome's. Inspect to debug, then turn it off.

[Proxy error 464 was our own extension talking to loopback](https://mosaicbrowser.com/blog/proxy-error-464): A 464 through a proxy is the gateway refusing your destination, not the site failing. Ours was a residential gateway that will not proxy to 127.0.0.1.

[What a header echo shows that a fingerprint page doesn't](https://mosaicbrowser.com/blog/check-request-headers-order): Only the server sees Chrome's request headers as they arrived, in order, with anything a proxy added. Page JavaScript never sees that copy.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy IP per profile. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
