[proposal 136] Re: Proposal: Simplify Configuration of Private Tor Networks

Karsten Loesing karsten.loesing at gmx.net
Mon May 19 21:53:12 UTC 2008

Hash: SHA1

Hi Nick,

| What about having a preprocessing step on the options list that
| expands PrivateTorNetwork 1 into the entire list of options it
| implies? It's not an error to specify an option twice; when you do,
| the second takes precedence.

Hmm, I couldn't find the right place in the code to implement your idea.
I now solved it differently: When reading configurations from torrc and
the console, Tor checks if TestingTorNetwork was configured. If so,
default values for dependent options are changed and the configuration
is read in again. See lines 3835--3892 in config.c.

I also added a hook that prevents TestingTorNetwork from being changed
after Tor is started. I could not imagine why this would be useful, and
therefore excluded this possibility to prevent unforeseen errors. See
lines 3463--3468 in config.c.

| This would mean that RESETCONF wouldn't do the right thing, though.
| Perhaps a hack like the one in weasel's debian-tor user patch would
| handle that better.  It's still a hack, but not a totally insane hack.

Right, that's what I've done now.

In the proposal I added a section with test cases. These include all
those scenarios about changing configurations that came to my mind.
These tests succeeded in a patched Tor and worked fine with a patched
PuppeTor using v3 directories.

- --Karsten
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch2.txt
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080519/c12d8010/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch2.txt.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20080519/c12d8010/attachment.obj>

More information about the tor-dev mailing list