Security & Best Practices · November 25, 2026 · 5 min read · Ler em português
SOCKS5 or SOCKS5h: the DNS leak that gives away your location
The difference between socks5 and socks5h, why a DNS lookup outside the proxy reveals your real network, and how to test whether your setup leaks.
You set up the proxy, the site shows the right IP, and still the platform seems to know where you're connecting from. One common cause is a DNS leak: the lookup that turns the site's name into an address goes out through your own internet, not through the proxy.
What a DNS lookup is
Before opening a site, the program asks a DNS server for that name's address. The question reveals which sites you visit and goes out through whichever provider makes it. If it doesn't go through the proxy, anyone watching the network sees your real provider.
socks5 vs socks5h
- socks5://: the program resolves the site's name on your machine, with your internet's DNS, and only then sends the address to the proxy. The DNS lookup stays outside the proxy.
- socks5h://: the program sends the site's name to the proxy, and the proxy does the lookup. DNS goes out through the proxy's network, with the rest of the traffic.
This notation is used by cURL and libraries such as Python's requests. For anyone testing a proxy from the terminal, the difference matters: a test with socks5:// can fail or behave differently from the browser just because of DNS.
What about browsers?
Each browser handles DNS over SOCKS its own way. Firefox has a "Proxy DNS when using SOCKS v5" option that must be checked. Antidetect browsers usually resolve DNS through the proxy, but the safe approach is to test instead of assuming.
How to test for leaks
- With the proxy on, open a DNS leak test site.
- Check which DNS servers show up: they should belong to the proxy's network, not your internet provider.
- If your provider shows up, fix the setup (socks5h in the terminal, remote DNS option in the browser) and test again.
Summary
The right IP isn't enough: DNS must go through the proxy too. In the terminal, use socks5h://. In the browser, confirm with a leak test before using important accounts.
Ready to run on a dedicated Mobile Proxy?