0

I'm trying to access my tor server with python with the module torpy, but it didn'y worked. It continue sayying that the server is not reachable, but with tor I can connect with it.

I've tryied this code:

from torpy import TorClient

hostname = url
with TorClient() as tor:
    with tor.create_circuit(3) as circuit:
        with circuit.create_stream((hostname)) as stream:
            stream.send(b'hello')
            stream.close()
            print('done')

this is the code of the client, maybe I have to change even the server's code or the torrc file?*

5
  • Is it a specific address that doesn't work, or any address? Do both regular websites and onion services both not work?
    – Steve
    Commented Jan 30, 2021 at 18:45
  • Only hidden service doesn't work Commented Jan 30, 2021 at 20:30
  • Is it a v2 service or v3?
    – Steve
    Commented Jan 30, 2021 at 20:57
  • It's v3 I think, So that's the problem? Commented Jan 30, 2021 at 21:18
  • And if it is how do I create a v2 service? Commented Jan 30, 2021 at 21:18

1 Answer 1

0

Torpy doesn't support v3 onion services. You can find details here: https://github.com/torpyorg/torpy#todo

If you're trying to use torpy to connect to your own onion service, you can make it a v2 service instead, but v2 services are deprecated and will be removed from the network later this year. If you want to make a v2 service anyways, you can use the HiddenServiceVersion 2 line in your torrc when creating a new service.

9
  • Thank you very much, i'll try Commented Jan 30, 2021 at 21:27
  • Nop, the error is always the same :( Commented Jan 30, 2021 at 21:36
  • Did you delete your old hidden service directory and let Tor create a new one? And you'll need to add a lot more details about what you're doing, what steps you've taken, and the actual address you're trying to connect to.
    – Steve
    Commented Jan 30, 2021 at 21:38
  • Ok, so...i deleted the old dir and recreated, I'm trying to use tor such as a proxy to access to a TCP server to connect two devices. Commented Jan 30, 2021 at 21:39
  • The steps i've done are quite standard. I've opened the torrc file, removed the '#' and it look like this: Commented Jan 30, 2021 at 21:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .