[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-talk] embedding tor into apps?



On Wed, Jun 29, 2011 at 9:56 AM, Manuel <tor-talk@xxxxxxxxxxxxxxxx> wrote:
> On Wed, Jun 29, 2011 at 03:40:30PM +0200, MacLemon wrote:
>> On 29.06.2011, at 13:46, Manuel wrote:
>> > The real question is: Why would you want to embed Tor?
>> I???d be interested in building a Tor browser for iOS which would require me to package everything up into a single binary.
>
> How so? Do the ToS forbid you from creating proxy apps?
>
> tor-dev would probably be better at answering this, but it seems like a somewhat-sane solution to simply fork & call
> tor_main(int argc, char *argv[]) from or/main.c, which is basically what
> tor is doing (from what I can see) in or/tor_main.c.

I think this is right.  Tor is really not designed to have anything
else running in the same process as it, so fork() then tor_main() is
your best bet.  In the future, if we change this architecture, it's
likely to be via a move in the opposite direction, with *more* process
isolation between the parts of Tor, not less.

If you really and truly must have everything running in the same
process, the next best option is to pretend that  it's a separate
process: launch tor_main() in its own thread, then never run any other
tor functions or alter other tor data structures: instead use a local
control port to communicate with the Tor thread group.

all the best,
-- 
Nick
_______________________________________________
tor-talk mailing list
tor-talk@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk