Getting WebRTC? Here’s why it happens and the exact fix.
You are seeing your real IP exposed through WebRTC because the browser WebRTC API bypasses the proxy. The fix: disable WebRTC in your headless browser, or use a browser extension that blocks WebRTC leaks.
For Chromium: --disable-features=WebRtcHideLocalIpsWithMdns,WebRtcIPHandling. For Firefox: set media.peerconnection.enabled to false.
Inject JavaScript to replace RTCPeerConnection with a no-op before the page loads.
Navigate to browserleaks.com/webrtc through your proxy and verify no real IP is exposed.
const browser = await puppeteer.launch({
args: [
"--proxy-server=gw.knoxproxy.com:7000",
"--disable-features=WebRtcHideLocalIpsWithMdns",
"--enforce-webrtc-ip-permission-check",
"--webrtc-ip-handling-policy=disable_non_proxied_udp",
],
});
const page = await browser.newPage();
// Extra safety: override RTCPeerConnection before page loads
await page.evaluateOnNewDocument(() => {
window.RTCPeerConnection = undefined;
window.webkitRTCPeerConnection = undefined;
});
await page.authenticate({ username: "USER", password: "PASS" });
await page.goto("https://browserleaks.com/webrtc");
// WebRTC section shows "No leak detected"Test your setup with our proxy checker, then contact support if WebRTC still won’t clear.
WebRTC (Web Real-Time Communication) is a browser API that establishes peer-to-peer connections for video/audio calls. A side effect of WebRTC is that it can reveal your real local and public IP addresses even when you are using a proxy. Anti-bot systems exploit this: they make a WebRTC request from JavaScript, collect your real IP, and compare it to the proxy IP. If they differ, the system knows you are using a proxy.
Disable WebRTC with browser flags: --disable-webrtc or equivalent Playwright option.
Override the WebRTC API in the page context to return the proxy IP or null.
Install a WebRTC leak prevention extension, or disable WebRTC in browser settings.
WebRTC leaks are a client-side configuration issue. If the above fixes do not work in your specific browser setup, share your browser launch flags with KnoxProxy support.
No. WebRTC is a browser API. If you are using Python requests, Node fetch, or similar HTTP libraries, WebRTC does not apply. Leaks only happen in browser environments (Puppeteer, Playwright, real browsers).
Technically yes -- a missing RTCPeerConnection is a signal. But it is a much smaller signal than having your real IP exposed. The trade-off strongly favors disabling WebRTC.
WebRTC leaks your real IP address. DNS leaks reveal which DNS server you are using (which may reveal your ISP and location). Both should be prevented when using proxies for privacy-sensitive work.
KnoxProxy comes pre-configured to avoid the most common errors. Start a free trial and fix WebRTC for good.