[tor-dev] use tor controller to detect circuit/path change

meejah at meejah.ca meejah at meejah.ca
Tue Oct 30 21:00:23 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Damian Johnson <atagar at torproject.org> writes:

>> I'm wondering whether it is possible to use Tor controller to
>> detect when the circuit/path in use is changed and obtain the list
>> of IP addresses of those relay nodes.

> - txtorcon (https://txtorcon.readthedocs.org/en/latest/) - controller
> library for twisted apps

Specifically, try this example:

   https://github.com/meejah/txtorcon/blob/master/examples/stream_circuit_logger.py

You'll be interested in the last hop in the "path" attribute of
Circuit objects. If you want to know which streams are exiting via
which circuits, listen for STREAM events and look at the Circuit to
which they're connected.

- -- 
meejah
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iQEcBAEBAgAGBQJQkD/eAAoJEMJgKAMSgGmnUNcH/2hZvHQ3N+MvqT7zN764Jt0j
YwbCMfSpVNcOyidDyHIVU3uoT+Ji+il50yhhkCOHelCJAUWuJZjva5K80bpdlNVM
QbQ6IW5AuoX4ToCLKJ0qSsNeKlt66tI54G5c0TrZfiS/JVD8viz/iQ/x6/rzvsG/
Qr11AeVY5O9Oo/1Xl1kw/kTHUhCisXX+kou/ZEAh12Hvkkwy6zg4HlX1/z+uh/9J
0PCzGp+Lu5WEKwms+ROd6b8jf48h93S0HiJshFvb4YB5vIy9RStXC203G0ZR415G
oQ7ex30NroPtb260nYyi+n6k+Jp0POLwXzgzbljvBlaqdTDgsl5kJL2klbbGeUg=
=U4KO
-----END PGP SIGNATURE-----


More information about the tor-dev mailing list