warner / foolscap

remote object-messaging for Python+Twisted
http://foolscap.lothar.com/trac
MIT License
52 stars 40 forks source link

tor integration not working with recent txtorcon or Tor itself #59

Closed warner closed 4 years ago

warner commented 4 years ago

In the last month or three, I noticed tor-based connections failing with a NoConnectionHintsError (which means all of the supplied hints were unusable). I traced it down to the config.SocksPort returned by txtorcon returning a nested list [["9050", "unix:/var/run/tor/socks WorldWritable"]], whereas previously it was giving me a single list like ["9050", "unix:/var/run/tor/socks WorldWritable"].

I wasn't able to figure out why the format changed, or whether this new behavior was coming from a new version of txtorcon vs a new version of Tor, but the easiest fix seemed to be to tolerate nested lists.

meejah commented 4 years ago

Hmm, I will have to remind myself / look more closely what changed .. but IIRC at some point Tor started allowing multiple SocksPort listeners (and txtorcon gets as much information as it can from introspecting Tor .. so that's likely what happened :/ )