tor_netdoc/doc.rs
1//! Individual document types that we can parse in Tor's meta-format.
2//!
3//! Right now, we recognize four kinds of documents.
4//!
5//! A [netstatus::MdConsensus] is a multi-signed document that the
6//! directory authorities use to tell clients and relays who is on the
7//! network. It contains information about each relay, and it links to
8//! additional microdescriptors ([microdesc::Microdesc]) that have
9//! more information about each relay.
10//!
11//! In order to validate a [netstatus::MdConsensus], you need to have
12//! the authority certificate ([authcert::AuthCert]) for the directory
13//! authorities that signed it.
14//!
15//! Finally, in order to use relays not listed in the consensus (such
16//! as bridges), clients use those relays' self-signed router
17//! descriptors ([routerdesc::RouterDesc]). These router descriptors
18//! are also uploaded to the authorities in order to tell them about
19//! relays and their status.
20//!
21//! All of these formats are described in
22//! [dir-spec.txt](https://spec.torproject.org/dir-spec).
23//!
24//! # Limitations
25//!
26//! Tor recognizes other kinds of documents that this crate doesn't
27//! parse yet. There are "ExtraInfo documents" that encode
28//! information about relays that almost nobody needs.
29//! Finally, there are the voting documents themselves that authorities
30//! use in order to calculate the consensus.
31
32#[macro_use]
33mod ns_variety_definition_macros;
34
35pub mod authcert;
36#[cfg(feature = "hs-common")]
37pub mod hsdesc;
38pub mod microdesc;
39pub mod netstatus;
40
41pub mod routerdesc;