Colly: socks5h protocol for proxies

Created on 7 May 2020  路  3Comments  路  Source: gocolly/colly

Hi guys,

Hope you are all well !

I installed protonvpn-docker and wanted to use it as a proxy for gocolly but it does not support socks5h protocol.

Is there a workaround for making it work ? Sounds like net/url doesn't parse this protocol, any idea why ?

Thanks in advance for any reply on these questions.

Cheers,
X

question

All 3 comments

What is the difference between socks5 and socks5h?

I've found an open issue about this topic: https://github.com/golang/go/issues/24135 but it doesn't contain much information about the status of this feature.

In curl, when socks5 is used, domain name is resolved locally, and resolved IP is passed to the proxy server. This is usually undesirable, since it leaks DNS requests, defeating some of the privacy of using proxy, etc. socks5h causes curl to pass domain name to the SOCKS server verbatim.

It appears net/http SOCKS proxy client always behaves in the second way. So socks5h is socks5 in Go, and there's no socks5 (local hostname resolution).

Thanks @WGH- , just removed the "h" and it worked. we can close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mishop picture mishop  路  3Comments

killernova picture killernova  路  6Comments

CrazyMouse picture CrazyMouse  路  3Comments

dzakaammar picture dzakaammar  路  3Comments

yanshiyason picture yanshiyason  路  7Comments