Privacy guide

Proxy leaks: how a browser can still show where you are

A proxy changes the IP address that sites see for page loads. Other parts of the browser can still point to your real location. This guide covers the common leaks, how to check each one, and how to fix it.

Direct answer

Proxy leaks happen when part of the browser skips the proxy, or contradicts the proxy’s IP. There are three common ones. WebRTC can show your real IP to a page. DNS lookups can go to your own internet provider. And the time zone or language can point to a different country than the proxy. You can check each leak with BrowserLeaks, a free public checker, and fix it in the browser settings.

Proxy leaks at a glance

Run each check with the proxy on. BrowserLeaks is a free public checker.
LeakWhat it revealsHow to checkFix
WebRTCYour real public IP, through a STUN request that does not use the proxyBrowserLeaks WebRTC page: compare the WebRTC public IP with the remote IPLimit WebRTC to the proxy, or turn it off
DNSYour internet provider, and often your cityBrowserLeaks DNS page: look for your provider’s DNS serversUse SOCKS5 with proxy DNS, or an HTTP proxy. Avoid SOCKS4
Time zone and languageA country that does not match the proxy IPBrowserLeaks IP page: compare the IP’s time zone with the browser clockMatch the time zone and language list to the proxy country
IPv6Your provider’s IPv6 address, when only IPv4 goes through the tunnelBrowserLeaks IP page: the IPv6 testTunnel IPv6, or turn it off

WebRTC leaks with a proxy

WebRTC carries video calls and other live data between browsers. To find a route, the browser asks a STUN server for its public address over UDP.

Browser proxies carry TCP page loads, not this UDP request. So the STUN server sees your real IP, and the page can read it. By default, both Chrome and Firefox let WebRTC go direct.

Check: open the BrowserLeaks WebRTC page. If the WebRTC public IP is your own, not the proxy’s, it leaks.

  • Firefox: in about:config, set media.peerconnection.ice.proxy_only_if_behind_proxy to true. A Mozilla engineer names it as the way to stop direct UDP when a proxy is set. Setting media.peerconnection.enabled to false turns WebRTC off.
  • Chrome: install WebRTC Network Limiter, Google’s own extension, and choose the option that disables non-proxied UDP. On managed computers, set the WebRtcIPHandling policy to disable_non_proxied_udp.
  • AliasMode: with a proxy, WebRTC traffic stays on the proxy path, and the WebRTC public IP is the proxy’s exit IP.

DNS leaks with a proxy

Before it connects, the browser looks up the site’s name. If that lookup goes to your provider’s DNS server, the provider sees the names you visit. A checker then sees a server in your country.

With an HTTP proxy, the proxy does the lookup. For https pages, the browser sends the host name in a CONNECT request, and the proxy resolves it.

With SOCKS5, it depends on the browser. Chrome always resolves on the proxy. Firefox does so by default since version 128. SOCKS4 resolves names on your computer by default.

Check: open the BrowserLeaks DNS page. If the listed DNS servers belong to your provider, or sit in your city, lookups leak.

  • Firefox: keep “Proxy DNS when using SOCKS v5” ticked in Connection Settings. In about:config it is network.proxy.socks5_remote_dns.
  • Chrome: use a socks5:// or HTTP proxy, not socks4://. Chromium’s SOCKS guide warns that parts of Chrome, such as the DNS prefetcher, may still look up names locally. It suggests a catch-all flag, shown below.
  • AliasMode: with a SOCKS5 proxy, names resolve on the proxy. With an HTTP proxy, the proxy also resolves names.
--proxy-server="socks5://myproxy:8080" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE myproxy"

Time zone and language mismatch

This leak is not about the network. Pages read the time zone from your system clock through JavaScript. The browser also sends an Accept-Language header with your language list.

Say the IP is in Germany, but the clock says New York. A site can compare the two and see the mismatch.

Check: the BrowserLeaks IP page shows your IP’s time zone and the Accept-Language header your browser sent. To see the browser’s own time zone, run this line in the developer console:

Intl.DateTimeFormat().resolvedOptions().timeZone
  • Chrome: set the language order under Settings > Languages > Preferred languages. The time zone comes from the system, so change the system time zone to match.
  • Firefox: search the settings for “language” and set the website languages. The time zone also comes from the system. Firefox’s resistFingerprinting mode, Tor Browser and Mullvad Browser report UTC for everyone instead.
  • AliasMode: the app looks up the proxy’s exit location through the proxy. It then sets the profile’s time zone and language to match.

A note on IPv6

Many connections have both an IPv4 and an IPv6 address. A VPN or proxy setup that carries only IPv4 can let IPv6 traffic take the direct route. Mullvad’s VPN app once blocked IPv6 on the computer for this reason, before it could tunnel IPv6.

Check the IPv6 test on the BrowserLeaks IP page. If it shows an IPv6 address from your own provider, use a VPN that tunnels IPv6, or turn IPv6 off. Run this check with any proxy or VPN setup.

Where AliasMode fits

AliasMode is a free, open-source profile manager. Each profile can have its own HTTP or SOCKS5 proxy. The WebRTC, DNS and time zone handling above comes with it. Still run the checks, because a proxy can be set up wrong.

Frequently asked questions

What is a WebRTC leak with a proxy?

WebRTC asks a STUN server for your public address over UDP. Browser proxies carry only TCP page loads, so that request can go direct and show your real IP to the page.

How do I know if my proxy leaks DNS?

Open the BrowserLeaks DNS page with the proxy on. If the listed DNS servers belong to your internet provider, your name lookups do not go through the proxy.

Does a SOCKS5 proxy leak DNS?

It can. Chrome always resolves names on a SOCKS5 proxy. Firefox does so by default since version 128, while “Proxy DNS when using SOCKS v5” stays ticked. SOCKS4 resolves names on your computer by default.

Why does a timezone mismatch matter with a proxy?

The browser reports your system time zone and a language list. If they point to a different country than the proxy IP, a site can see the mismatch.

Does turning off WebRTC break anything?

Yes. Video calls in the browser and some file-sharing sites use WebRTC. Limiting WebRTC to the proxy keeps it working, but calls can have longer delay or lower quality.