Privacy troubleshooting

How to test a proxy for DNS leaks

A DNS leak happens when an app sends a hostname lookup outside the route you intended. A browser can show the expected proxy exit IP while a separate resolver looks up the site. Check both from the same browser profile or app.

What a DNS leak means

A proxy changes how traffic reaches the destination, but DNS resolution can still happen before the proxy sees the request. If the local machine resolves the domain through the ISP or office resolver, the destination traffic may use the proxy while DNS metadata follows another path.

This matters for privacy, location consistency and troubleshooting. If a site or workflow depends on regional behavior, mismatched DNS can produce confusing results even when the visible exit IP looks correct.

Why proxy DNS leaks happen

Leaks usually happen because the application resolves domains locally, the browser uses secure DNS settings that ignore the proxy expectation, or the proxy protocol is configured in a way that does not proxy hostname resolution. SOCKS clients are a common place to check because some modes resolve locally and others resolve through the proxy.

Start with the exact client. Chrome, Firefox, cURL, Python Requests and desktop apps can each handle DNS differently. Use the Chrome proxy settings guide for browser baselines and the SOCKS5 versus HTTP guide for protocol choices.

  • Browser secure DNS setting overrides expectations
  • SOCKS client resolves locally
  • System proxy and app proxy differ
  • VPN, antivirus or corporate policy changes DNS
  • Test page is opened outside the proxied profile

DNS behavior should be tested separately from exit IP.

How to test for and fix a proxy DNS leak

In cURL, socks5 resolves the destination hostname in the client and socks5h asks the proxy to resolve it.
With cURL, socks5:// and socks5h:// choose where the destination hostname is resolved. Test the application that will use the proxy.
  1. In the browser profile you want to test, run an exit-IP check and a DNS resolver test that issues fresh hostnames. Record the exit address and the resolver operators the test reports. If your network policy allows a direct comparison, record the same observations with the proxy off.
  2. Enable the intended proxy or correct its DNS setting. Repeat both checks in that profile with fresh test names to reduce the effect of cached answers.
  3. Compare the result with your intended DNS route. If the resolver is unexpected, check where that client resolves destination names and whether a managed DNS policy applies.

Check browser DNS and proxy settings

In browsers, check secure DNS, system proxy settings and extensions. A browser profile may use a proxy extension for traffic while secure DNS still uses a resolver configured in browser settings. Disable competing extensions during the test.

For Chrome-based workflows, retest after changing one setting at a time. If a company policy controls proxy or DNS behavior, user-level settings may not be enough. Google’s Chrome DNS-over-HTTPS policy reference is useful when policies are involved.

Check where scripts and tools resolve DNS

In curl, socks5:// resolves the destination hostname on the client. With socks5h:// the SOCKS5 proxy resolves it. The difference is the final h in the proxy URL. Both modes can still show the same public exit IP.

These settings apply to that curl transfer. A browser or another library can choose a different resolver. The curl SOCKS proxy guide documents which side performs each lookup.

The same client and machine must pass both IP and DNS checks.

When a DNS leak is not the main risk

DNS is only one signal. Cookies, browser fingerprints, login history, headers, WebRTC behavior and account behavior can reveal identity or trigger challenges even when DNS is clean. Treat DNS testing as one checkpoint, not a full anonymity guarantee.

For risky setups, keep tasks separated by profile, proxy, account and purpose. Avoid mixing personal browsing, customer accounts and automated checks in the same environment.

How to read a DNS leak test result

  • Proxy exit, familiar ISP resolver. If you expected the proxy to resolve the name, check the client setting. The same resolver can serve both routes, so its name alone is inconclusive.
  • Resolver listed in another country. The result identifies the resolver that queried the test service. Public DNS services can use shared infrastructure, and an IP location label alone cannot establish a leak.
  • No resolver shown. The test produced no usable DNS observation. Try a fresh test in the same client before changing the configuration.

FAQ

Is a DNS leak the same as an IP leak?

No. The visible website IP can be proxied while DNS still uses a local resolver.

Do HTTP proxies always prevent DNS leaks?

Not automatically. It depends on the client and how requests are made.

Can SOCKS5 prevent DNS leaks?

It depends on where the client resolves the destination name. For example, curl asks the proxy to resolve it with socks5h and performs the lookup on the client with socks5.

Should I test DNS in another browser?

No. Test in the exact browser profile or tool that will use the proxy.

Does clean DNS mean full anonymity?

No. Cookies, fingerprints, accounts and behavior still matter.

After fixing DNS behavior, retest the same profile with the proxy checking guide, then document the profile, proxy, DNS result and use case before scaling.

Scroll to Top