[Twisted-Python] tor hidden service endpoint parser returns a deferred

meejah meejah at meejah.ca
Sat May 31 00:59:24 MDT 2014


As a followup to all this, I have just merged a branch with a refactored
endpoint parser. tomprince (I believe) on #twisted suggested some SSH
endpoint code to look at, which inspired the @classmethod style way of
getting a TCPHiddenServiceEndpoint instance configured differently.

Nearly all the code is in endpoints.py if anyone is interested, here:

    https://github.com/meejah/txtorcon/blob/master/txtorcon/endpoints.py#L117

If you do look, I'd certainly appreciate any comments.
(The tests are in test/test_endpoints.py)

Anyway, one really cool thing now that txtorcon supports endpoints is
that you can install it, and then easily make Twisted Web serve some
content as a hidden service (launching a Tor instance first, etc):

   twistd -n web --port "onion:80" --path ~/public_html

...or of course make any service at all available as a hidden service,
as long as it uses endpoints.

-- 
meejah
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140531/459734f8/attachment.pgp>


More information about the Twisted-Python mailing list