DNS Resolution Through a Proxy (DNS Resolution Through a Proxy)
Proxy DNS resolution concerns who translates the destination hostname into an address: the client or the proxy. The answer depends on the proxy protocol and the client’s selected mode.
Explanation
There can be two different lookups
The client may need to resolve the proxy hostname before connecting. Separately, the destination hostname must be handled. Sending the destination name to the proxy does not eliminate the first lookup. A failed lookup of the gateway and a failed lookup of the destination are different diagnostic events.
RFC 1928 supports a domain-name address type as well as IPv4 and IPv6. If the SOCKS request contains an address already resolved by the client, the destination lookup has occurred locally; if it carries a hostname, the proxy receives that name to process.
curl exposes the difference explicitly
The curl documentation distinguishes socks5:// from socks5h://. The former resolves the destination locally; the latter sends its hostname to the SOCKS5 proxy. The corresponding options are --socks5 and --socks5-hostname. This is curl behavior, not a universal guarantee about identically named fields in all applications.
For an illustrative configuration, changing only the resolution mode can change which resolver handles example.com. It does not change the user’s authorization or prove that every other application lookup on the device follows the same route.
What to record in a comparison
Keep the destination, client version and resolution mode in the test record. Name the failing lookup before replacing credentials or exits. If an application reports only a broad connection error, obtain the underlying redacted error rather than interpreting every lookup failure as a dead proxy.
Further reading
- How to Set Up SOCKS4 and SOCKS5 Proxies: A Beginner's Step-by-Step Guide
- What Is a SOCKS5 Proxy? SOCKS4 vs. SOCKS5 Explained
- Why Do Proxy IP Requests Time Out? Troubleshooting from Connection to Retry
References
Sources checked on November 19, 2026. Scenarios and numerical examples explain the concepts; they are not proxy performance measurements.
Frequently Asked Questions
Not in curl. socks5 resolves locally, while socks5h sends the destination name to the proxy.
Yes. The client may first resolve the proxy gateway hostname.
No. It controls one lookup path; other network and application information remains relevant.