# DNS Leak Test With a Proxy: socks5 vs socks5h

> A DNS leak test through residential and mobile proxies: HTTP and socks5h resolved names at the proxy; with socks5:// curl resolved names on our own line.

[Home](https://quanticdata.io/) / [Blog](https://quanticdata.io/blog/) / DNS Leak Test With a Proxy: socks5 vs socks5h

# DNS leak test through a proxy: who looks up the names you visit

Proxies · Nov 20, 2026 · 5 min read · By [Aldo Morese](https://quanticdata.io/about/), founder of QuanticData

![Which resolver looked up the name in a DNS leak test through a proxy: with an HTTP proxy and with socks5h the lookup happened on the proxy side, in the United States or the Netherlands; with plain socks5 curl resolved the name on our own line and the test reported a resolver in Italy; the card sums up the rule: let the proxy resolve.](https://quanticdata.io/blog/dns-leak-test-proxy/hero.webp?v=20261120h)

On this page

- [What a DNS leak is, and why it matters with a proxy](https://quanticdata.io/blog/dns-leak-test-proxy/#what-a-dns-leak-is-and-why-it-matters-with-a-proxy)
- [Run a DNS leak test from the command line](https://quanticdata.io/blog/dns-leak-test-proxy/#run-a-dns-leak-test-from-the-command-line)
- [A DNS leak test in the browser](https://quanticdata.io/blog/dns-leak-test-proxy/#a-dns-leak-test-in-the-browser)
- [How to read a DNS leak test result](https://quanticdata.io/blog/dns-leak-test-proxy/#how-to-read-a-dns-leak-test-result)
- [How to fix a DNS leak with a proxy](https://quanticdata.io/blog/dns-leak-test-proxy/#how-to-fix-a-dns-leak-with-a-proxy)
- [Residential or mobile, with lookups on the proxy side](https://quanticdata.io/blog/dns-leak-test-proxy/#residential-or-mobile-with-lookups-on-the-proxy-side)

A DNS leak test shows which DNS resolver looked up the sites you visit. Through a proxy, the lookup should happen on the proxy side. In our tests it did with HTTP proxies and with socks5h. With plain socks5, curl looked up names on our own connection, and the test reported our resolver in Italy: a leak.

**Run it on the free credit.** Every QuanticData account gets $2 of free API usage per month.

[Start free — $2/month included](https://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-lead&utm_content=dns-leak-test-proxy) · [Explore Residential Proxies from $0.80/GB](https://quanticdata.io/residential-proxies/)

We ran the checks on 20 November 2026 from an Italian broadband line, with curl 8.21.0 and with Chromium 149, through QuanticData Residential Basic, Residential Premium and Mobile. Resolver and exit IPs are masked.

## What a DNS leak is, and why it matters with a proxy

Before a client can connect to a site, the site's name has to be turned into an IP by a DNS resolver. If your client asks your own resolver while the page itself comes through a proxy, two things happen: your internet provider's resolver logs every name you visit, and the site's DNS servers see a lookup from your country while the page request arrives from the proxy's. That mismatch is what leak tests look for.

Who resolves depends on the protocol, not on the proxy brand:

| Proxy setting | Who resolves the name | Leaks DNS? |
| --- | --- | --- |
| HTTP proxy (`http://`, CONNECT for HTTPS) | The proxy: the client sends it the host name | No |
| SOCKS5 with remote resolution (`socks5h://`) | The proxy: the client sends it the host name | No |
| SOCKS5 with local resolution (`socks5://` in curl) | Your own resolver: the client sends the proxy an IP | Yes |

## Run a DNS leak test from the command line

edns.ip-api.com answers with the resolver that looked up a one-time name it made up for your request, so no cache can hide the result. One command per setup:

```bash
curl -L http://edns.ip-api.com/json
curl -L -x http://USER:PASS@residentialpremium.quanticdata.io:8080 http://edns.ip-api.com/json
curl -L -x http://USER:PASS@mobile.quanticdata.io:8080 http://edns.ip-api.com/json
curl -L -x socks5h://USER:PASS@mobile.quanticdata.io:1080 http://edns.ip-api.com/json
curl -L -x socks5://USER:PASS@mobile.quanticdata.io:1080 http://edns.ip-api.com/json
```

| Setup | Resolver the test saw | Result |
| --- | --- | --- |
| No proxy | Italy, Cloudflare | Our own resolver (the baseline) |
| Residential Premium, HTTP | Netherlands, Google | Resolved on the proxy side |
| Mobile, HTTP | United States, Cloudflare | Resolved on the proxy side |
| Mobile, socks5h | United States, Cloudflare | Resolved on the proxy side |
| Mobile, socks5 | Italy, Cloudflare | Leak: resolved on our line |

The proxy was the same mobile gateway in the last two rows. The only change was one letter in the scheme, and it moved the lookup from the United States back to Italy. In curl, `socks5h://` (or `--socks5-hostname`) means "let the proxy resolve"; `socks5://` means "resolve here, send the proxy an IP". More curl proxy options are in [how to use a proxy with curl](https://quanticdata.io/blog/how-to-use-a-proxy-with-curl/), and more on the protocol on our page for [SOCKS5 proxies](https://quanticdata.io/socks5-proxies/).

```bash
curl -L -x socks5h://USER:PASS@mobile.quanticdata.io:1080 http://edns.ip-api.com/json
{
    "dns": {
        "geo": "United States - Cloudflare, Inc.",
        "ip": "x.x.x.x"
    }
}

curl -L -x socks5://USER:PASS@mobile.quanticdata.io:1080 http://edns.ip-api.com/json
{
    "dns": {
        "geo": "Italy - Cloudflare, Inc.",
        "ip": "x.x.x.x"
    }
}
```

## A DNS leak test in the browser

We opened browserleaks.com/dns, which looks up 50 random names and lists the resolvers that asked for them, in Chromium 149 set to use each of our three networks over HTTP:

| Network | Exit the page saw | Resolvers listed | In Italy? |
| --- | --- | --- | --- |
| Residential Premium, Germany | Vodafone Kabel Deutschland, Germany | Google (Groningen, Netherlands), Vodafone Kabel Deutschland | No |
| Mobile, US | Verizon Business, US | Google (Council Bluffs), Cloudflare (Chicago), Verizon Business (Boston) | No |
| Residential Basic, US | RCN, Ashburn | Google (Morganton) | No |

Every resolver sat in the proxy's country or next to it, and none in Italy. A browser set to an HTTP proxy hands the host names to the proxy, so the lookups happen there.

**Try it on your own targets.** Every QuanticData account gets $2 of free API usage per month.

[Start free — $2/month included](https://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-inline&utm_content=dns-leak-test-proxy) · [Explore Residential Proxies from $0.80/GB](https://quanticdata.io/residential-proxies/)

## How to read a DNS leak test result

- **Start from a baseline.** Run the test once without the proxy and note the resolver: for us, Cloudflare in Italy. A leak is that same resolver showing up while the proxy is on.
- **A resolver in a neighbouring country is normal.** Public resolvers run in many data centres, and the one that answers is not always in the exit's country: our German Residential Premium exits were served from the Netherlands.
- **Several resolvers are normal too.** browserleaks.com looks up 25 IPv4-only and 25 IPv6-only names, and big resolver networks spread them over several servers: the mobile run listed three providers in three US cities.
- **The resolver's company does not matter, its location does.** Cloudflare appeared both in the leak and in the clean runs; what changed was Italy versus the United States.

## How to fix a DNS leak with a proxy

- **Use `socks5h://`, not `socks5://`,** wherever the tool offers both: curl, and libraries that follow curl's naming.
- **Pick the form that resolves at the proxy.** Use the HTTP form of the proxy, or SOCKS5 with remote resolution.
- **Rerun the test after every change** and compare with your baseline without proxy.
- **Check WebRTC too:** it is the other usual leak in a browser, covered in our [WebRTC leak test](https://quanticdata.io/blog/webrtc-leak-test-proxy/).

A VPN routes all of a device's lookups and needs its own DNS setting; the differences are in [residential proxy vs VPN](https://quanticdata.io/blog/residential-proxy-vs-vpn/).

## Residential or mobile, with lookups on the proxy side

When the lookup happens at the proxy, the site's DNS and its web server see the same side of the world. Residential Basic and Premium give home IPs in the country you pick; Mobile gives carrier IPs. See [residential proxies](https://quanticdata.io/residential-proxies/) and [mobile proxies](https://quanticdata.io/mobile-proxies/), or start with the [Residential Basic free trial](https://quanticdata.io/residential-proxy-free-trial/). To see how IP databases place an exit, use our [proxy location checker](https://quanticdata.io/tools/proxy-location-checker/); for the rest of what a site can learn, read [how to hide your IP address](https://quanticdata.io/blog/how-to-hide-ip-address/).

### Sources & further reading

- [curl manual: --socks5-hostname](https://curl.se/docs/manpage.html#--socks5-hostname)
- [RFC 1928: SOCKS Protocol Version 5 (DOMAINNAME address type)](https://www.rfc-editor.org/rfc/rfc1928)
- [RFC 9110: HTTP Semantics, CONNECT](https://www.rfc-editor.org/rfc/rfc9110#name-connect)

## FAQ

Quick answers on dns leak test.

[Something else? Ask us](mailto:hello@quanticdata.io)

### What is a DNS leak?

When the names you visit are looked up by your own resolver while your traffic goes through a proxy or VPN. Your provider can log the names, and sites can see a lookup from your country next to a request from the proxy's.

### Do proxies leak DNS?

It depends on the setting. In our tests, HTTP proxies and socks5h resolved names on the proxy side. Plain socks5 in curl resolved them on our own line, and the test reported our resolver in Italy.

### What is the difference between socks5 and socks5h?

With `socks5h://` the proxy resolves the host name; with `socks5://` the client resolves it and sends the proxy an IP. Through the same mobile gateway, socks5h gave a resolver in the United States and socks5 one in Italy.

### How do I run a DNS leak test?

Compare the resolver a test reports without the proxy and with it. From the command line, `curl -L -x PROXY http://edns.ip-api.com/json`; in a browser, a DNS leak test page through the proxy. A resolver in your own country through the proxy is a leak.

### Does an HTTP proxy hide my DNS lookups?

For the requests it carries, yes: the client sends the host name to the proxy, which resolves it. Through our Residential Premium and Mobile HTTP gateways, the resolvers were in the Netherlands and the United States, not Italy.

## Proxies that resolve on their side

Residential and mobile proxies in the country you pick, with name lookups done on the proxy side.

[Start free — $2/month included](https://quanticdata.io/signup/?utm_source=blog&utm_medium=website&utm_campaign=blog-end&utm_content=dns-leak-test-proxy) · [Explore Residential Proxies from $0.80/GB](https://quanticdata.io/residential-proxies/)

## Related reading

- [HTTP vs HTTPS: What a Proxy Sees in Each](https://quanticdata.io/blog/http-vs-https-proxy/): Proxies · HTTP sends requests as plain text; HTTPS wraps the same requests in TLS. We put a logging relay in front of a residential proxy line on 20 November 2026 and captured both: 340 readable bytes for http://, and for https:// one CONNECT line followed by 803 encrypted bytes.
- [Change Proxy IP by Link: Rotation Links](https://quanticdata.io/blog/change-proxy-ip-by-link/): Proxies · A rotation link is a URL that restarts one sticky session: open it and the session starts again; in our test of 20 November 2026 each of three calls was followed by a new exit IP. Below: the API call that creates the link, what it answered, the 10-second pause between rotations, and what to do on Mobile and Residential Premium.
- [ISP Proxy API: Stock, Quote and Buy by Code](https://quanticdata.io/blog/isp-proxy-api/): Proxies · The Premium ISP endpoints let a script do what the configurator does: read the catalog with live stock, pick a pool or a city and carrier, get a server-side quote and buy from the balance. Below: each call with the answer we got on 20 November 2026, what "currently unavailable" means, and how to write a buyer that never pays twice.

---

Source: https://quanticdata.io/blog/dns-leak-test-proxy/ · Site index for AI: https://quanticdata.io/llms.txt
