Proxy glossary

What is socks5h:// (SOCKS5 with remote DNS)?

socks5h:// is a proxy URL scheme where the proxy resolves the target hostname, while with socks5:// your own machine looks the name up first.

socks5h explained

Also called SOCKS5 with remote DNS.

A SOCKS5 request can name its destination as an IP address or as a hostname. With socks5://, the client resolves the hostname itself and hands the proxy an IP. With socks5h://, the h stands for hostname: the client passes the name through and the proxy does the lookup.

The difference is where the DNS query goes. Local resolution sends the site name to your own resolver, usually your ISP or a public DNS service, outside the proxy. The answer can also be a different address than the proxy would have got from where it sits, which matters for sites that return per-country results. See DNS leak for the privacy side.

curl understands both schemes, and --socks5-hostname is its older spelling of socks5h. Python Requests needs pip install "requests[socks]" and accepts socks5h:// in the proxies dict. httpx takes a socks5:// URL once httpx[socks] is installed; check on your version with a lookup test rather than assuming. Tools that only know socks5:// and resolve locally are a common source of leaks.

HTTP proxies do not need the suffix: with a CONNECT tunnel the client sends the hostname to the proxy anyway.

For example

Two curl runs against a hostname that only resolves inside a private zone. With socks5:// the local lookup fails before the proxy is asked. With socks5h:// the proxy resolves it and the request goes through.

terminal
curl -x socks5://USER:PASS@IP:PORT https://httpbin.org/ip
curl -x socks5h://USER:PASS@IP:PORT https://httpbin.org/ip

Swap in your own credentials from the dashboard. It also lists the host and port for each order; where they differ from this example, the dashboard is right.

How it works at ProxyMonkey

  • All three lines speak SOCKS5. Your dashboard lists the host, port and credentials for each order.
The community layer

Not sure how it applies to you?

Post what you are trying to do in Discord. Someone who has hit the same thing will explain it against your setup.

Join the Discord

4,200+monkeys in the Discord

  • Help from humans

    Post your error, get an answer. Usually in minutes, usually from someone who has hit the same wall.

  • A status bot that tells on us

    Pool health, incidents and maintenance posted automatically. Including the bad days.

  • Deals and free traffic

    Bonus GB drops, early access to new pools, and the occasional giveaway for a good bug report.

Join the Discord4,200+ monkeys, free to lurk