0

I have a fully functional tor hidden service with his v3 url, created with stem and the controller class. The server is redirecting the traffic into a local tcp server running on port 5000 created with socket. But now I want to connect to this hidden service using python. So I tried socks with SOCKS5 proxies, no way of making it work. I also tried the torpy library with the example provided on the offical doc but, again, no way to make it works:

from torpy import TorClient

url = 'myv3torurl.onion'

tor = TorClient()
with tor.create_circuit() as circuit:
    print('circuit done')
    with circuit.create_stream(('http://' + url, 5000)) as client:
        print('sending')
        client.send(b'yeah yeah im there')
        print(client.recv(1024))

Also tried changing the url adding http:// or https://, or tried to change the port with 80, 9050 or 9051. The torpy logs are always the same and you can find them here.

At this point I do not really know what to try. I just want a tcp connection hosted by the onion website. And by the way, I'm sure it's not a problem of the server because if I try to copy and paste the url on the tor browser it is fully reachable. Thank you for any help.

2
  • Your error happens at the function here. If you can check the calls of that code then you can tell that it reaches line 668 without executing the main loop on line 651. I would also recommend asking the on tor.stackExchange if you can. Commented Oct 8, 2020 at 12:36
  • I asked that a month ago here and on stackExchange... received no asks... and i am still on this problem Commented Nov 19, 2020 at 22:59

1 Answer 1

4

Noticed that torpy page says it is for v2 services and yours is v3.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.