arti/tor-netdoc
Lennart Kloock f2063d2810
Rerun readmes.sh
2021-08-11 20:10:36 +02:00
..
fuzz Add symlinks to arti-corpora 2021-08-04 15:52:24 -04:00
src Sync docs with readmes 2021-08-11 20:08:24 +02:00
testdata Add a test case for NS consensus parsing. 2021-03-30 11:15:58 -04:00
Cargo.toml Bump version dependencies to 0.0.0 2021-06-24 09:27:17 -04:00
README.md Rerun readmes.sh 2021-08-11 20:10:36 +02:00

README.md

tor-netdoc

Parse and represent directory objects used in Tor.

Overview

Tor has several "directory objects" that it uses to convey information about relays on the network. They are documented in dir-spec.txt.

This crate has common code to parse and validate these documents. Currently, it can handle the metaformat, along with certain parts of the router descriptor type. We will eventually need to handle more types.

This crate is part of Arti, a project to implement Tor in Rust.

Design notes

The crate is derived into three main parts. In the [parse] module, we have the generic code that we use to parse different kinds of network documents. In the [types] module we have implementations for parsing specific data structures that are used inside directory documents. Finally, the [doc] module defines the parsers for the documents themselves.

Caveat haxxor: limitations and infelicities

TODO: This crate requires that all of its inputs be valid UTF-8: This is fine only if we assume that proposal 285 is implemented in mainline Tor.

TODO: This crate has several pieces that could probably be split out into other smaller cases, including handling for version numbers and exit policies.

TODO: Many parts of this crate that should eventually be public aren't.

TODO: this crate needs far more tests!

License: MIT OR Apache-2.0