# SOCKS5 Sends Every Destination Name to the Cloud Resolver Before the Proxy

Collected 28–30 November 2026. Published 30 November 2026.

We asked one question six times, twelve hours apart, on the same six hostnames. When the client was SOCKS5, the destination name always reached the cloud virtual machine’s DNS resolver before the proxy connection started. When the client was SOCKS5h or HTTP CONNECT, that query did not happen. The proxy received the hostname, completed the connection, and the certificate matched the name.

The split was complete.

| Condition | Destination queries on the VM | Proxy connect | TLS 1.3 with a matching name |
| --- | ---: | ---: | ---: |
| Cloud direct (no proxy) | 36 / 36 | — | 36 / 36 |
| SOCKS5 (local resolve, IPv4 address) | 36 / 36 | 36 / 36 SOCKS success | 35 / 36 |
| SOCKS5h (remote resolve, domain) | 0 / 36 | 36 / 36 SOCKS success | 36 / 36 |
| HTTP CONNECT | 0 / 36 | 36 / 36 HTTP 200 | 36 / 36 |

144 probes. Six slots. No missed window. No backfill. The one TLS miss is SOCKS5 to `one.one.one.one` on 29 November at 06:00 UTC: the name had already been queried, the A set matched the direct probe, and the SOCKS reply succeeded. The handshake then timed out. We did not retry.

## What we asked

For the same destinations, where does DNS resolve, and does the destination name leak to the cloud resolver before the proxy?

We froze six hostnames before the first proxy probe and did not replace any of them:

- `example.com` — stable name
- `iana.org` — stable organisation name
- `www.wikipedia.org` — CDN name
- `cloudflare.com` — anycast name
- `dns.google` — anycast resolver name
- `one.one.one.one` — anycast resolver name

Four conditions, in that order, each in a fresh process: cloud-direct, SOCKS5, SOCKS5h, HTTP CONNECT. Slots: the first measurement on 28 November, then 28 November 18:00 UTC, 29 November 06:00 and 18:00 UTC, and 30 November 06:00 and 18:00 UTC. We stopped after 18:30 UTC on 30 November.

SOCKS5, in [RFC 1928](https://datatracker.ietf.org/doc/html/rfc1928), can carry an IP address or a domain name. The mode we label SOCKS5 resolves first and sends address type IPv4. The mode we label SOCKS5h sends address type domain. HTTP CONNECT, in [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-connect), puts `hostname:443` in the request line. Curl documents the same split between `--socks5` and `--socks5-hostname` in the [curl manual](https://curl.se/docs/manpage.html).

## How we measured a lookup

The vantage was a USA cloud agent. Name service was `hosts: files dns`. `resolv.conf` pointed at one non-loopback private nameserver. That nameserver is the cloud resolver. Every slot recorded its class as `private`. nscd was not running.

We did not download page bodies. After the TCP path existed we performed one TLS handshake with the public trust store and `server_hostname` set to the destination. Connect timeout was 10 seconds, one attempt, no retry.

[`getaddrinfo`](https://man7.org/linux/man-pages/man3/getaddrinfo.3.html) is the call a normal client uses. We logged it with a preload library. glibc then sends the DNS message with an internal `sendmmsg` on a connected UDP socket, which a preload on the public symbol does not see. We also ran `strace` on `connect`, `sendmmsg`, `sendto`, `sendmsg`, `recvfrom`, and `recvmsg`. A socket connected to port 53 on the configured nameserver, or a reply from that nameserver, counted as a cloud-resolver exchange. We parsed question names, response codes, TTLs, and address counts, hashed addresses with a salt that never left the machine, and deleted the trace. We did not trace `send` or `recv`, so proxy authentication bytes were not in the file. Message layout follows [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035).

A destination name leaked before the proxy when a DNS query for that exact name was sent to the configured nameserver before the proxy TCP connection started. Queries for the proxy’s own hostname do not count. We have to resolve the proxy once or we cannot open it. That proxy-name lookup was present on every proxy probe and absent on every direct probe. TLS server name is not a DNS query.

When we sent an IPv4 address into SOCKS, the connection used the cloud resolver. When we sent only the hostname and the proxy completed the connect, the connection used the proxy’s resolver. We never saw that resolver’s address.

Credentials stayed in the process environment. One residential ProxySeller bundle was reused, with no session suffix and no country rotation.

We compare `answer_matches_cloud_direct` inside a slot. Address-hash strings are salted. If the salt file is recreated, hashes from different days are not comparable. The match flag is the comparison we publish. Inside every slot, SOCKS5 matched the direct A set on 6 of 6 names.

## Positive control

Cloud-direct has to show a lookup, or a zero on the remote paths is a blind monitor. All 36 direct probes called `getaddrinfo`, sent a query to the private nameserver, and received NOERROR. Each exchanged two messages, A and AAAA, which is what `getaddrinfo` does when the family is unspecified. All 36 direct handshakes finished as TLS 1.3 with a certificate that matched the name.

## SOCKS5

SOCKS5 did the same lookup as direct, then opened the proxy and sent address type IPv4. On all 36 probes the destination query reached the cloud resolver before that proxy connection. The A-set hash matched the direct probe for the same name in the same slot, 36 of 36. The SOCKS reply succeeded on all 36. The bind address in every SOCKS reply in the diary, all 72 of them, was unspecified, so we did not treat the bind address as the destination.

glibc on this image does not cache successful answers. Minimum TTLs in the replies ran from 2 seconds (`www.wikipedia.org` on the evening of 28 November) to 300 seconds. A short TTL and a long TTL both still produced a new client query. The recursive resolver may have answered from its own cache. The name still left the VM.

## SOCKS5h and HTTP CONNECT

SOCKS5h sent the hostname. We did not call `getaddrinfo` on the destination. The trace showed no DNS question for that name. The SOCKS reply was success on all 36, and TLS 1.3 with a matching certificate followed on all 36. The name was resolved on the proxy side. We cannot say which recursive server answered there.

HTTP CONNECT sent `CONNECT hostname:443`. The proxy returned 200 on all 36. There was no destination query on the VM, and TLS 1.3 matched the name on all 36.

A network observer on the VM sees a connection to the proxy and, for SOCKS5, a prior DNS query for the site. For SOCKS5h and CONNECT, that observer sees the proxy connection and the proxy’s own name, not a DNS query for the destination. Server name indication still carries the hostname to the destination after the tunnel exists.

## The six names

The leak result did not depend on the name. Every name leaked under SOCKS5 and none leaked under the remote modes. The shape of the cloud answer did vary, and it was stable across slots:

| Hostname | A | AAAA | CNAMEs in the answer | SOCKS5 matched direct |
| --- | ---: | ---: | ---: | --- |
| example.com | 2 | 2 | 0 | 6 / 6 slots |
| iana.org | 1 | 1 | 0 | 6 / 6 slots |
| www.wikipedia.org | 1 | 1 | 2 | 6 / 6 slots |
| cloudflare.com | 2 | 2 | 0 | 6 / 6 slots |
| dns.google | 2 | 2 | 0 | 6 / 6 slots |
| one.one.one.one | 2 | 2 | 0 | 6 / 6 slots |

Wikipedia’s question name was still `www.wikipedia.org`. Response code was NOERROR on every parsed answer. We connected with the first IPv4 address only.

## Slot by slot

Each slot is 24 probes. The positive control held in all six.

| Slot (UTC) | Collected | Direct queries | SOCKS5 leaks | SOCKS5h leaks | CONNECT leaks | SOCKS5 TLS |
| --- | --- | ---: | ---: | ---: | ---: | ---: |
| 28 Nov first | 2026-11-28 11:44:12 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |
| 28 Nov 18:00 | 2026-11-28 18:01:42 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |
| 29 Nov 06:00 | 2026-11-29 06:01:14 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 5 / 6 |
| 29 Nov 18:00 | 2026-11-29 18:01:13 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |
| 30 Nov 06:00 | 2026-11-30 06:01:15 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |
| 30 Nov 18:00 | 2026-11-30 18:01:27 Z | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |

The last slot was inside its window. We added nothing after the stop.

## What this does not show

- We measured one Python client that implements the three modes, not every browser and not every build of curl. Browsers can resolve, use DNS over HTTPS, or ask a stub resolver we did not install.
- The cloud resolver was one private nameserver on one VM. Another image with a public resolver, DNS over TLS, or a loopback stub could move the packet without changing the client mode.
- We did not learn the proxy’s upstream resolver. Remote success plus a matching certificate shows that some resolver on that path answered.
- We did not compare address hashes across slots.
- One residential credential bundle, six names, six slots, no browser, no WebRTC, no second country. A slot is a diary point.
- Hiding the name from the cloud resolver does not hide it from the origin, or from a proxy that can see CONNECT or the SOCKS domain field.

## Evidence

Redacted `results.json` and `summary.json` files sit beside this article, one directory per slot. Raw addresses, the proxy hostname, and credentials are not in those files. The method we froze before the first proxy probe is `protocol.md`.

## Disclosure

We used ProxySeller residential endpoints for every SOCKS and HTTP CONNECT probe. Direct probes used no proxy. Links to ProxySeller on the site page are affiliate links. They are not a ranking, and the leak counts above do not depend on them.
