I maintain a small Chrome extension that tests a VPN for IP, WebRTC and DNS leaks, and it has a one-click "block WebRTC leaks" toggle. The toggle sets chrome.privacy.network.webRTCIPHandlingPolicy to disable_non_proxied_udp. The obvious way to prove the toggle works is to run a WebRTC test inside the popup right after flipping it. That test lies, and I re-measured exactly how today.
The setup
- Chromium 156.0.8078.4 (the Playwright build), Linux, run under xvfb.
- A Manifest V3 extension with the
privacypermission, loaded unpacked. - The same WebRTC probe run in two places at once: a normal tab on a plain HTTP page, and the extension's own page (
chrome-extension://<id>/popup.html). - Probe: one
RTCPeerConnectionwithstun:stun.l.google.com:19302, one data channel,createOffer+setLocalDescription, then 8 seconds of candidate gathering. Each candidate is classified by type (host,srflx) and address kind (mDNS.localname, private IPv4, public IPv4, IPv6). Two runs per state.
const pc = new RTCPeerConnection({ iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }); pc.createDataChannel('x'); const found = []; pc.onicecandidate = (e) => { if (!e.candidate || !e.candidate.candidate) return; const f = e.candidate.candidate.split(' '); found.push({ type: f[7], address: f[4] }); // classify address afterwards }; await pc.setLocalDescription(await pc.createOffer()); await new Promise((r) => setTimeout(r, 8000)); pc.close(); The policy is set from the service worker:
await chrome.privacy.network.webRTCIPHandlingPolicy.set({ value: 'disable_non_proxied_udp' }); and get({}) then reports levelOfControl: controlled_by_this_extension, so the setting really is applied.
What each page sees
| Policy | Normal tab | Extension page |
|---|---|---|
default | host as mDNS .local name, srflx public IPv4, srflx IPv6 | host as raw public IPv4, host as raw IPv6 |
disable_non_proxied_udp | nothing at all | host as raw public IPv4, host as raw IPv6 |
Both runs of each state gave the same result.
Two things stand out.
- The policy is not applied to extension pages. With
disable_non_proxied_udpactive, the normal tab gathered zero candidates, which is the fix working. The extension page kept gathering host candidates as if nothing had changed. - Extension pages do not get mDNS obfuscation. A normal tab hides the host address behind a random
.localname. The extension page received the raw interface addresses. The test machine is a server whose interface carries a public address, so "host" here is a public IP. On a home computer behind a router it would be the private LAN address.
One more observation, reported as seen: in this run the extension page gathered no srflx candidate in either state, while the normal tab did. I have not established why, and an earlier build of the same probe in October did see srflx from the popup, so do not build on that detail.
Why it matters if you ship a leak test or a WebRTC blocker
A popup that tests itself after the toggle will keep showing candidates, so it reports a leak that websites can no longer see. Worse, because the popup gets raw addresses instead of mDNS names, it can show a scarier picture than any website ever had, even before the toggle.
What I changed in the extension:
- After the toggle, the popup no longer presents its own probe as proof. It shows the state as "blocked on sites" and sends the user to a real web page to confirm.
- The confirmation runs in a normal tab: the IP, WebRTC and DNS leak test on vpnsmith.com (our site, disclosure below).
The rule I now follow: verify a chrome.privacy setting from a normal tab, never from a chrome-extension:// page. If you write automated tests for a blocker, open a regular page in the test and run the probe there.
Reproduce it
Load any MV3 extension with the privacy permission, open its page and a normal tab side by side, paste the probe above in each DevTools console, set the policy from the service worker console, run the probe again in both. It takes about two minutes. The extension and its source are public if you want a ready-made one: VPN Leak Guard on the Chrome Web Store and its GitHub repository.
Disclosure: I build VPN Leak Guard and vpnsmith.com. The extension is free, has no analytics, and links to VPN offers when it finds a leak (affiliate links, disclosed in the popup).

