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 <curl-users_at_cool.haxx.se>
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://127.0.0.1:9050 www.baidu.com

...

> werner_at_X10DAi-01:~$ curl -vI -x socks5://127.0.0.1:9050 www.baidu.com
...
> curl: (7) Can't complete SOCKS5 connection to 220.181.38.150:80. (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.

-- 
  / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                   | Private help, bug fixes, support, ports, new features
                   | https://www.wolfssl.com/contact/
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2020-09-05