[tor-dev] How to distribute Tor with other software
micah at micahflee.com
Wed May 21 18:24:41 UTC 2014
Thanks, this is really helpful.
On 05/20/14 21:10, meejah wrote:
> Micah Lee <micah at micahflee.com> writes:
>> When you run onionshare.py, it modifies /etc/tor/torrc and reloads the
>> Tor config, and when it's done it restores the original torrc and
>> reloads again.
> You could use one of the controller libraries (stem if you want
> synchronous, txtorcon if async/Twisted) to do this; they don't have to
> modify the torrc directly, just manipulate configuration via GETCONF and
> SETCONF. For Tails, this probably won't work unless you're root until
> #11291 is fixed + merged.
> Even better, with some work that David Stainton has been pushing forward
> in txtorcon  for use with Tahoe-LAFS, very soon making "whatever
> stuff" happen so you can cause a new hidden service to appear will be
> one line (serverFromString is a pluggable Twisted endpoint API):
> d = serverFromString("onion:80").listen(...)
> or, if you already have keys:
> d = serverFromString("onion:80:hiddenServiceDir=/foo/bar").listen(...)
> The "stuff" will depend, but will be a newly launched tor worst-case or
> a suitable local tor best-case. I realize this doesn't help you right
> away ;) but there are APIs to make this pretty straightforward with
> txtorcon right now; see these lines for an example:
> In the above save() will write to a file if you want, or to a
> currently-connecting running Tor. txtorcon concentrates on configuring
> running Tor instances; there may be better torrc-manipulation things in
> Stem but I don't know off the top of my head.
> (For the other way, David has a pull-request into txsocksx so that
> things like "clientFromString('tor:blarg.onion')" will work via SOCKS to
> 9050 or 9150).
>  -- gruesome details of his latest branch here, and there are some
> relevant ones in my repository as well:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature
More information about the tor-dev