pub struct DirectoryAuthority {
pub nickname: String,
pub address: IpAddr,
pub dir_port: u16,
pub or_port: u16,
pub fingerprint: String,
pub v3ident: Option<String>,
}Expand description
Information about a Tor directory authority.
Directory authorities are trusted servers that vote on the network consensus. They are hardcoded into Tor clients and are the root of trust for the Tor network.
§Fields
Each authority has:
- A nickname for identification
- Network addresses (IP, DirPort, ORPort)
- A fingerprint (identity key hash)
- A v3ident (v3 authority identity) for consensus voting
§Example
use stem_rs::descriptor::remote::get_authorities;
for auth in get_authorities() {
println!("{}: {}:{}", auth.nickname, auth.address, auth.dir_port);
}Fields§
§nickname: StringHuman-readable name of the authority.
Examples: “moria1”, “tor26”, “gabelmoo”
address: IpAddrIP address of the authority.
dir_port: u16Port for directory requests (HTTP).
Used for downloading descriptors and consensus documents.
or_port: u16Port for onion routing connections (TLS).
Used for relay-to-relay communication.
fingerprint: StringSHA-1 fingerprint of the authority’s identity key.
A 40-character hexadecimal string.
v3ident: Option<String>V3 directory authority identity.
Used for signing votes and the consensus. Some authorities may not have this if they don’t participate in v3 consensus voting.
Trait Implementations§
Source§impl Clone for DirectoryAuthority
impl Clone for DirectoryAuthority
Source§fn clone(&self) -> DirectoryAuthority
fn clone(&self) -> DirectoryAuthority
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DirectoryAuthority
impl RefUnwindSafe for DirectoryAuthority
impl Send for DirectoryAuthority
impl Sync for DirectoryAuthority
impl Unpin for DirectoryAuthority
impl UnwindSafe for DirectoryAuthority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more