With respect to Tor source code, what is the different between 1- Circuits 2- Channels 3- Connections

And how do they relate to each other? Thanks.

  • As was suggested on your similar question: Have a read of the Tor Specification, particularly sections 5 and 6 ("Circuit management" and "Application connections and stream management").
    – cacahuatl
    Feb 27 '17 at 2:49
  • Also from said question "Streams are multiplexed inside of circuits, circuits consist of cells, cells for circuits are sent multiplexed across a TLS tunnel between nodes."
    – cacahuatl
    Feb 27 '17 at 2:50
  • Hi, I already went through the specs many times. The words "circuit" and "channel" are used interchangeably there. However, from the code, they are not. I see that circuits have channels attached to them and they have different structures, also connections are a separate structure. Channels are attached to circuits somehow. Im intrested in understanding that relation and if it is 1-n or m-n, etc. My previous question was abiut streams, not channels. Thanks in advanced Feb 27 '17 at 6:56
  • "I already went through the specs many times. The words "circuit" and "channel" are used interchangeably there." The word "channel" appears in the spec 0 times. In the code it's literally documented in the comments: gitweb.torproject.org/tor.git/tree/src/or/… what about this don't you understand?
    – cacahuatl
    Feb 27 '17 at 10:31
  • @canonizingironize If channel is not documented in the specs, then there is no point of going over the spec to find an answer to my question. I want to know the difference between a channel and a circuit, and how do they relate to each other and work with each other to deliver cells Feb 27 '17 at 19:47

Channels usually mean client-requested TCP pipes, the very good example of channel is SocksPort options like IsolateDestAddr and IsolateClientAddr. So - Channels are related to the client requests channeled through Tor

Circuits are the node-to-node chains for whatever purpose, i.e. reaching the Clearnet via Exit node or connecting to HiddenService. Circuits are transferring onions and usually noted as "Node A" -> "Node B" -> "Node C". It's an internode communication pipes for whatever reason.

Connection means a TCP connection as it is - regardless of the place it is made-of/accepted-at : it is a client-to-socks, client-to-TransPort, node-to-directory, node-to-node etc. It's just a connection

  • I literally pointed to what a "channel" is in the comments directly above this answer and you still got it wrong, Alexey.
    – cacahuatl
    Feb 27 '17 at 19:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.