[tor-bugs] #4552 [Tor Client]: Have a "defaults" torrc file and a regular one

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Nov 24 03:38:49 UTC 2011


#4552: Have a "defaults" torrc file and a regular one
--------------------------+-------------------------------------------------
 Reporter:  nickm         |          Owner:  nickm             
     Type:  enhancement   |         Status:  new               
 Priority:  major         |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client    |        Version:                    
 Keywords:  config torrc  |         Parent:                    
   Points:                |   Actualpoints:                    
--------------------------+-------------------------------------------------
 (Since I'm hoping to implement this, let's make a ticket.  Hoping it's not
 a duplicate.)

 Tor could support up to two torrc files: one installer-provided "defaults"
 file, and one user "torrc" file.  Additionally, the user could provide
 arguments from the command line as they can today. These three places to
 put options would constitute three "zones" or "configuration sources" or
 something: "defaults", "torrc", and "cmdline".

 The behavior for reading them would be as follows:

   * Any option set in cmdline would override torrc and defaults; any
 option set in torrc would override defaults.
   * This goes for linelist options too.  For example, if the defaults exit
 policy was "ExitPolicy reject *:*" and the torrc had "ExitPolicy accept
 *:80\nExitPolicy reject *:*", then the torrc's ExitPolicy would _replace_
 the defaults exit policy.  Or if the torrc had "SocksPort auto" and the
 command line had "SocksPort 9050", then there would be exactly one
 socksport, as specified by the command line.  This would be new behavior.
   * The behavior on saveconf would be to compute every option that
 differed from what its value had been after reading "defaults", and store
 that option's new value to "torrc".
   * HUP and equivalents would reload all options.

 Unknown behaviors:

   A) should SAVECONF store stuff that was on the command-line?
   B) Where do we look for the defaults file?

 What would be most useful at this point would be to confirm whether this
 approach would work for vidalia, TBB, arm, others.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4552>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list