Setup & Troubleshooting

WebRTC Leaks and Proxies

How WebRTC can expose your real IP address even when using a proxy, how to test for WebRTC leaks, and how to prevent them in Chrome, Firefox, automation tools and antidetect browsers.

By Team of Monkeys Editorial Updated 5 min read Affiliate disclosure

This guide contains affiliate links to Geonode, Webshare and Rayobyte. If you buy through them we may earn a commission, at no extra cost to you.

WebRTC leaks and proxies illustration of a browser leaking its real IP through WebRTC despite using a proxy 3jdej38j4

What is a WebRTC leak?

WebRTC is the browser technology behind video calls, voice chat and peer-to-peer data in web apps. To connect peers directly, WebRTC discovers your network addresses using STUN servers, often over UDP. Because HTTP proxies don't carry UDP, and because WebRTC can gather addresses outside the proxy, a website's JavaScript can sometimes learn your real public IP (and local network addresses) even though your web traffic goes through a proxy.

What DNS leaks are and how to check for them, so your real location doesn't slip past a proxy or VPN. Video: VPNpro on YouTube

That's a WebRTC leak. It undermines the main purpose of a proxy and creates an obvious inconsistency: page requests come from the proxy IP, while WebRTC reveals a different IP.

Why it matters

  • Privacy: your real IP is exposed.
  • Account safety: platforms can link accounts that share the same real IP behind different proxies.
  • Detection: mismatch between proxy IP and WebRTC IP is a strong signal that a proxy is in use. See browser fingerprinting and proxies.
Moving through the web without leaving a fingerprint (animated GIF) 3jdej38j4
Moving through the web without leaving a fingerprint. GIF via Tenor

How to test

Visit a WebRTC leak-test page in the browser configured with your proxy. If it shows your real public IP, you have a leak. Also check local IP exposure.

How to prevent WebRTC leaks

Chrome and Chromium-based browsers

  • Use an extension that restricts WebRTC's IP handling policy (several privacy extensions do this).
  • In automation, launch with a policy flag such as:
text
--force-webrtc-ip-handling-policy=disable_non_proxied_udp

This prevents WebRTC from using non-proxied UDP, so it can't reveal your real IP via that route.

Firefox

  • In about:config, set media.peerconnection.enabled to false to disable WebRTC entirely (breaks video calling sites), or
  • Use settings such as media.peerconnection.ice.default_address_only and media.peerconnection.ice.proxy_only to restrict which addresses are exposed.

Antidetect browsers

Most antidetect browsers have a WebRTC setting per profile: disable, replace with the proxy IP, or "altered" modes. Choose the option that shows the proxy's IP. See antidetect browser proxies.

Puppeteer and Playwright

Add the Chromium flag above in launch args, and verify with a leak-test page through the proxy. See Puppeteer stealth and proxies. Our Puppeteer proxies guide covers the full setup.

Trade-offs

Disabling WebRTC entirely can itself be a fingerprinting signal, since most real browsers have it enabled. Restricting it to proxied routes, or replacing exposed addresses with the proxy IP, is often a better balance.

Proxy tip: When troubleshooting, it helps to have a second, known-good proxy to compare against. A small pay-as-you-go balance from Geonode works well for that, and its dashboard shows usage and active sticky sessions. More in using Geonode in your browser.

Understanding what WebRTC exposes

WebRTC gathers "ICE candidates", addresses that a peer could use to connect to you:

  • Host candidates: local network addresses (for example 192.168.x.x). Modern browsers often obfuscate these with mDNS names.
  • Server-reflexive candidates: your public IP as seen by a STUN server, discovered over UDP.
  • Relay candidates: addresses on TURN servers.

The leak risk comes mainly from server-reflexive candidates gathered outside the proxy.

WebRTC policies in Chromium

PolicyEffect
defaultAll candidates; leak-prone with proxies
default_public_and_private_interfacesLimits interfaces used
default_public_interface_onlyOnly the default public interface
disable_non_proxied_udpNo UDP outside a proxy; best for proxied setups

Set via launch flags in automation, enterprise policies for managed browsers, or extensions for personal browsers.

Testing in automation

javascript
const browser = await puppeteer.launch({
  args: ['--proxy-server=http://gate.example.com:7777', '--force-webrtc-ip-handling-policy=disable_non_proxied_udp'],
});
const page = await browser.newPage();
await page.authenticate({ username: 'USER', password: 'PASS' });
await page.goto('https://example-webrtc-leak-test.invalid'); // use a real leak test page

Inspect the page or capture a screenshot to confirm only the proxy IP appears. See Puppeteer stealth and proxies.

WebRTC and account linking

Platforms can use WebRTC-exposed addresses as one more signal to link accounts. If several "separate" profiles reveal the same real public IP through WebRTC, they're effectively linked regardless of proxies. Protect every profile. See antidetect browser proxies.

Budget tip: For jobs where a fixed IP list is enough, Webshare is one of the cheapest options: shared datacenter proxies are sold by the IP, and static residential (ISP) proxies cost well under a dollar per IP per month at the time of writing. More in fixing common Webshare errors.

WebRTC leak quick-fix table

EnvironmentFix
Chrome (personal)WebRTC-limiting extension
Chrome (automation)--force-webrtc-ip-handling-policy=disable_non_proxied_udp
Firefoxmedia.peerconnection.ice.proxy_only or disable peer connections
Antidetect browserPer-profile WebRTC setting showing the proxy IP
Managed Chrome/EdgeEnterprise policy for WebRTC IP handling
Whole deviceVPN (tunnels WebRTC traffic too)

After any fix, re-run a leak test through the proxy to confirm. See how to check if a proxy works.

WebRTC on phones and in native apps

Most WebRTC advice is about desktop browsers, but phones are where many account setups actually run, and the picture there is different:

  • Wi-Fi proxy settings don't cover WebRTC media. Voice and video calls use UDP, which an HTTP proxy configured in Wi-Fi settings doesn't carry. Calls can connect directly and reveal the phone's real network.
  • Native apps with calling or live features often use their own networking stacks and don't consult the proxy setting at all.
  • Mobile browsers offer fewer WebRTC controls than desktop ones, and extensions are limited or unavailable.

What works better on mobile:

  1. Put the whole device on the target network, for example a phone that genuinely uses the mobile carrier or a dedicated mobile proxy at the network level, rather than a Wi-Fi proxy setting.
  2. Use a VPN-style proxy app that captures all traffic, if you must proxy from a phone, and check it handles UDP or blocks it.
  3. Test from the device itself with a WebRTC leak page, and in the apps you rely on, rather than assuming.

For background on how browsers expose addresses, see the policies and candidate types above, and the IETF's guidance on WebRTC IP address handling (RFC 8828). For setting up proxies on phones, see proxy setup on iPhone and Android; for carrier-based IPs, mobile proxies.

If you're weighing Rayobyte as well, Rayobyte Troubleshooting explains which of its products fits, and Rayobyte vs Geonode vs Webshare puts it side by side with Geonode and Webshare.

Residential tip: If you want to try this on an ethically sourced residential pool, Rayobyte offers a free trial with no credit card, then pay-as-you-go traffic from $3.50 per GB that drops to $0.70 per GB at 1 TB. See fixing common Rayobyte errors.

Key takeaways

  • WebRTC can reveal your real public IP through STUN requests that bypass HTTP proxies.
  • Leaks undermine privacy, link accounts and signal proxy use.
  • In Chromium automation, --force-webrtc-ip-handling-policy=disable_non_proxied_udp is the standard fix.
  • Firefox preferences and antidetect browser settings offer similar protection.
  • Disabling WebRTC entirely can itself be a fingerprint; restricting it to proxied routes is often better. See browser fingerprinting and proxies.

With leaks closed, the proxy IP is all a site sees, so choose it well. Our residential proxies guide and best proxies in 2026 guide can help.

WebRTC leaks matter most when the stakes are highest, such as investigating a phishing site whose operator logs every visitor. Our guide to Webshare proxies for cybersecurity research covers building an isolated investigation environment that can't leak your real address.

FAQ

Do VPNs prevent WebRTC leaks?

A full-device VPN usually does, because all traffic, including WebRTC, goes through the tunnel. Per-app proxies often don't.

Does SOCKS5 prevent WebRTC leaks?

Not by itself. Browser WebRTC behaviour still needs to be restricted.

Sources and further reading

Independent references that back up the points above, from standards bodies, governments, universities and non-profits. They open in a new tab.

Affiliate disclosure: Team of Monkeys is an affiliate of Geonode, Webshare and Rayobyte. Links and banners marked as sponsored, and links to Geonode, Webshare and Rayobyte in the text, use our referral links, and we may earn a commission if you buy through them, at no extra cost to you. Our explanations and comparisons are written to be useful whichever provider you choose.

Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.