Skip to content
ProxyRaw
intermediatePrivacy & Security

WebRTC Leak

A critical privacy vulnerability where browser WebRTC APIs execute STUN queries that reveal your true public and local IP addresses, completely bypassing VPNs and HTTP proxies.

A WebRTC leak is one of the most severe anonymity failures that can compromise a VPN or proxy user. It occurs when a web browser's built-in WebRTC (Web Real-Time Communication) functionality discloses your actual public IP address and local network IP to websites, even when you are actively connected to a paid VPN or elite residential proxy.

For web scrapers, multi-account operators, and privacy advocates, an undetected WebRTC leak completely destroys anonymity.

How WebRTC Causes IP Leaks (link to this section)

WebRTC is an open-source standard integrated into all modern browsers (Chrome, Firefox, Safari, Edge) that enables peer-to-peer audio, video, and data communication without plugins (powering Google Meet, Discord, and WebRTC streaming).

To establish a direct peer-to-peer connection between two browsers behind home NAT firewalls:

  1. WebRTC uses the STUN (Session Traversal Utilities for NAT) and ICE (Interactive Connectivity Establishment) protocols.
  2. The browser sends UDP requests to an external STUN server to discover its own external IP address and internal local network IP.
  3. The STUN server reflects back the public IP address of the device's physical network adapter.
  4. JavaScript can access these discovered addresses: Websites execute simple JavaScript using RTCPeerConnection to read the generated ICE candidates, extracting your real IP directly from browser memory.
javascript
// Simplified WebRTC leak extraction
const rtc = new RTCPeerConnection({ iceServers: [{ urls: "stun:stun.l.google.com:19302" }] });
rtc.createDataChannel("");
rtc.createOffer().then(offer => rtc.setLocalDescription(offer));
rtc.onicecandidate = (event) => {
  if (event && event.candidate) {
    console.log("Discovered IP address:", event.candidate.candidate);
  }
};

Why Standard Proxies Do Not Block WebRTC Leaks (link to this section)

Many users assume that configuring a proxy inside their browser or scraping library protects them against WebRTC leaks. It does not:

  • HTTP / SOCKS Proxies: Traditional proxies only intercept standard HTTP/HTTPS application traffic. WebRTC STUN requests communicate directly over UDP at the operating system socket level, completely bypassing the browser's proxy configuration.
  • Resulting IP Mismatch: If your HTTP proxy is in Frankfurt, Germany, but WebRTC queries reveal your real ISP IP in Austin, Texas, anti-fraud algorithms (such as on eBay, PayPal, or Amazon) immediately flag the account as using a masking proxy.

Types of Information Leaked (link to this section)

  1. Public IP Address: Your actual ISP-assigned public IP address, destroying geographic spoofing.
  2. Local Private IP Address: Internal LAN addresses (such as 192.168.1.45 or 10.0.0.12). While not public, local IP enumeration allows tracking algorithms to fingerprint your device and map your internal network topology.

How to Prevent WebRTC Leaks (link to this section)

  • In Anti-Detect Browsers: High-quality anti-detect browsers feature native WebRTC overrides, either routing WebRTC through the assigned proxy or spoofing ICE candidate public IPs to match the proxy.
  • In VPN Applications: Ensure your VPN includes built-in WebRTC leak protection or uses system-level firewall rules to force all outbound UDP traffic through the TUN/TAP adapter.
  • In Regular Browsers: Disable WebRTC via about:config in Firefox (media.peerconnection.enabled = false) or use browser extensions that block WebRTC STUN queries in Chrome.

In practice

  • An e-commerce seller using an anti-detect browser gets suspended on eBay because an unpatched WebRTC leak exposed their real residential IP while the proxy was set to another city.
  • Testing your browser connection on ProxyRaw's IP lookup tool and discovering that while your HTTP IP shows a US VPN server, the WebRTC candidate reveals your true European broadband IP.
  • An automated bot operator configuring Playwright launch arguments (`--disable-webrtc`) to prevent target sites from extracting real local network interface IPs.
  • A privacy researcher auditing VPN desktop clients to verify whether UDP STUN packets leak outside the encrypted WireGuard tunnel during network transitions.

Common use cases

VPN and proxy security auditingAnti-detect browser profile configurationAnonymity verification before multi-accountingE-commerce fraud prevention and account protectionWeb scraping environment hardening

Frequently asked

Yes, if the VPN does not properly route or block UDP STUN requests. If the browser makes a direct STUN query over your physical network interface, your real public IP will be exposed via JavaScript.

Visit an IP lookup or leak testing tool. The test initiates an RTCPeerConnection in JavaScript; if your real ISP IP appears in the WebRTC section while your main IP shows a proxy or VPN, you have an active WebRTC leak.

Disabling WebRTC will break web-based video calling, voice chat, and peer-to-peer file sharing applications (such as Google Meet, Discord Web, and Zoom Web). Regular browsing and shopping sites will continue functioning normally.

Rather than disabling WebRTC entirely, anti-detect browsers replace the discovered ICE candidate IP addresses with the assigned proxy's public IP address, maintaining complete geographic consistency.

Related terms