Como corrigir o erro: Can’t complete SOCKS5 connection to 0.0.0.0:0
Para quem passou por algum problema parecido:
Erro de exemplo 1:
1
2
|
$ curl --socks5 localhost:11502 google.com curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (2) |
Erro de exemplo 2:
1
2
3
|
D:\cygwin64\bin>curl -i --socks5 localhost:1080 --proxy-user user:pass google.co m curl: (7) Failed to receive SOCKS5 connect request ack. |
Como consertar o erro?
Opção de uso --socks5-hostname
Fixe o exemplo 1:
1
2
3
4
5
6
7
|
D:\cygwin64\bin>curl --socks5-hostname 127.0.0.1:11502 google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="http://www.google.com/">here</A>. </BODY></HTML> |
Fixe o exemplo 2:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
D:\cygwin64\bin>curl -i --socks5 127.0.0.1:1080 --proxy-user user:pass google.co m --socks5-hostname localhost HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Thu, 30 Jul 2020 07:41:51 GMT Expires: Sat, 29 Aug 2020 07:41:51 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 0 X-Frame-Options: SAMEORIGIN <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="http://www.google.com/">here</A>. </BODY></HTML> |