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

meejah meejah at meejah.ca
Thu Jun 15 21:54:21 UTC 2017

> Also, I agree with Tim. The present wording makes it sound like
> txtorcon is the only game in town when it comes to custom circuit
> construction.

I looked at the "to russia with love" examples, but I don't see how you
map particular streams to circuits?

The last example on the page it seems like you're just "really hoping"
that the next stream to open is the one you want to map onto the new
circuit, or am I missing something? That is, what if you had 2 custom
circuits and 2 streams to open? Or what if some other client used your
Tor at that moment to make a connetion?

To plug the newest txtorcon API (the "Tor" object): this provides really
simple support for both "raw" TCP connections and specifically Web
connections (via Twisted's built-in Agent or treq, the "requests-like
API for Twisted") routed over Tor (on custom circuits or
otherwise). This all uses the source-ports of the streams to determine
which ones to map to which circuits. So, you can safely have thousands
of custom streams in-flight on any number of different custom circuits
(and play nicely with other clients using the same tor instance).

For example, "use any Tor circuit and make a Web request":


vs. "build a custom circuit and make a request over that":




More information about the tor-dev mailing list