Expand description
Manage a pool of circuits for usage with onion services.
Re-exportsยง
use std::ops::Deref;๐use std::sync::Arc;๐use std::sync::Mutex;๐use std::sync::Weak;๐use crate::AbstractTunnel;๐use crate::CircMgr;๐use crate::CircMgrInner;๐use crate::ClientOnionServiceDataTunnel;๐use crate::ClientOnionServiceDirTunnel;๐use crate::ClientOnionServiceIntroTunnel;๐use crate::Error;๐use crate::Result;๐use crate::ServiceOnionServiceDataTunnel;๐use crate::ServiceOnionServiceDirTunnel;๐use crate::ServiceOnionServiceIntroTunnel;๐use crate::build::TunnelBuilder;๐use crate::build::onion_circparams_from_netparams;๐use crate::mgr::AbstractTunnelBuilder;๐use crate::path::hspath::hs_stem_terminal_hop_usage;๐use crate::timeouts;๐use futures::StreamExt;๐use futures::TryFutureExt;๐use once_cell::sync::OnceCell;๐use tor_error::Bug;๐use tor_error::debug_report;๐use tor_error::bad_api_usage;๐use tor_error::internal;๐use tor_guardmgr::VanguardMode;๐use tor_linkspec::CircTarget;๐use tor_linkspec::HasRelayIds as _;๐use tor_linkspec::IntoOwnedChanTarget;๐use tor_linkspec::OwnedChanTarget;๐use tor_linkspec::OwnedCircTarget;๐use tor_netdir::NetDir;๐use tor_netdir::NetDirProvider;๐use tor_netdir::Relay;๐use tor_proto::client::circuit;๐use tor_proto::client::circuit::CircParameters;๐use tor_relay_selection::LowLevelRelayPredicate;๐use tor_relay_selection::RelayExclusion;๐use tor_rtcompat::Runtime;๐use tor_rtcompat::SleepProviderExt;๐use tor_rtcompat::SpawnExt;๐use tor_rtcompat::scheduler::TaskHandle;๐use tor_rtcompat::scheduler::TaskSchedule;๐use tracing::debug;๐use tracing::instrument;๐use tracing::instrument;๐use tracing::trace;๐use tracing::warn;๐use web_time_compat::Duration;๐use web_time_compat::Instant;๐use web_time_compat::SystemTime;๐use std::result::Result as StdResult;๐pub use config::HsCircPoolConfig;use self::pool::HsCircPrefs;๐use crate::path::hspath::select_middle_for_vanguard_circ;๐
Modulesยง
- config ๐
- Configuration logic for
HsCircPool. - pool ๐
- An internal pool object that we use to implement HsCircPool.
Structsยง
- HsCirc
Pool - An object to provide circuits for implementing onion services.
- HsCirc
Pool ๐Inner - An object to provide circuits for implementing onion services.
- HsCirc
Stem ๐ - A hidden service circuit stem.
- Inner ๐
- The mutable state of an
HsCircPool
Enumsยง
- HsCirc
Kind - The (onion-service-related) purpose for which a given circuit is going to be used.
- HsCirc
Stem ๐Kind - A kind of hidden service circuit stem.
- NoRelay
ForPath ๐Ent - A possible error condition when trying to look up a PathEntry
Functionsยง
- circuit_
compatible_ ๐with_ target - Return true if we can extend a pre-built circuit
circtotarget. - circuit_
still_ ๐useable - Return true if we can still use a given pre-build circuit.
- launch_
hs_ ๐circuits_ as_ needed - Background task to launch onion circuits as needed.
- relay_
for_ ๐path_ ent - Look up a relay in a netdir corresponding to
ent - remove_
unusable_ ๐circuits - Background task to remove unusable circuits whenever the directory changes.
- vanguards_
circuit_ ๐compatible_ with_ target - Return true if we can extend a pre-built vanguards circuit
circtotarget.