Glossary · Networking
socks5h
socks5h is the proxy URL scheme that tells a client to use a SOCKS5 proxy and send it the destination hostname, so the proxy resolves DNS; with socks5 the client resolves the name itself and sends the proxy only an IP address. curl defines socks5h:// as the equivalent of its --socks5-hostname option, and Python requests follows curl.
Reviewed 2 Nov 2026
# Your machine resolves example.com, the proxy receives an IP addresscurl -x "socks5://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000" https://example.com/# The proxy receives "example.com" and resolves it at the exitcurl -x "socks5h://USERNAME_pool-arcfast_country-de:PASSWORD@proxy.arcproxies.io:8000" https://example.com/# same as: curl --socks5-hostname proxy.arcproxies.io:8000 -U 'USERNAME_pool-arcfast_country-de:PASSWORD' https://example.com/# Python: pip install "requests[socks]"# requests.get(url, proxies={"http": "socks5h://...", "https": "socks5h://..."})What the proxy actually receives
A SOCKS5 CONNECT request carries an address type (ATYP): 0x01 for an IPv4 address, 0x03 for a domain name, 0x04 for an IPv6 address (RFC 1928). The scheme decides which one your client sends. We logged it on a local SOCKS5 server on 2026-11-02: curl -x socks5://... arrived as ATYP=4 (IPv6 ADDRESS) dest=2606:4700:10::ac42:93f3:443, and curl -x socks5h://... as ATYP=3 (DOMAIN NAME) dest=example.com:443.
With socks5, your machine's resolver sees every hostname you visit and picks the address, which is the DNS leak problem: location-aware DNS can hand a German exit the server chosen for your office. With socks5h, the exit resolves the name the way a local user would. SOCKS5 covers the protocol itself.
Which clients honour which scheme
Each row was run against the same logging SOCKS5 server; the result column is what the server received.
| Client (version run) | socks5:// | socks5h:// |
|---|---|---|
curl 8.7.1 -x | IP address (resolved locally) | Hostname |
curl 8.7.1 --socks5 / --socks5-hostname | IP address | Hostname |
| Python requests 2.34.2 + PySocks 1.7.1 | IP address | Hostname |
| httpx 0.28.1 + socksio 1.0.0 | Hostname | Hostname |
aiohttp-socks 0.12.0 ProxyConnector.from_url | Hostname (rdns defaults to True for SOCKS5); rdns=False sent an IPv4 address | Rejected: ValueError: Invalid scheme component: socks5h |
| Node socks-proxy-agent 10.1.0 | IP address | Hostname |
Chrome / Chromium 156 --proxy-server | Hostname | Rejected: net::ERR_NO_SUPPORTED_PROXIES |
So the h only matters in curl-style clients. httpx sent the hostname for both schemes, aiohttp-socks and Chrome do so for socks5:// and do not accept socks5h:// at all. Chrome's own documentation says SOCKS5 name resolution is "always done proxy side"; details in ERR_NO_SUPPORTED_PROXIES.
Which one to use
- curl, Python requests, Node socks-proxy-agent:
socks5h://. With requests, installrequests[socks]first, or you getMissing dependencies for SOCKS support. - httpx: either works;
socks5h://documents the intent. - aiohttp-socks, Chrome:
socks5://; the hostname still goes to the proxy. - Browsers with a password: Chrome cannot authenticate to SOCKS5. ARC serves HTTP and SOCKS5 on the same port with the same credentials, so use
http://there; with an HTTP proxy the hostname travels in the CONNECT request and is resolved at the proxy too. - Not sure the string works at all? The free proxy tester accepts
socks5h://user:pass@host:port.
FAQ
Questions
Something not covered? Write to contact@arcproxies.io.
What is the difference between socks5 and socks5h?
Both use a SOCKS5 proxy. With socks5h the client sends the hostname and the proxy resolves it; with socks5 the client resolves the hostname itself and sends an IP address. curl and Python requests follow this rule; some other clients send the hostname for both.
Is socks5h the same as curl --socks5-hostname?
Yes. curl documents the socks5h:// prefix in -x as the equivalent of --socks5-hostname, and socks5:// as the equivalent of --socks5, which resolves the hostname locally.
Should I use socks5h with Python requests?
Yes, if you want DNS resolved at the proxy. requests documents that socks5 resolves on the client and socks5h on the proxy, in line with curl. Install requests[socks] for SOCKS support.
Why does Chrome reject socks5h?
Chrome's proxy parser does not know the scheme and reports ERR_NO_SUPPORTED_PROXIES. It does not need it: with socks5:// Chrome already sends the hostname to the proxy.
Does socks5h hide my DNS lookups?
It moves them to the proxy, so your own resolver no longer sees the hostnames and the address is chosen near the exit. The proxy itself sees the hostname, as it would with an HTTP proxy.
Sources & review
Last reviewed by the ARC Proxies team. Prices are read from the live catalog at build time.
- [1]IETF: RFC 1928: SOCKS Protocol Version 5
- [2]curl: curl man page (--socks5, --socks5-hostname, socks5h://)
- [3]Requests: Advanced usage: SOCKS
- [4]Chromium: Proxy support in Chrome: SOCKSv5 proxy scheme
- [5]aiohttp-socks: README: ProxyConnector and rdns
In practice