# cdn-cgi/trace: reading Cloudflare's trace, line by line

> Cloudflare's /cdn-cgi/trace prints about fifteen key=value lines: your IP (ip=), its country (loc=), the data centre (colo=), TLS version. Each explained.

Source: https://mosaicbrowser.com/blog/cdn-cgi-trace

## cloudflare.com/cdn-cgi/trace is the cheapest ground truth

Cloudflare's /cdn-cgi/trace prints about fifteen key=value lines: your IP (ip=), its country (loc=), the data centre (colo=), TLS version. Each explained.

![One plain-text request settles what the proxy is doing](https://mosaicbrowser.com/covers/cdn-cgi-trace.webp)

The Cloudflare cdn-cgi trace lives at `https://www.cloudflare.com/cdn-cgi/trace`, and it answers in plain text: about fifteen lines of `key=value` about the request that just arrived. Four of those lines are the address you came from, the country Cloudflare files it under, the data centre that answered and the TLS version. We read it before any detector that grades the browser, because it settles what the proxy is doing in one request.

## The Cloudflare cdn-cgi trace, line by line

A trace looks like this (the address is a documentation one):

```
fl=114f280
h=www.cloudflare.com
ip=203.0.113.24
ts=1793361600.000
visit_scheme=https
uag=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ...
colo=VIE
sliver=005-tier1
http=http/2
loc=AT
tls=TLSv1.3
sni=plaintext
warp=off
gateway=off
rbi=off
kex=X25519

```

The lines worth reading:

- `ip` is the address Cloudflare saw. Behind a proxy, it should be the proxy's IP, not your own.
- `loc` is the country Cloudflare's own lookup puts that address in, as a two-letter code.
- `colo` is the data centre that answered, as an airport code. Traffic goes to the nearest one, so it is a rough check on where the IP physically is.
- `http` is the protocol. A browser going direct may show `http/3`. Through an HTTP or SOCKS5 proxy, Chrome connects over TCP, so the line says `http/2` ([QUIC through a proxy](https://mosaicbrowser.com/blog/chrome-quic-through-a-proxy) has why).
- `tls` is the TLS version, and `kex` the key exchange that was agreed.
- `uag` echoes the User-Agent that was sent. It tells you what went out, not whether it was believed.
- `warp` and `gateway` say whether the request came through Cloudflare's own WARP client or Gateway. They should read `off` for a normal proxy.

`ts` is a Unix timestamp. `fl`, `h`, `sliver`, `visit_scheme` and `rbi` are Cloudflare's own bookkeeping and rarely matter here.

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 we start with it

IPHey, Pixelscan and CreepJS grade the whole browser, and a red verdict from any of them mixes the address in with the fingerprint. So when one goes red, our first question is whether the proxy did its job, and the trace answers that with no JavaScript at all.

In our detection catalogue the trace is a row of its own, in the Leaks group, next to BrowserLeaks and the header echo. The row passes when `ip` is the proxy's IP and `loc` is that IP's country. If it fails, we stop reading the rest of the run. Every consistency verdict after it was taken on some other connection than the one we meant to test.

## Three places Mosaic reads it

The same address does three jobs in the app.

The proxy check uses it to prove the proxy carries traffic. A proxy that accepts a connection is not yet a proxy that works ([a green tick that means the socket opened](https://mosaicbrowser.com/blog/proxy-checker-says-working) covers that failure). So the check opens a connection through the proxy to `www.cloudflare.com` on port 443, completes TLS inside it, asks for `/cdn-cgi/trace`, and reads `ip=` and `loc=` out of the answer. If the connection opens and the body has no `ip=` line, the check fails and says the connection opened but returned nothing readable. A profile does not launch behind a proxy that has not passed.

The companion extension inside each profile asks again, from inside the browser. Its card shows the address the profile is "Actually coming from", fetched from the trace, and compares `loc` with the country of the profile's timezone. If they agree, the card says Agrees. If they differ, it says Mismatch and explains that this is the first comparison every consistency scanner makes. Asking from inside the browser matters, because the desktop app asking its own proxy is a different question from what the profile's pages see.

Our test runner reads the trace first in every run, to record the IP it is measuring. That read once lied to us. A run that reused a profile also reused its HTTP cache, so the trace came back from the previous run, with the IP of a session from an hour earlier. Two rows then reported a working proxy as broken, each convinced the site saw a different address from the session's. Both addresses were real; the cached one was simply old. The request now goes out with `cache: 'no-store'`. The same runner also reads the trace directly from its own process, with no proxy, to learn the computer's own address, which is what decides whether a DNS row is a leak.

## What it cannot tell you

No script runs on that page, so the canvas, the fonts, the timezone the browser reports and its WebRTC candidates never come into it. A browser can pass the trace with its own IP and still hand its home address to any page through WebRTC.

You also get one address and only one. On a dual-stack proxy the trace may say IPv6 while ip-api, which our runner asks over plain HTTP, says IPv4, and both belong to the same proxy ([IPv4 from one probe, IPv6 from the other](https://mosaicbrowser.com/blog/two-ip-addresses-one-exit) has the case we hit). `loc` is Cloudflare's own lookup, too, and on a range that changed hands last month another database may put it in a different country.

The order we check a new proxy in is written up in [how to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it), and the other 48 rows of the catalogue are in [49 detectors, and how we read them](https://mosaicbrowser.com/blog/forty-nine-detectors).

## Questions

### What is cloudflare.com/cdn-cgi/trace?

A diagnostic path Cloudflare serves on its own site and on sites behind its network. It answers with a few lines of plain text describing the request it just received: the client IP, the country Cloudflare places it in, the data centre that answered, and the HTTP and TLS versions used.

### What does colo mean in the Cloudflare trace?

The Cloudflare data centre that served the request, written as a three-letter airport code. It is usually near where the IP is, so a colo on another continent from loc is worth a second look.

### Does the trace tell me if my browser fingerprint is good?

No. It describes the connection only: the address, its country and the protocol. It reads nothing from the page, so a clean trace says the proxy works and says nothing about how the browser looks.

### Can I use cdn-cgi/trace on other sites?

Usually yes. The path is answered by Cloudflare itself, so most sites behind Cloudflare return the same kind of trace at their own /cdn-cgi/trace address.

## Related

[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.

[49 browser fingerprint detectors, and how we read them](https://mosaicbrowser.com/blog/forty-nine-detectors): Our browser fingerprint detectors list: 49 public test pages in five groups, 40 read by a script and 9 kept as reference because they print no verdict.

[What happens to QUIC when Chrome has a proxy](https://mosaicbrowser.com/blog/chrome-quic-through-a-proxy): With an HTTP, HTTPS or SOCKS5 proxy set, Chrome reaches sites over TCP connections, so a page that gets HTTP/3 direct gets HTTP/2 through the proxy.

[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.

[IPv4 from one probe, IPv6 from the other: one IP, not two](https://mosaicbrowser.com/blog/two-ip-addresses-one-exit): A proxy that shows an IPv4 address on one checker and an IPv6 address on another is usually one dual-stack IP. Rotation only shows within one family.







[When Chrome falls back to a direct connection](https://mosaicbrowser.com/blog/chrome-proxy-fallback-to-direct): 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.

## 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.
