Serviço oculto TOR nem sempre acessível através de cURL. Leva várias tentativas

4

Quando tento acessar um serviço oculto no TOR usando cURL, por algum motivo, não consigo acessar o site 100% do tempo. Muitas vezes retorna "curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (5)"

Existe algo que eu possa fazer para configurar o cURL para funcionar melhor com o TOR? Aqui está a saída que estou recebendo:

root@Dexter:~# curl --proxy socks5h://localhost:9050 http://5ztppjwojkuslibm.onion/
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (5)
root@Dexter:~# curl --proxy socks5h://localhost:9050 http://5ztppjwojkuslibm.onion/
curl: (7) Can't complete SOCKS5 connection to 0.0.0.0:0. (5)
root@Dexter:~# curl --proxy socks5h://localhost:9050 http://5ztppjwojkuslibm.onion/
curl: (18) transfer closed with 1 bytes remaining to read
<h1>This is a test page to see if I can run a hidden tor service!</h1><h3>Looks like it's working!</h3>root@Dexter:~# 
root@Dexter:~# curl --proxy socks5h://localhost:9050 http://5ztppjwojkuslibm.onion/
curl: (18) transfer closed with 1 bytes remaining to read
<h1>This is a test page to see if I can run a hidden tor service!</h1><h3>Looks like it's working!</h3>root@Dexter:~# 
    
por sand_storm_of_code.txt 06.10.2015 / 23:25

1 resposta

0

Pode ser o problema do seu ambiente de rede.

Eu uso o site de cebola do duckduckgo https://3g2upl4pq6kufc4m.onion como um exemplo, ele funciona bem no ambiente de rede local ou no ambiente de AWS EC2.

$time curl -I --proxy socks5h://localhost:9050 https://3g2upl4pq6kufc4m.onion/
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 17 Jul 2018 13:51:35 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 5499
Connection: keep-alive
ETag: "5b4d156e-157b"
Strict-Transport-Security: max-age=0
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: default-src https: blob: data: 'unsafe-inline' 'unsafe-eval'; frame-ancestors 'self'
X-XSS-Protection: 1;mode=block
X-Content-Type-Options: nosniff
Referrer-Policy: origin
Expect-CT: max-age=0
Expires: Tue, 17 Jul 2018 13:51:34 GMT
Cache-Control: no-cache
Accept-Ranges: bytes


real    0m2.235s
user    0m0.048s
sys 0m0.016s

Extrair <title> info

curl -fsL --proxy socks5h://localhost:9050 https://3g2upl4pq6kufc4m.onion | grep 'title'
    <title>DuckDuckGo — Privacy, simplified.</title>
    
por 17.07.2018 / 15:53