Definition
DNS resolution translates a hostname into an address. With a proxy, the destination hostname may be resolved by the client or passed to the proxy for resolution, depending on the protocol and client settings.
Two names may need resolution
The client may first need to resolve the proxy gateway’s hostname so it can connect. Separately, someone must resolve the destination hostname. Moving destination resolution to the proxy does not necessarily remove the client’s need to resolve the gateway.
RFC 1928 allows SOCKS5 requests to carry a domain name, an IPv4 address, or an IPv6 address. If a client sends a resolved address, destination resolution has already occurred on the client side. If it sends a domain name, the proxy receives the name to process.
A client-specific example
curl documents --socks5 as resolving the destination hostname locally, while --socks5-hostname lets the proxy resolve it. The socks5:// and socks5h:// proxy schemes expose the same important distinction in curl configuration. Other clients must be checked against their own documentation.
These option names are configuration examples, not live tests. A remote-resolution option is not evidence that every other browser or operating-system lookup also uses that route.
Diagnose the failing lookup
Distinguish failure to resolve the proxy host from failure to resolve the destination. curl’s documented exit codes separate these cases. If the gateway cannot be resolved, the client has not yet reached the service. If the destination lookup fails later, changing a proxy password is unlikely to address that lookup.
Resolution location can affect which address is returned for a destination. Record the client mode when comparing network results, and do not infer exact physical location from the returned address alone.
Sources
Sources checked on November 18, 2026. Examples are illustrative, not measurements of a live proxy service.
Related concepts
Frequently asked questions
Does SOCKS5 always send domain names to the proxy?
No. It supports several address types, and the client chooses how to form the request.
What does the h in socks5h mean in curl?
It requests hostname resolution through the SOCKS5 proxy rather than local destination resolution.
Can remote destination DNS still require local DNS?
Yes. The client may need to resolve the proxy gateway hostname first.
Is DNS failure the same as proxy authentication failure?
No. Name resolution and authentication are different stages.
Does remote DNS guarantee full privacy?
No. It changes one part of the request path; other network and application signals remain relevant.