SOCKS5 vs SOCKS5h: Where Does Your Proxy Resolve DNS?
A proxy can forward your connection while your computer still resolves the destination. Understand curl's socks5 and socks5h settings and test DNS behavior deliberately.

In curl, socks5:// resolves the destination hostname on the client, while socks5h:// sends that hostname to the SOCKS5 proxy for resolution. The extra letter changes who performs the DNS lookup. It does not create a different type of residential IP, add encryption or guarantee that a website accepts the request.
This distinction helps explain a familiar problem: your proxy connects successfully, yet one application cannot resolve a target or receives a different destination address than another. Compare DNS behavior before changing providers or assuming the proxy itself is offline.
What happens before a proxied request reaches a website?
Your client first needs to reach the proxy gateway. If that gateway is given as a hostname, the client normally needs to resolve it. The client then negotiates with the proxy and requests a connection to the target. At that stage, it can provide a target address already resolved locally or a hostname for the proxy to resolve, depending on the protocol and configuration.
Separate gateway DNS from target DNS when investigating a failure. Configuring remote resolution for the target does not mean your computer performs no DNS requests at all. The browser, operating system and other applications can also make requests outside the individual proxy connection you configured.
SOCKS5 and SOCKS5h in curl
| Setting | Destination name resolution | Useful diagnostic question |
|---|---|---|
socks5://gateway:port | curl resolves locally | Can my local resolver resolve the target correctly? |
socks5h://gateway:port | The proxy resolves the target hostname | Can the provider's route resolve and reach the target? |
The naming convention here is curl's documented URL syntax. Do not assume that another library or browser interprets the same text identically. Check its documentation for the setting that sends hostnames to the proxy rather than resolving them locally.
How can I compare local and remote resolution?
Use a small request to a hostname you control or are authorized to test. Copy the gateway, port and credentials from the provider's generator. Keep those details private and run equivalent requests with the same target and deadline settings.
# Set these URLs locally using your generated endpoint.
# Local DNS: socks5://...
curl --proxy "$SOCKS_LOCAL_URL" --connect-timeout 15 --max-time 30 'https://example.com/'
# Proxy DNS: socks5h://...
curl --proxy "$SOCKS_REMOTE_URL" --connect-timeout 15 --max-time 30 'https://example.com/'Record the error message and stage of failure for each request. “Could not resolve host” and “connection timed out” suggest different next steps. A successful HTTP response followed by an application error is another category again. Keep proxy session settings stable while comparing so an exit change does not introduce an extra variable.
Does local DNS always mean a privacy leak?
It means the target lookup occurred outside that proxy's resolution step. Whether this violates your requirements depends on your intended setup. For example, a controlled monitoring system may deliberately use its own resolver. A privacy-sensitive application may require target resolution through the proxy.
Define the requirement before using the word “leak.” Test the relevant application and process rather than assuming a single IP-check page proves how every name lookup is handled. Remote target DNS is one setting within a larger system; it is not a complete privacy audit of the computer.
Why can the same hostname behave differently?
Resolvers and networks may return different answers because of caching, routing or geographic decisions. A hostname may also advertise IPv4 and IPv6 records. Your client and the proxy's network can make different connection choices, so an apparent location or reachability difference deserves a controlled comparison.
Use the IPv6 DNS checker to inspect advertised records, then verify the actual request through the proxy. An AAAA record is an availability signal, not proof that every subdomain and redirect in a workflow works over IPv6. The IPv6 compatibility guide explains that distinction.
How should I troubleshoot an application that works only with SOCKS5h?
Begin with the application's documented proxy syntax and optional dependencies. Confirm that the proxy endpoint is the same one that passed your command-line test. Then compare target resolution: local DNS may fail, return an unsuitable address or be restricted by the environment. If remote resolution works, preserve the exact setting and document why the application needs it.
Also compare authentication and scheme handling. An HTTP proxy URL accidentally entered in a SOCKS field can fail before DNS becomes relevant. A browser extension may apply to only one profile, while a command-line environment variable applies to only one process. Keep each comparison narrow enough that its result has a useful explanation.
Does remote DNS solve every proxy problem?
No. A proxy-side lookup cannot fix an expired plan, invalid credentials, an unreachable gateway or a destination access policy. It also does not make an IPv6-only exit reach an IPv4-only destination without suitable routing support. When DNS succeeds but the request still fails, proceed to connection and application diagnosis.
On WhiteProxies, choose a documented protocol in the proxy generator, then use the appropriate syntax in your client. Compare IPv4 residential and IPv6 residential against the destinations you actually need. Match protocol, addressing and DNS settings as three related but distinct decisions.