[tor-bugs] #28738 [Core Tor/sbws]: Stop merging multiple torrc options with the same name

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Dec 5 13:47:47 UTC 2018


#28738: Stop merging multiple torrc options with the same name
-------------------------------+-------------------------------
     Reporter:  teor           |      Owner:  (none)
         Type:  defect         |     Status:  new
     Priority:  Medium         |  Milestone:  sbws: 1.0.x-final
    Component:  Core Tor/sbws  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+-------------------------------
 If sbws is configured with a default torrc option and an extra torrc
 option with the same name, then it merges the arguments in both options:
 https://gitweb.torproject.org/sbws.git/tree/sbws/util/stem.py#n175

 This is wrong in different ways, depending on the option
 1. "SocksPort auto 9050" is not a valid torrc option, the correct syntax
 is "SocksPort auto\nSocksPort 9050"
 2. "ExitPolicy accept *:80 accept *:443" is not a valid torrc option, the
 correct syntax is "ExitPolicy accept *:80,accept *:443" or "ExitPolicy
 accept *:80\nExitPolicy accept *:443"

 Instead of trying to understand torrc options, sbws should just set them
 all at once, and let Tor sort out the details.
 The stem.control.set_options() function takes a list of options, and
 applies them all at the same time.

 There are a few issues with this approach:
 1. Operators can't override some of sbws' default torrc options (we can
 fix this in #28737)
 2. Some torrc options need to be set after tor has bootstrapped:
   * DisablePredictedCircuits, but we might remove it in #28701
   * LeaveStreamsUnattached, but I think it can be set on the command-line
 3. Some torrc options aren't supported by all tor versions (#28646,
 #28692), so they need to be set at runtime, and allowed to fail

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


More information about the tor-bugs mailing list