Where DNS is resolved
With socks5:// in curl, the client resolves the hostname itself and sends an IP address to the proxy. With socks5h://, the hostname is sent to the proxy and resolved there. Proxy-side resolution avoids local DNS lookups that reveal your own resolver and can return answers for the wrong region.
- curl -x socks5://user:pass@host:port: DNS on your machine.
- curl -x socks5h://user:pass@host:port: DNS on the proxy.
TCP, UDP and authentication
SOCKS5 defines CONNECT for TCP, BIND for inbound connections and UDP ASSOCIATE for datagrams. Many proxy setups support only TCP CONNECT, so state in the request if you need UDP.
Username and password are sent in clear text during the SOCKS handshake, so prefer TLS-protected targets for sensitive data, or use an IP allowlist.