27 releases (15 breaking)

0.25.0 Dec 2, 2024
0.24.0 Oct 31, 2024
0.23.0 Sep 30, 2024
0.20.0 Jun 27, 2024
0.0.0 Jun 24, 2021

#2140 in Network programming

Download history 1521/week @ 2024-08-23 1599/week @ 2024-08-30 1746/week @ 2024-09-06 1156/week @ 2024-09-13 1295/week @ 2024-09-20 1777/week @ 2024-09-27 1120/week @ 2024-10-04 965/week @ 2024-10-11 1136/week @ 2024-10-18 1086/week @ 2024-10-25 2291/week @ 2024-11-01 1132/week @ 2024-11-08 2427/week @ 2024-11-15 1509/week @ 2024-11-22 2529/week @ 2024-11-29 1902/week @ 2024-12-06

8,524 downloads per month
Used in 47 crates (6 directly)

MIT/Apache

33KB
473 lines

tor-protover

Implementation of Tor's "subprotocol versioning" feature.

Overview

The Tor system is built out of numerous "subprotocols" that are versioned more or less independently. The tor-protover crate implements parsing and handling for these subprotocol versions, so that different Tor instances know which parts of the protocol they support.

Subprotocol versions are also used to determine which versions of the protocol are required to connect to the network (or just recommended).

For more details, see tor-spec.txt section 9.

This crate is part of Arti, a project to implement Tor in Rust. It's unlikely to be of general interest unless you are writing a Tor implementation, or a program that needs to examine fine-grained details of the Tor network.

Design notes

We're giving tor-protover its own crate within arti because it needs to be used to multiple higher level crates that do not themselves depend on one another. (For example, tor-proto needs to know which variant of a subprotocol can be used with a given relay, whereas tor-netdoc needs to parse lists of subprotocol versions from directory documents. Eventually, arti-client will need to check its own list of supported protocols against the required list in the consensus.)

License: MIT OR Apache-2.0

Dependencies

~265–720KB
~17K SLoC