Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-07 Thread Jonathan "Duke" Leto
Howdy,

> 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.

Thanks for clarifying that.

> 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

I did not know about these things and they mostly seem to obviate the need
for the kind of embedding project I was thinking about. This is good :)

> 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. :)

Yes, that question *is* harder to answer. But, I don't think anybody can know
unless it is tried. From what I see, if Parrot wanted bindings to Tor, we can
start by seeing how the above-mentioned libraries work and go from there.

Thank you very much for your detailed and informative response.

Duke

-- 
Jonathan "Duke" Leto
jonat...@leto.net
http://leto.net
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-05 Thread Roger Dingledine
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

___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-05 Thread Damian Johnson
Hi Jonathan. Are you aware of the Tor control protocol [1]? This
already provides an RPC method for other applications to communicate
with a Tor instance. Most often this is used via TorCtl which is in
Python [2], though there's Java and C# counterparts too.

This gives a means of querying information, receiving events,
creating/destroying circuits (which was your initial project idea),
etc.

Cheers! -Damian

[1] https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt
[2] https://gitweb.torproject.org/pytorctl.git
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-05 Thread Jonathan "Duke" Leto
Howdy,

>> 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

> 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.

Mostly, I wanted feedback from Tor developers about the feasibility and interest
in mentoring something like this.

Duke

-- 
Jonathan "Duke" Leto
jonat...@leto.net
http://leto.net
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-05 Thread Robert Ransom
On Tue, 5 Apr 2011 00:56:44 -0700
Robert Ransom  wrote:

> On Mon, 4 Apr 2011 21:51:57 -0700
> "Jonathan \"Duke\" Leto"  wrote:
> 
> > Parrot recently added a GSoC proposal idea to embed Parrot into Tor.
> > It would be great to get the feedback from Tor developers.
> > 
> > Also, this could be under the Parrot or the Tor GSoC project,
> > whichever makes the most sense.
> > 
> > The proposal idea could use more detail, but the high-level view that
> > I imagine is:
> > 
> > 1) Allow Parrot to talk to libtor (this will use NCI - Native Call
> > Interface) via PIR
> > 2) Ability to create Parrot interpreter objects from within Tor via C
> > 3) Write glue code for a High Level Language (HLL) to talk to libtor
> 
> I've never heard of ‘libtor’.  What's that?

And why do you think we should want to embed Parrot into Tor?


Robert Ransom


signature.asc
Description: PGP signature
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


Re: [tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-05 Thread Robert Ransom
On Mon, 4 Apr 2011 21:51:57 -0700
"Jonathan \"Duke\" Leto"  wrote:

> Parrot recently added a GSoC proposal idea to embed Parrot into Tor.
> It would be great to get the feedback from Tor developers.
> 
> Also, this could be under the Parrot or the Tor GSoC project,
> whichever makes the most sense.
> 
> The proposal idea could use more detail, but the high-level view that
> I imagine is:
> 
> 1) Allow Parrot to talk to libtor (this will use NCI - Native Call
> Interface) via PIR
> 2) Ability to create Parrot interpreter objects from within Tor via C
> 3) Write glue code for a High Level Language (HLL) to talk to libtor

I've never heard of ‘libtor’.  What's that?

> There are various HLL's to choose from: Lua, TCL, Perl 6, Winxed, NQP
> and others.


Robert Ransom


signature.asc
Description: PGP signature
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev


[tor-dev] Embedding Parrot in Tor as GSoC Project

2011-04-04 Thread Jonathan "Duke" Leto
Howdy,

Parrot recently added a GSoC proposal idea to embed Parrot into Tor.
It would be great to get the feedback from Tor developers.

Also, this could be under the Parrot or the Tor GSoC project,
whichever makes the most sense.

The proposal idea could use more detail, but the high-level view that
I imagine is:

1) Allow Parrot to talk to libtor (this will use NCI - Native Call
Interface) via PIR
2) Ability to create Parrot interpreter objects from within Tor via C
3) Write glue code for a High Level Language (HLL) to talk to libtor

There are various HLL's to choose from: Lua, TCL, Perl 6, Winxed, NQP
and others.

Duke

Thanks for your help,

Duke

[0] http://trac.parrot.org/parrot/wiki/GSoc2011

-- 
Jonathan "Duke" Leto
jonat...@leto.net
http://leto.net
___
tor-dev mailing list
tor-dev@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev