Skip to content

Commit fc1a0c0

Browse files
committed
say explicitly that only socks5h:// socks proxy variant is supported, and socks:// defaults to socks5h://
1 parent 622272b commit fc1a0c0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

client/client.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ func (c *Client) connectionLoop() {
198198
if c.proxyURL != nil {
199199
if strings.HasPrefix(c.proxyURL.Scheme, "socks") {
200200
// SOCKS5 proxy
201+
if c.proxyURL.Scheme != "socks" && c.proxyURL.Scheme != "socks5h" {
202+
c.Infof(
203+
"unsupported socks proxy type: %s:// (only socks5h:// or socks:// is supported)",
204+
c.proxyURL.Scheme)
205+
break
206+
}
201207
var auth *proxy.Auth = nil
202208
if c.proxyURL.User != nil {
203209
pass, _ := c.proxyURL.User.Password()

0 commit comments

Comments
 (0)