Expand description
Vanguard sets
Re-exportsยง
use std::cmp;๐use std::time::Duration;๐use std::time::SystemTime;๐use derive_deftly::Deftly;๐use rand::seq::IndexedRandom as _;๐use serde::Deserialize;๐use serde::Deserialize;๐use serde::Serialize;๐use serde::Serialize;๐use tor_basic_utils::RngExt as _;๐use tor_error::internal;๐use tor_linkspec::HasRelayIds as _;๐use tor_linkspec::RelayIdSet;๐use tor_linkspec::RelayIds;๐use tor_netdir::NetDir;๐use tor_netdir::Relay;๐use tor_relay_selection::LowLevelRelayPredicate as _;๐use tor_relay_selection::RelayExclusion;๐use tor_relay_selection::RelaySelector;๐use tor_relay_selection::RelayUsage;๐use tor_rtcompat::Runtime;๐use tracing::debug;๐use tracing::trace;๐use crate::VanguardMgrError;๐use crate::VanguardMode;๐use super::VanguardParams;๐
Macrosยง
Structsยง
- Time
Bound ๐Vanguard - An identifier for a time-bound vanguard.
- Vanguard
- A vanguard relay.
- Vanguard
Set ๐ - A set of vanguards, for use in a particular
Layer. - Vanguard
Sets ๐ - The L2 and L3 vanguard sets, stored in the same struct to simplify serialization.
Functionsยง
- select_
lifetime ๐ - Randomly select the lifetime of a vanguard from the
max(X,X)distribution, whereXis a uniform random value betweenmin_lifetimeandmax_lifetime.