Expand description
Code to construct paths through the Tor network
TODO: Iโm not sure this belongs in circmgr, but this is the best place I can think of for now. Iโm also not sure this should be public.
Re-exportsยง
use std::result::Result as StdResult;๐use std::time::SystemTime;๐use itertools::Either;๐use rand::Rng;๐use tor_dircommon::fallback::FallbackDir;๐use tor_error::Bug;๐use tor_error::bad_api_usage;๐use tor_error::internal;๐use tor_geoip::CountryCode;๐use tor_geoip::HasCountryCode;๐use tor_guardmgr::GuardMgr;๐use tor_guardmgr::GuardMonitor;๐use tor_guardmgr::GuardUsable;๐use tor_linkspec::HasAddrs;๐use tor_linkspec::HasRelayIds;๐use tor_linkspec::OwnedChanTarget;๐use tor_linkspec::OwnedCircTarget;๐use tor_linkspec::RelayIdSet;๐use tor_netdir::FamilyRules;๐use tor_netdir::NetDir;๐use tor_netdir::Relay;๐use tor_relay_selection::RelayExclusion;๐use tor_relay_selection::RelaySelectionConfig;๐use tor_relay_selection::RelaySelector;๐use tor_relay_selection::RelayUsage;๐use tor_rtcompat::Runtime;๐use tor_guardmgr::vanguards::Vanguard;๐use tracing::instrument;๐use tracing::instrument;๐use crate::usage::ExitPolicy;๐use crate::DirInfo;๐use crate::Error;๐use crate::PathConfig;๐use crate::Result;๐
Modulesยง
- dirpath ๐
- Code to construct paths to a directory for non-anonymous downloads
- exitpath ๐
- Code for building paths to an exit relay.
- hspath ๐
- Code for building paths for HS circuits.
Structsยง
- TorPath
- A list of Tor relays through the network.
Enumsยง
- Maybe
Owned ๐Relay - Identifier for a relay that could be either known from a NetDir, or specified as an OwnedCircTarget.
- Owned
Path ๐ - A path composed entirely of owned components.
- TorPath
Inner ๐ - Non-public helper type to represent the different kinds of Tor path.
Traitsยง
- Anonymous
Path ๐Builder - A path builder that builds multi-hop, anonymous paths.
Functionsยง
- ensure_
unique_ ๐hops - Returns an error if the specified hop list contains duplicates.
- pick_
path ๐ - Try to create and return a path corresponding to the requirements of this builder.
- select_
guard ๐ - Try to select a guard corresponding to the requirements of this builder.