Expand description
§tor-chanmgr
Manage a set of channels on the Tor network.
§Overview
This crate is part of Arti, a project to implement Tor in Rust.
In Tor, a channel is a connection to a Tor relay. It can be direct via TLS, or indirect via TLS over a pluggable transport.
Since a channel can be used for more than one circuit, it’s
important to reuse channels when possible. This crate implements
a ChanMgr type that can be used to create channels on demand,
and return existing channels when they already exist.
§Compile-time features
pt-client– Build with APIs to support pluggable transports.
§Experimental and unstable features
Note that the APIs enabled by these features are NOT covered by semantic versioning1 guarantees: we might break them or remove them between patch versions.
experimental– Build with all experimental features above. (Currently, there are no experimental features in this crate, but there may be some in the future.)
License: MIT OR Apache-2.0
Remember, semantic versioning is what makes various
cargofeatures work reliably. To be explicit: if you wantcargo updateto only make safe changes, then you cannot enable these features. ↩
Re-exports§
pub use err::Error;pub use config::ChannelConfig;pub use config::ChannelConfigBuilder;pub use config::ProxyProtocol;pub use mgr::ChanMgrConfig;pub(crate) use crate::factory::BootstrapReporter;🔒pub use event::ConnBlockage;pub use event::ConnStatus;pub use event::ConnStatusEvents;pub(crate) use futures::StreamExt;🔒pub(crate) use futures::select_biased;🔒pub(crate) use std::result::Result as StdResult;🔒pub(crate) use Arc;🔒pub(crate) use Weak;🔒pub(crate) use std::time::Duration;🔒pub(crate) use tor_config::ReconfigureError;🔒pub(crate) use tor_error::error_report;🔒pub(crate) use ChanTarget;🔒pub(crate) use OwnedChanTarget;🔒pub(crate) use NetDirProvider;🔒pub(crate) use params::NetParameters;🔒pub(crate) use tor_proto::channel::Channel;🔒pub(crate) use tor_proto::memquota::ChannelAccount;🔒pub(crate) use tor_proto::memquota::ToplevelAccount;🔒pub(crate) use tor_rtcompat::SpawnExt;🔒pub(crate) use tracing::debug;🔒pub(crate) use tracing::instrument;🔒pub(crate) use tracing::instrument;🔒pub(crate) use ResultVoidErrExt;🔒pub(crate) use Void;🔒pub(crate) use async_trait::async_trait;🔒pub(crate) use safelog::Sensitive;🔒pub(crate) use tor_proto::relay::CreateRequestHandler;🔒pub(crate) use tor_proto::relay::channel_provider::ChannelProvider;🔒pub(crate) use tor_rtcompat::Runtime;🔒pub(crate) use TaskHandle;🔒pub(crate) use TaskSchedule;🔒
Modules§
- builder
- Implement a concrete type to build channels over a transport.
- config 🔒
- Configuration for a channel manager (and, therefore, channels)
- err 🔒
- Declare error types for tor-chanmgr
- event 🔒
- Code for exporting events from the channel manager.
- factory
- Traits and code to define different mechanisms for building Channels to different kinds of targets.
- mgr 🔒
- Abstract implementation of a channel manager
- transport
- Code to define the notion of a “Transport” and implement a default transport.
Structs§
- ChanMgr
- An object that remembers a set of live channels, and launches new ones on request.
Enums§
- Chan
Provenance - Description of how we got a channel.
- Channel
Usage - The usage that we have in mind when requesting a channel.
- Dormancy
- Dormancy state, as far as the channel manager is concerned
Type Aliases§
- Result
- A Result as returned by this crate.