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. SOCKS5 leaked the name on 36 of 36 probes. SOCKS5h leaked it on 0 of 36. HTTP CONNECT leaked it on 0 of 36. The direct baseline, with no proxy at all, also queried that same cloud resolver on 36 of 36 probes, so a zero on the remote paths is not a monitor that failed to see DNS.
The residential path in these measurements was ProxySeller
We used one ProxySeller residential credential bundle for the SOCKS and HTTP CONNECT probes. This is an affiliate link. The leak counts do not change if you follow it, and it is not a ranking of providers.
Визит ProxySellerThe answer
DNS for these destinations resolved on the VM under SOCKS5, and at the proxy under SOCKS5h and HTTP CONNECT. The destination name leaked to the cloud resolver before the proxy only on SOCKS5. That is the ordinary meaning of those three client modes, and it held for every name and every slot we ran.
SOCKS5, as specified in RFC 1928, can carry either an IP address or a domain name. The mode people label SOCKS5 resolves first and then sends the address (address type IPv4). The mode people label SOCKS5h sends the domain (address type domain) and lets the proxy resolve it. HTTP CONNECT, defined in RFC 9110, puts hostname:443 in the request line, so the proxy is the component that looks the name up. Curl documents the same split between --socks5 и --socks5-hostname in the ручное скручивание.
Destination queries that reached the cloud resolver
Each bar is 36 probes. Direct has no proxy, so the lookup is the path rather than a leak before one. SOCKS5 matches that bar. The two remote modes sit at zero.
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 were not asking whether a page loaded, whether a credential reached an origin, or whether a browser leaked a second address. Those questions are already covered in the proxy auth header diary, IPv6-behind-an-IPv4-proxy test, and the DNS path intermittency diaryЭто proxy routing notes ask whether traffic reaches a proxy at all. Here the traffic did reach the proxy. The open question was who learned the name first.
We froze six hostnames before the first proxy probe and did not replace any of them: example.com, iana.org, www.wikipedia.org, cloudflare.com, dns.googleи one.one.one.one. We ran four conditions on each name, in that order, in a fresh process: cloud-direct, SOCKS5, SOCKS5h, and HTTP CONNECT. Six slots, from the first measurement on 28 November through 18:00 UTC on 30 November. No window was missed, and we did not backfill.
How we measured a lookup
The client
The vantage was a USA cloud agent. Name service on that image is hosts: files dnsи resolv.conf pointed at one non-loopback private nameserver. That nameserver is what we mean by the cloud resolver. We stored it as an address class (private on every slot) and a salted hash. 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.
getaddrinfo is the call a normal client uses. We logged it with a small 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. So we also ran strace на connect, sendmmsg, sendto, sendmsg, recvfromи 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 in memory, hashed addresses with a salt that never left the machine, and deleted the trace. We did not trace send или recv, so proxy authentication bytes were not in the file.
What counted as a leak
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. We marked that moment in the probe, after local resolution for SOCKS5 and before any proxy socket for SOCKS5h and CONNECT. Queries for the proxy’s own hostname do not count. We have to resolve the proxy once or we cannot open it. On every proxy probe that proxy-name lookup was present, and on every direct probe it was absent, which is what we expect. TLS server name is not a DNS query. It rides the tunnel after DNS is already done.
When we sent an IPv4 address into SOCKS, we say the connection used the cloud resolver. When we sent only the hostname and the proxy completed the connect, we say the connection used the proxy’s resolver. We never saw that resolver’s address.
Credentials stayed in the process environment. They were not placed on the command line. One residential bundle was reused with no session suffix and no country rotation. Connect timeout was 10 seconds, one attempt, no retry.
ProxySeller carried the proxied measurements
Direct probes did not use a proxy. The SOCKS5, SOCKS5h, and HTTP CONNECT probes did, through ProxySeller residential endpoints. The affiliate link is separate from the counts above.
Open the ProxySeller partner pageThe positive control
Before we treat a zero as “no leak,” the instrument has to see a lookup that we know should happen. Cloud-direct is that control. Each direct probe called getaddrinfo, sent a query to the private nameserver, and received a NOERROR answer. That happened on all 36 direct probes, in every slot. Each of those probes exchanged two messages, an A query and an AAAA query, which is what getaddrinfo does when the family is unspecified. Both went to the same private resolver.
Direct TLS then connected to the IPv4 answer. All 36 handshakes finished as TLS 1.3 with a certificate that matched the name. If the trace had been blind, these rows would have shown no query and we would have thrown the remote zeros out. They were not blind.
SOCKS5 resolved on the VM
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. getaddrinfo ran. The answer’s A-set hash matched the direct probe for the same name in the same slot, 36 of 36. We compare that boolean inside the slot. Address hashes are salted, and the salt file is not something to line up across days, so the match flag is the comparison we publish.
The SOCKS reply succeeded on all 36, including the one row whose TLS handshake later timed out. The bind address in every SOCKS reply was unspecified, all 72 SOCKS replies in the diary, so we did not treat the bind address as the destination. The proxy accepted the IP we gave it. It did not have to learn the name to do that.
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 (the stable names). 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.
Leaks before the proxy, by slot
Six names per slot. SOCKS5 stays at six. The remote modes stay at zero, including the slot with one TLS timeout.
SOCKS5h and HTTP CONNECT resolved at the proxy
SOCKS5h sent address type domain and the hostname. We did not call getaddrinfo on the destination. The trace showed no DNS question for that name, before the proxy connection or after it. The SOCKS reply was success on all 36, and TLS 1.3 with a matching certificate followed on all 36. The name was resolved somewhere on the proxy side. We cannot say which recursive server answered there.
HTTP CONNECT sent CONNECT hostname:443 с Proxy-Authorization only on that proxy request. The proxy returned 200 on all 36, which means it accepted the tunnel after connecting to the origin. Again there was no destination query on the VM, and again TLS 1.3 matched the name on all 36. Same locus as SOCKS5h: the proxy, not the cloud resolver.
That is why the two remote modes are not a softer version of SOCKS5. They move the lookup. 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, the observer sees the proxy connection and the proxy’s own name, not a DNS query for the destination.
Where the 144 connections were resolved
Direct and SOCKS5 used the VM resolver. SOCKS5h and HTTP CONNECT used the proxy. Each half is 72 probes.
Proxy-path checks, as a share of 36 probes
“A set matched direct” is zero for the remote modes because those modes never collected a local A set. That zero is not a mismatch. It is the absence of a local answer.
The six names
We picked names that are stable and names whose answers can depend on where the resolver sits. The leak result did not depend on that. Every name leaked under SOCKS5 and none leaked under the remote modes. What did vary was the shape of the cloud answer.
example.com, cloudflare.com, dns.googleи one.one.one.one returned two A records and two AAAA records on every direct and SOCKS5 probe. iana.org и www.wikipedia.org returned one A and one AAAA. Wikipedia’s answer also carried two CNAME records in every slot, and the question we transmitted was still www.wikipedia.org. Response code was NOERROR on every parsed answer. We connected with the first IPv4 address only, because the residential proxy path we used is IPv4.
| Имя хозяина | Роль | A records | AAAA records | CNAMEs in the answer | SOCKS5 matched direct |
|---|---|---|---|---|---|
example.com | Stable name | 2 | 2 | 0 | 6 / 6 slots |
iana.org | Stable organisation name | 1 | 1 | 0 | 6 / 6 slots |
www.wikipedia.org | CDN name | 1 | 1 | 2 | 6 / 6 slots |
cloudflare.com | Anycast name | 2 | 2 | 0 | 6 / 6 slots |
dns.google | Anycast resolver name | 2 | 2 | 0 | 6 / 6 slots |
one.one.one.one | Anycast resolver name | 2 | 2 | 0 | 6 / 6 slots |
A and AAAA counts on the cloud resolver
These counts were stable across all six slots. They describe the VM resolver’s answer, not the proxy’s.
Slot by slot
Each slot is 24 probes: six names times four conditions. The positive control held in all six. SOCKS5 leaked in all six. The remote modes did not leak in any. The only transport blemish is one TLS timeout.
| Slot (UTC) | Collected | Direct queries | SOCKS5 leaks | SOCKS5h leaks | CONNECT leaks | SOCKS5 TLS |
|---|---|---|---|---|---|---|
| 28 Nov first | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 | |
| 28 Nov 18:00 | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 | |
| 29 Nov 06:00 | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 5 / 6 | |
| 29 Nov 18:00 | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 | |
| 30 Nov 06:00 | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 | |
| 30 Nov 18:00 | 6 / 6 | 6 / 6 | 0 / 6 | 0 / 6 | 6 / 6 |
On 29 November at 06:00 UTC, SOCKS5 to one.one.one.one queried the cloud resolver, matched the direct A set, and received a SOCKS success. The TLS handshake then timed out. We did not retry. The other five SOCKS5 handshakes in that slot, and every SOCKS5h and CONNECT handshake, completed. DNS evidence for that row is the query and the SOCKS success, not the missing certificate check.
We stopped collection after 18:30 UTC on 30 November. The last slot was collected at 18:01 UTC, inside its window. Nothing was added after the stop.
Use the same class of path we measured, and check the DNS mode
If a workflow needs a residential exit, the client mode decides whether the destination name hits the machine’s resolver. SOCKS5 does. SOCKS5h and HTTP CONNECT, on this product and this client, did not. The link is an affiliate link to ProxySeller, the provider that carried these proxied probes.
See ProxySellerWhat 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 stub on the loopback interface 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. It does not identify which one, and the unspecified SOCKS bind address did not reveal the address the proxy chose.
- We did not compare address hashes across slots. Within each slot, SOCKS5 matched direct. That is the comparison that survives if the salt file is recreated.
- One residential credential bundle, six names, six slots, no browser, no WebRTC, no second country. A slot is a diary point. It is not a rate for all proxy users.
- SNI still carries the hostname to the destination after the tunnel exists. 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.
Доказательства
Redacted slot files, the frozen hostname list, and this article’s text are under /research/proxy-dns-lookup-path-3day/. Each slot has results.json и summary.json. Raw addresses, the proxy hostname, and credentials are not in those files. The private trace and the salt stayed off the public tree.
The downloadable write-up is research-article.md. The frozen method is protocol.md. We did not edit the method after the results came in.
Вопросы
Does SOCKS5 hide the site name from our own DNS resolver?
Not in this setup. On all 36 SOCKS5 probes the destination name was queried on the VM, and that query reached the cloud nameserver, before the proxy connection started. The proxy then received an IP address, not the hostname.
Did SOCKS5h or HTTP CONNECT leak the destination name to the cloud resolver?
No. Across 36 SOCKS5h probes and 36 HTTP CONNECT probes we saw no getaddrinfo call and no DNS query for the destination name. The proxy completed the connection, and the certificate matched the name.
Is TLS server name the same thing as a DNS leak?
No. After the tunnel exists, the TLS handshake sends the hostname as the server name to the destination. That is not a query to the cloud resolver. We counted only DNS messages to the nameserver in resolv.conf.
Which resolver did the proxy itself use?
We could not see it. A successful SOCKS domain connect or HTTP 200 shows that the proxy resolved the name and connected. It does not name the proxy’s upstream recursive server.
Does one TLS timeout change the DNS result?
No. On 29 November at 06:00 UTC the SOCKS5 tunnel to one.one.one.one succeeded and the name had already been queried locally, but the TLS handshake timed out. The DNS leak on that row still stands. The other 143 handshakes completed with TLS 1.3.