2

I can get the current with this stem code.

#!/bin/python
from stem import CircStatus
from stem.control import Controller


with Controller.from_port(port = 9051) as controller:
    controller.authenticate()

    for circ in sorted(controller.get_circuits()):
        if circ.status != CircStatus.BUILT:
            continue
    print("Circuit %s" % (circ.id))

How would you list all tor circuits that have ever been established from the moment that tor has been started?

To make things clear, instead of listing the current circuit only (say number 7) I want to list all c

  • Tor doesn't keep that data. – cacahuatl Jan 10 '17 at 17:33
  • Also, that python code is wrong, the print statement is happening outside of the for loop. – cacahuatl Jan 10 '17 at 17:55
  • Millions of users use Tor and directory authority servers get requests for sending the list of active relays , the client chooses 3 relays and makes the overlay circuit. Circuits are renewed but since a few years , the guard node remains the same. If , at a given time , a consensus is studied and there are N total relays , the total possible circuits becomes " [1 * (N-1)C1 * (N-2)C1] * total number of clients ". – Mithrandir Apr 15 '17 at 12:30
1

There's no log for this kind of information - and for a good reason: it can hurt the privacy and anonymity of Tor. You can - technically - poll Tor regulary through Stem and keep the log for yourself, but anyway - it's a bad idea IMHO.

Can you please put some more details about what do you need it for? Maybe this task can be solved in another way?

  • It's not possible to create such a log, if I understand tor correctly. A particular circuit cannot be known by a node not in the circuit. But IF each client were reporting its circuits to some logging host, it would be a heck of a long list. Approximately XYZ where X=number of entry nodes, Y=relay nodes; Z=exit nodes. – WGroleau Jan 11 '17 at 23:08
  • Correct. My understanding of this question is that it's a task to log all the circuits made by this very particular local tor node. Of course, the task of knowing other circuits is unimplementable - that fact would render Tor totally useless if it will be possible – Alexey Vesnin Jan 11 '17 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.