On Tue, Apr 05, 2011 at 09:29:07AM -0700, Jonathan Duke Leto wrote:
I've never heard of ?libtor?. What's that?
I assumed that there was some type of core C/C++ library that implements the core functionality of Tor.
It is the thing that this email thread references:
https://lists.torproject.org/pipermail/tor-talk/2009-October/017378.html
There is a libtor, but it's just an internal library that contains some of the functions shared between the various Tor tools as they're built. It isn't designed for outside apps to link to, and it doesn't actually offer the API that you'd want.
But you're in luck -- Tor has a controller interface that lets other applications interact with the Tor process over a local socket, using a simple smtp-style protocol: https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt
So that means you can write your controller application in whatever language you like. Vidalia uses C++, but it hasn't really broken out its controller support into a reusable library. The best we've got is a Python library: https://gitweb.torproject.org/pytorctl.git that is used by a variety of applications, ranging from a curses-based Tor UI: http://www.atagar.com/arm/ to a set of back-end scripts to build paths in nonstandard ways, measure bandwidth, and do other experiments: https://gitweb.torproject.org/torflow.git
And why do you think we should want to embed Parrot into Tor?
It would allow scripting Tor with a variety of languages, but I understand if embedding is not wanted. I would like for Parrot to be able to talk to libtor, so a project that worked on bindings from Parrot VM would be interesting as well, and not involve any embedding.
A Parrot library that talks to Tor via the controller interface would be the right way to do it. The next question would be: if such a thing existed, would anybody use it? That one is harder to answer. It probably depends in part on how good it is. :)
--Roger