[tor-dev] txtorcon, async Tor controller

meejah meejah at meejah.ca
Wed Mar 28 15:51:39 UTC 2012


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

Erring on the side of "release early, release often" I have put my
Twisted-based (asynchronous, Python) Tor control protocol
implementation online:

   http://readthedocs.org/docs/txtorcon/en/latest/
   https://github.com/meejah/txtorcon

It is MIT licensed (to match Twisted). I would certainly not consider
it "done", and I made it to learn more about Twisted and Python --
criticisms, comments appreciated.

Currently it has the following features (see the above-linked
documentation for more, and examples):

 . TorControlProtocol implements the control protocol
 . TorState tracks the state of Tor (streams, circuits, routers, address-map), listening for updates
 . TorConfig provides read/write configuration access , with HS abstraction (still needs some work)
 . IStringAttacher, a stream-to-circuit attacher interface for new streams
 . launch_tor can launch slave Tor processes
 . integrates into Twisted's endpoints with TCPHiddenServiceEndpoint

The main code is about 1600 LOC, ~4000 with tests and 25% comments
(according to ohcount). There is currently 98% test coverage, if one
believes code-coverage is a good metric.

In the short-term, be aware that I'm planning to re-organize where
things are in files. If you "import txtorcon" and use the classes like
"txtorcon.TorConfig" it will all still work.

Thanks for your attention,
mike


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJPczCxAAoJEMJgKAMSgGmnTrEH/RG1TLbEsqALWyh5WSm1azYU
7QHx9eup+/NKUE8C6WLPGQyprTkL/snIRZZGYDdkz5grkxcsYaWaVNNtDdUTdctN
KCi2E3rbzdUYHV0aN/VdoNvJdpa8H3J2dpyx4/kFmZ2Z04+VLZOqeX6ANMdYZbYv
FXv37j0dnl15h+t57+65Cf5c8BVbSW50vqXUx/eHWS73BISq3LP30OV4Ut8k3Xbg
IXVf1S/EFeoXxRoGfn9i4i4txeQNyQxCOX0k+fynvIGP+lFuYciSGgGJydYBIkhE
87TMJ//c1tPq41jn5prdbWRTE4mPWA5U03w35wUGrhUWSNUb+OhM6fV4vdRwq30=
=ilGQ
-----END PGP SIGNATURE-----


More information about the tor-dev mailing list