[tor-dev] Summer 2017 Internship to Create a Bridge Bandwidth Scanner

meejah meejah at meejah.ca
Fri Jun 16 02:20:51 UTC 2017


Damian Johnson <atagar at torproject.org> writes:

> Maybe python3's asyncio (the builtin which seems intended to replace
> twisted) has better options. I certainly wouldn't be surprised if what
> Twisted provides is better than the builtins we had on python 2.7.

I don't think asyncio is "intended" to replace Twisted (even if it took
a lot of inspiration from it). Twisted will be around for a while yet --
and supports Python3, including the "async def" and "await" syntax
sugar. Hawkowl did a talk on this topic last year:

   https://ep2016.europython.eu/conference/talks/the-report-of-twisteds-death

There's no built-in SOCKS5 support in Twisted proper, but there's
txsocksx which is very good (although it lacks Python3 support). Because
of the latter, txtorcon now has its own "sans-io" style SOCKS5
implementation (with the custom Tor opcodes as well) which supports
Python3 as well as of course Python2 and PyPy.

So, you can do async DNS (at least A and PTR lookups) via tor + txtorcon
nicely:

   https://github.com/meejah/txtorcon/blob/master/examples/dns_lookups.py

-- 
meejah


More information about the tor-dev mailing list