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

Re: torrc file changes and features - reversal request & possible bug.



Nick Mathewson wrote:
On Fri, Aug 01, 2008 at 01:01:08PM +0100, Anon Mus wrote:
 [...]
But this latest version (at least) of tor deletes all the user comments and also deletes all but the last line of any ExcludeNodes lines, all other ExcludeNodes line details are lost.

Hi, Anon Mus.

Tor has never deleted comments on its own, unless a controller tells
it to save configuration changes.  However, Vidalia has never
preserved comments when saving configuration changes.
True, but it usually required the user to save settings (something I have learned never to do)
  This isn't new
to the (rather old) 0.1.2.19.

Yes, I've had to use a very old version on Win2K(sp4) because of a control bug between vidalia/tor which appears to be fixed now in tor v0.1.2.19, vidalia v0.0.16.

When I changed to these new versions (downloaded direct from tor site - no proxy) I found that Tor did not use the usual torrc file in the Docs&Settings/Admin.machine/Application Data/Tor folder.

But it did use the torrc file in the next door Vidalia folder.

So I added my stuff from the Tor folder torrc file to the Vidalia folder torrc file.

But without any Vidalia update settings "save" in details by me, this Vidalia folder torrc file was updated. Now I am using the "randomly generate password" setting so maybe its automatically rotating the password (??) and updating it in this torrc file.

However, this Vidalia folder torrc file does state "# This file was generated by Tor; if you edit it, comments will not be preserved". So I assumed it was actually the real torrc file, not one generated by Vidalia. And bearing in mind the facts that my attempts to modify the tor behavior via the Tor folder torrc file failed, I pretty much thought that this confirmed it.

Are you suggesting that the torrc file in the Vidalia folder is not the real torrc file? (If so then I would suggest that Vidalia devs should have named it something else to avoid confusion.)

Also, bearing in mind that the HashedControlPassword is in the Vidalia folder torrc file but not the Tor folder torrc file, then should Tor (I suppose via Vidalia) have used the Tor folder torrc file at start up? There seems to be a problem here but I'm not sure wh'o fault it is (tor or vidalia)
(As I said it does not appear to do this at the moment.)

I agree that it would be awesome to
Preserving comments when altering a configuration file would be great,
but it turns out to be pretty hard.  We'd have to change the way that
Tor processes configuration files in order to detect comments before
options, and keep comments with their associated options, and keep
options in the same order, and detect where to insert new options in
order to minimize confusion.

It would be neat to do something like this, and I bet the Vidalia team
might be interested in patches to do it.


Actually, is quite easy, you just use an object stack/list for each line in the torcc file. Additional lines added from any user input (from say vidalia) can be appended to the stack/list according to object type (and even a link comment(s) above it if one is asked for), then you re-write the torrc file, straight from this object list. When you want to pass that information to tor you just sort the list by object type delete the "comment lines", amalgamate the object type data and send the now single instances of object data to tor. What you don't do is then write that de-commented, sorted object list straight back to torrc file, as vidalia might be doing now (assuming its vidalia's file).

Like so---

Stored file structure..

Object Type: CommentLine
Data: "Hello world"

Object Type: ExcludeNodes Data: "proctor,exactor,inspector"


[append... and rewrite torrc using this structure
Object Type: CommentLine
Data: "A.N.Other bad node"

Object Type: ExcludeNodes Data: "reactor"
]


etc..

for input to tor becomes (never written back to file),


Object Type: ExcludeNodes Data: "proctor,exactor,inspector,reactor"


If you need to update the torrc file after you have de-commented and sorted the object list, then you re-read it before the start of the edit, so you use the preserved the comment lines and original structure.

Is there any way these can be changes can be reversed???

So that,

1. Multiple ExcludeNodes lines are accepted and left as is in the torrc file.

Does this still happen with any recent version of Vidalia? If so, it

On vidalia v0.0.16, Windows (on Win2ksp4) version it does.

should go onto the vidalia bugtracker.

yrs,

Thnx, -K-