"WebRTC Leaks: Why Your Real IP Shows Through Even Behind a Proxy"
WebRTC is the browser's built-in real-time communication component, and it can grab your network adapter's IP at a layer JavaScript cannot intercept. How the leak works, how browsers differ, and how to turn it off.
If a DNS leak exposes "what you accessed", a WebRTC leak exposes something more direct — your real network exit IP.
What Is WebRTC
WebRTC (Web Real-Time Communication) is the browser's built-in real-time communication framework, used for in-page video calls, online meetings, and P2P file transfer. Google Meet and the Discord web app's voice and video both depend on it.
To establish P2P connections, WebRTC needs to collect the machine's network candidates — that is its design purpose in the first place.
The Leak Mechanism
WebRTC gathers candidates through a process called ICE. It enumerates:
- Local adapter IPs (private addresses such as
192.168.1.100) - Public mapped addresses (obtained from STUN servers — "what I look like on the internet")
The problem is step 2 — STUN requests are sent by the browser directly from a UDP socket, and many proxy clients do not take over such traffic by default. Even with all your HTTP traffic going through the proxy, what STUN gets back is still the public mapping of your real exit.
Worse, JavaScript on a page can read these candidates through the RTCPeerConnection API.
The result — a page's script can obtain:
- Your real public IP (even while you are on a proxy)
- Your private IP range (enough to infer whether you are at the office, at home, or on public WiFi)
Detection and Browser Differences
In IPchase's fingerprint check, "WebRTC IP exposure" is one of the core checks. The implementation simply creates an RTCPeerConnection and checks whether the candidates it produces include a public IP that differs from the HTTP exit.
Where each browser stands today:
| Browser | Default behavior |
|---|---|
| Chrome / Edge | Enabled by default; leakage depends on whether mDNS obfuscation applies |
| Firefox | Enabled by default; can be disabled in settings |
| Safari | Recent versions hide local IPs from web pages by default |
Since 2018, Chrome has applied mDNS obfuscation to candidates (pages see xxxx.local instead of the real IP), so ordinary pages can no longer read your private IP. But the public STUN mapping can still leak in some scenarios, depending on proxy type and configuration.
How to Prevent It
Turn it off when unneeded (simplest)
If you rarely use in-browser video calls, just switch WebRTC off:
- Firefox — type
about:configin the address bar → findmedia.peerconnection.enabled→ set it tofalse - Chrome / Edge — the browser itself has no switch; install an extension that disables WebRTC (such as WebRTC Limiter)
- iOS Safari — Settings → Safari → Advanced → under Reader & WebRTC, choose "Links only"
Let the proxy take over (more elegant)
The TUN mode of modern proxy clients intercepts UDP traffic as well, so STUN requests go out through the proxy and come back with the proxy-side mapped address. With TUN mode on, proxying and in-browser video calls can coexist.
One side note
With WebRTC off, web features that depend on it stop working — video conferencing, voice calls, and some online multiplayer games. Weigh that against your own usage.
What a Leak Actually Reveals: A Worked Example
Precision matters here, because "WebRTC leaks your IP" gets overstated in a lot of write-ups. Walk through what a page can actually collect.
Say you're on a laptop behind a 192.168.1.0/24 home network, connected through an HTTP proxy whose exit is in Frankfurt. You open a page that quietly creates an RTCPeerConnection and dials a public STUN server. The browser gathers three kinds of candidates:
- host —
192.168.1.100(private, only meaningful inside your LAN). Modern Chrome replaces this with an mDNS name likea1b2c3d4-....local, so scripts can't read it directly. - srflx (server-reflexive) — the public address the STUN server sees. This is the dangerous one: if STUN traffic bypasses your proxy, it's your real ISP exit, not Frankfurt.
- relay — allocated by a TURN server; only present when the page configures one.
So the meaningful leak signal is the gap between srflx and your HTTP exit. If the page also sees your HTTP requests arriving from Frankfurt while srflx says a Chinese broadband address, that single contradiction is more valuable to a risk engine than either fact alone — it proves the proxy is partial.
Private-address leakage is a smaller but real signal: 10.8.x.x suggests a corporate network, 192.168.x.x a home router. It doesn't identify you, but it does reveal the shape of your environment, which is exactly the kind of detail account-linking looks at.
Why "Just Use TUN Mode" Isn't Always Enough
The standard advice is to switch your proxy client into TUN mode so UDP goes through the tunnel. That is correct in principle and works for many setups, but three practical gaps remain:
UDP over an HTTP proxy. A plain HTTP proxy handles TCP. UDP has to be tunneled inside TCP or dropped. Some clients silently drop it, in which case STUN either fails (no srflx candidate — safe) or falls back to direct (leaking). Which one happens depends on the client, not on your intent.
Split-tunnel rules. Plenty of people route "only the browser" or "only certain domains" through the proxy. STUN goes to stun.l.google.com — if that domain isn't in the proxy rule set, the request leaves directly.
Latency and MTU. TUN mode over long-haul links adds overhead; large UDP packets may fragment. Some clients therefore exclude UDP by default to avoid breaking video calls, which quietly restores the leak.
The takeaway: verify the outcome instead of trusting the setting. One check beats three assumptions.
A Three-Step Verification Routine
- Baseline — open the fingerprint check and note your HTTP exit. If it shows your proxy IP, the network layer is working.
- Compare candidates — the same page reports whether WebRTC produced a public IP that differs from the HTTP exit. A match means no leak; a different country means STUN bypassed the proxy.
- Re-check after changes — proxy clients update often and may reset TUN/UDP settings. If you rely on a proxy for account work, treat this as a pre-flight check, not a one-time setup.
If step 2 fails and you don't need in-browser calls, disabling WebRTC entirely is the pragmatic fix. If you do need it, get UDP into the tunnel and re-test rather than assuming.
Summary
The essence of a WebRTC leak — the browser collects your network addresses for P2P communication, and that collection can bypass a plain proxy's HTTP layer. Prevention — turn it off if you do not use it; if you do, let the proxy take over UDP (TUN mode), then verify the result instead of trusting the switch.
To see whether you are already leaking, one run of IPchase's fingerprint check tells you — and the proxy leak checklist puts WebRTC in context with DNS and timezone checks.
Check your own network: run a full disguise check on the homepage, or try the fingerprint test.