Skip to main content

Module path

Module path 

Source
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ยง

MaybeOwnedRelay ๐Ÿ”’
Identifier for a relay that could be either known from a NetDir, or specified as an OwnedCircTarget.
OwnedPath ๐Ÿ”’
A path composed entirely of owned components.
TorPathInner ๐Ÿ”’
Non-public helper type to represent the different kinds of Tor path.

Traitsยง

AnonymousPathBuilder ๐Ÿ”’
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.