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

Re: [tor-talk] Tor as a sort of "library/dependancy" for third party software



On Sun, Oct 2, 2011 at 8:29 AM, Fabio Pietrosanti (naif)
<lists@xxxxxxxxxxxxxxx> wrote:
> On 9/28/11 11:53 PM, Nick Mathewson wrote:
>> On the original question: we do not currently support having the Tor
>> client run in the same address space as another application, nor do we
>> plan to.  If you've absolutely got to have it be a single executable,
>> your best option is to link everything except tor_main.c, then have
>> your program fork and call tor_main().  Don't call any other function:
>> there is no guaranteed-stable in-process API.
>>
>> It's an ugly hack, but less ugly than running other stuff in the same
>> process with Tor.
>
> Well, but what's about all the "external files" that Tor need such as
> configuration files, the cache files, and so ?
>
> Even embedding the Tor.exe would require some external files.

Ah, you're looking to have *everything* happen in a single file.  No,
there's no support for that right now.

> I am wondering if it would be possible to think about "embedding" all
> the external files as Windows PE "Resources"?
> But would probably means doing much more windows hacking than a short
> terms goals of making up a prototype!
> Still it would be a nice things to think about a Tor client with
> "everything" built-in into a single executable, including external files.

Hm.  PE resources don't look like they're designed to support
read-write access in a generic way after the file is created; they
seem more like a way to more read-only things as part of an .exe file.
 I guess you could try to create a resource that was just empty space,
and pretend that it was a quick-and-dirty filesystem, but honestly I'm
not sure it would be worth it.

> Another possible approach could be to:
> - Start the program
> - Create an encrypted directory using a random key (with windows
> encryption system and/or apple filevalue)
> - Uncompressing everything into that directory
> - Starting the "programs"
> - When the program close deleting the files and the encrypted directory
>
> This could eventually be another ugly hack to provide the end-user the
> same experience of a "single, self contained .exe file" ?

Keep in mind that the cache files are *cache* files and the state
files are state files: Tor isn't writing stuff to disk just for
amusement value.  If you don't cache the stuff you're supposed to
cache, you're going to wind up getting slower startups in the future.
If you don't keep state, then you won't get long-term protection from
guard nodes.  If you don't save keys, you won't be able to be a bridge
or a relay.

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