19 releases

0.17.0 Apr 2, 2024
0.6.0 Feb 5, 2024
0.5.4 Sep 5, 2023
0.5.2 Jun 30, 2023
0.0.0 Jun 24, 2021

#1629 in Network programming

Download history 219/week @ 2023-12-22 128/week @ 2023-12-29 267/week @ 2024-01-05 375/week @ 2024-01-12 364/week @ 2024-01-19 155/week @ 2024-01-26 263/week @ 2024-02-02 275/week @ 2024-02-09 201/week @ 2024-02-16 328/week @ 2024-02-23 1954/week @ 2024-03-01 500/week @ 2024-03-08 895/week @ 2024-03-15 1791/week @ 2024-03-22 1052/week @ 2024-03-29 1034/week @ 2024-04-05

4,819 downloads per month
Used in 29 crates (7 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

~0.4–0.8MB
~20K SLoC