A WebRTC leak is your own IP address reaching a website through WebRTC, the browser feature behind video calls, while the rest of the page goes through your proxy. It happens because WebRTC finds its route over UDP, and a browser proxy carries only the page's ordinary requests.
Our browser extension has an optional setting for it, WebRTC leak protection. It tells the browser not to use UDP outside the proxy while you are connected. It is off until you turn it on, and it covers less than its name might suggest, so this post sets out what it does, what it leaves alone, and how to check the result on your own browser.
What WebRTC is for
WebRTC lets two browsers send audio, video or data to each other directly, without a server in the middle carrying every packet. To make that work, each side has to learn the addresses it can be reached at. The browser gathers what WebRTC calls candidates:
- Host candidates: the addresses of your own network interfaces.
- Server-reflexive candidates: the public address a STUN server saw when the browser contacted it over UDP.
A page can ask for these from JavaScript, and any page can do it. No call, camera or microphone is needed, and nothing is shown to you while it happens.
Why your proxy does not catch it
A browser proxy carries the page's web requests: HTTP and HTTPS, over TCP. The STUN request is UDP, so it leaves beside the proxy, from your own connection. The STUN server answers with the address it saw, which is your real public IP, and the page now has two addresses: the proxy's, from its normal requests, and yours, from WebRTC. RFC 8828, the IETF's rules for how WebRTC handles IP addresses, puts it plainly: HTTP proxies, and most SOCKS proxies, do not support UDP at all.
Local addresses are less of a worry than they used to be. Current versions of Chrome and Firefox normally hide them behind random names ending in .local, and our proxy checker ignores those names when it looks for leaks. The public address from STUN is the one that matters.
What a proxy extension can see touches on WebRTC as one item on its checklist. This post is the longer version for our own extension.
What the extension's setting changes
WebRTC leak protection is in the extension's Settings. The extension describes it in one line: it stops the browser sending your real IP address over WebRTC while a proxy is on. Underneath, three things happen.
- When you switch it on, the extension asks the browser for its privacy permission. It asks only then, not at install. If you decline, the setting cannot take effect, and the extension says the browser did not grant the permission.
- While you are connected, it sets the browser's WebRTC IP handling policy to
disable_non_proxied_udp. - When you disconnect, or switch the setting off, it clears that policy, and the browser goes back to its own default.
disable_non_proxied_udp is the most private of the four values Chrome offers, and its name is the rule it applies: no UDP that does not go through the proxy. Firefox lists one value stricter still, proxy_only; the extension sets disable_non_proxied_udp in both browsers. RFC 8828 describes the same aim as a "force proxy" mode: when a page's traffic goes through a proxy, WebRTC's should too, and over TCP when the proxy cannot carry UDP.
What it does not cover
- Time when you are not connected. The policy is cleared when you disconnect, so a page you open with the proxy off behaves as normal.
- Anything outside this browser. Other browsers, other browser profiles and desktop apps keep their own settings. ProxyDesk gives desktop apps one local proxy address, but it carries no UDP either, so an app's UDP goes around it.
- Private windows, unless you allow the extension to run there.
- Calls. With UDP outside the proxy switched off, video calls and other WebRTC features may sound worse or fail to connect while you are connected. RFC 8828 notes that using TCP reduces media quality. If a call matters more than the address, disconnect for the call, or leave the setting off.
- Everything else a site can learn. The setting hides one address from one feature. The proxy's own IP, your cookies and the accounts you sign in to are still there for the site to see. It does not make you anonymous, and no single setting does.
Check it yourself
We have not published a result here, because it depends on your browser, its version and your network. Our free proxy checker shows yours. It asks a public STUN server which address it sees, the same way any page can, and compares that with the address your requests arrive from.
- In the extension, connect a proxy with WebRTC leak protection off.
- Open the proxy checker and run it. Read the WebRTC part of the result.
- Switch WebRTC leak protection on in Settings, allow the privacy permission when the browser asks, and run the checker again.
The checker gives one of three answers. WebRTC gave away no other public address. WebRTC showed your connection's address in the other IP version, which is normal for a dual-stack connection but can still give you away if your proxy carries only one version. Or WebRTC gave away another public address, which is the leak this post is about. If the second run still shows another address, ask in Discord with your browser and its version, and we will look at it with you.
Quick answers
Is a WebRTC leak a fault in the proxy? No. The proxy never sees WebRTC's UDP traffic. It is browser behaviour, which is why the fix is a browser setting.
Does the setting slow down normal browsing? It changes how WebRTC picks its route, nothing else. Ordinary page loads go through the proxy as before.
Is it on by default? No. All of the extension's safety settings start off, WebRTC leak protection included. The kill switch and Block traffic if the proxy fails are explained in when your proxy stops working.
Does a VPN have the same problem? A VPN works at the level of the whole connection rather than the browser, so it is a different question. Proxy or VPN explains the difference.
Next step
The browser extension guide takes you from install to a checked connection, and the extension page lists what else it does.