curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: curl failed to connect with socks5.

From: Daniel Stenberg via curl-users <>
Date: Sat, 5 Sep 2020 00:27:26 +0200 (CEST)

On Fri, 4 Sep 2020, Hongyi Zhao via curl-users wrote:

> werner_at_X10DAi-01:~$ curl -vI -x socks5h://


> werner_at_X10DAi-01:~$ curl -vI -x socks5://
> curl: (7) Can't complete SOCKS5 connection to (1)

> As you can see, the curl connection via sock5h protocol succeeded but failed
> with the socks5. Any hints for this problem?

The primary, and really only, difference between socks5:// and socks5h://
proxies is that the latter lets the proxy resolve the host name while in the
former case curl itself resolves the host name and passes on the IP address to
connect to instead of the host name.

I would say this might suggest that your host and the proxy resolves the host
name differently.

  / | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
Received on 2020-09-05