I'm an end user with poor understanding of networking and all. I decided to run a relay (ExitRelay 0 ;) ;) ) on a dedicated computer.

I simply want to know what those "v-something" connections mean when I have a look at my log. I'm talking about the line that looks like "Since startup, we have initiated [...] and received..."


These are versions on the OR protocol which are negotiated between the client and the relay upon connection.

From tor-spec.txt:

2. Connections
The initiator then sends a VERSIONS cell to the responder, which then
replies with a VERSIONS cell; they have then negotiated a Tor
protocol version.  Assuming that the version they negotiate is 3 or higher
(the only ones specified for use with this handshake right now), the
responder sends a CERTS cell, an AUTH_CHALLENGE cell, and a NETINFO
cell to the initiator, which may send either CERTS, AUTHENTICATE,
NETINFO if it wants to authenticate, or just NETINFO if it does not.

They have different cell packet layouts, changed as the protocol has been improved and expanded over time.

From tor-spec.txt:

3. Cell Packet format

The basic unit of communication for onion routers and onion
proxies is a fixed-width "cell".

On a version 1 connection, each cell contains the following

    CircID                                [CIRCID_LEN bytes]
    Command                               [1 byte]
    Payload (padded with 0 bytes)         [PAYLOAD_LEN bytes]

On a version 2 or higher connection, all cells are as in version 1
connections, except for variable-length cells, whose format is:

    CircID                                [CIRCID_LEN octets]
    Command                               [1 octet]
    Length                                [2 octets; big-endian integer]
    Payload                               [Length bytes]

On a version 2 connection, variable-length cells are indicated by a
command byte equal to 7 ("VERSIONS").  On a version 3 or
higher connection, variable-length cells are indicated by a command
byte equal to 7 ("VERSIONS"), or greater than or equal to 128.

CIRCID_LEN is 2 for link protocol versions 1, 2, and 3.  CIRCID_LEN
is 4 for link protocol version 4 or higher.  The VERSIONS cell itself
always has CIRCID_LEN == 2 for backward compatibility.

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.