[tor-bugs] #12533 [Stem]: multiple hidden services and get_conf_map('HiddenServiceOptions') response format

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Aug 4 18:51:24 UTC 2014


#12533: multiple hidden services and get_conf_map('HiddenServiceOptions') response
format
-------------------------+------------------------------
     Reporter:  jthayer  |      Owner:  atagar
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:
    Component:  Stem     |    Version:
   Resolution:           |   Keywords:  controller, easy
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+------------------------------

Comment (by meejah):

 For what it's worth, the way I've done this in txtorcon is via the
 TorConfig abstraction -- the user can add/delete/whatever to variables and
 lists in there and call save() and it takes care of making sure the
 relevant SETCONF call has *all* the hidden-serivces etc.

 I'm not completely sold on the "magic __getattr__" business in there, and
 hidden-services are the most-complex since they are basically a "single
 thing" that has multiple lines (that need to be in the right order, etc).

 But basically, adding a hidden service is basically
 "TorConfig.hiddenservices.append(HiddenService(...))". It probably
 wouldn't be *that* hard to port to Stem -- you'd have to take out the
 getconf and setconf calls via TorControlProtocol and make the appropriate
 Stem calls instead. And make save() synchronous (instead of async). And
 probably add a "bootstrap()" synchronous method instead of the
 "post_bootstrap" Deferred.

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


More information about the tor-bugs mailing list