Expand description
A general interface for Tor client usage.
To construct a client, run the TorClient::create_bootstrapped method.
Once the client is bootstrapped, you can make anonymous
connections (βstreamsβ) over the Tor network using
TorClient::connect.
Re-exportsΒ§
use derive_deftly::Deftly;πuse crate::address::IntoTorAddr;πuse crate::address::ResolveInstructions;πuse crate::address::StreamInstructions;πuse crate::config::ClientAddrConfig;πuse crate::config::StreamTimeoutConfig;πuse crate::config::TorClientConfig;πuse crate::status::BootstrapStatus;πuse safelog::Sensitive;πuse safelog::sensitive;πuse tor_async_utils::DropNotifyWatchSender;πuse tor_async_utils::PostageWatchSenderExt;πuse tor_chanmgr::ChanMgrConfig;πuse tor_circmgr::ClientDataTunnel;πuse tor_circmgr::isolation::Isolation;πuse tor_circmgr::isolation::StreamIsolation;πuse tor_circmgr::IsolationToken;πuse tor_circmgr::TargetPort;πuse tor_circmgr::isolation::StreamIsolationBuilder;πuse tor_config::BoolOrAuto;πuse tor_config::MutCfg;πuse tor_dirmgr::bridgedesc::BridgeDescMgr;πuse tor_dirmgr::DirMgrStore;πuse tor_dirmgr::Timeliness;πuse tor_error::Bug;πuse tor_error::error_report;πuse tor_error::internal;πuse tor_guardmgr::GuardMgr;πuse tor_guardmgr::RetireCircuits;πuse tor_keymgr::Keystore;πuse tor_memquota::MemoryQuotaTracker;πuse tor_netdir::NetDirProvider;πuse tor_netdir::params::NetParameters;πuse tor_persist::StateMgr;πuse tor_proto::client::stream::DataStream;πuse tor_proto::client::stream::IpVersionPreference;πuse tor_proto::client::stream::StreamParameters;πuse tor_rtcompat::PreferredRuntime;πuse tor_rtcompat::Runtime;πuse tor_rtcompat::SleepProviderExt;πuse tor_hsclient::HsClientConnector;πuse tor_hsclient::HsClientDescEncKeypairSpecifier;πuse tor_hsclient::HsClientSecretKeysBuilder;πuse tor_hscrypto::pk::HsClientDescEncKey;πuse tor_hscrypto::pk::HsClientDescEncKeypair;πuse tor_hscrypto::pk::HsClientDescEncSecretKey;πuse tor_keymgr::CTorClientKeystore;πuse tor_netdir::DirEvent;πuse tor_keymgr::CTorServiceKeystore;πuse tor_persist::state_dir::StateDirectory;πuse tor_hsservice::HsIdKeypairSpecifier;πuse tor_hscrypto::pk::HsId;πuse tor_hscrypto::pk::HsIdKeypair;πuse tor_keymgr::KeystoreSelector;πuse tor_keymgr::ArtiNativeKeystore;πuse tor_keymgr::KeyMgr;πuse tor_keymgr::KeyMgrBuilder;πuse tor_keymgr::config::ArtiKeystoreKind;πuse tor_keymgr::ArtiEphemeralKeystore;πuse futures::StreamExt as _;πuse futures::lock::Mutex as AsyncMutex;πuse std::net::IpAddr;πuse std::result::Result as StdResult;πuse std::sync::Arc;πuse std::sync::Mutex;πuse tor_rtcompat::SpawnExt;πuse crate::err::ErrorDetail;πuse crate::TorClientBuilder;πuse crate::status;πuse crate::util;πuse tor_geoip::CountryCode;πuse tor_rtcompat::scheduler::TaskHandle;πuse tracing::debug;πuse tracing::info;πuse tracing::instrument;πuse tracing::instrument;πuse tracing::warn;πuse tor_persist::FsStateMgr as UsingStateMgr;πuse tor_rpcbase::templates::*;π
StructsΒ§
- Bootstrap
Setting π - A representation of whether a
TorClientis allowed to bootstrap, and whether it has begun to do so. - Client
Shared π - Shared pieces of a
TorClient, used to implement client functionality. - Inert
TorClient - A Tor client that is not runnable.
- NotConstructed
Inner π - Information stored by a never-bootstrapped
TorClient, used to eventually construct aRunningInnerand bootstrap. - Running
Inner π - Data structures for a βrunningβ client.
- Stream
Prefs - Preferences for how to route a stream over the Tor network.
- TorClient
- An active client session on the Tor network.
EnumsΒ§
- Bootstrap
Behavior - Preferences for whether a
TorClientshould bootstrap on its own or not. - Dormant
Mode - What level of sleep to put a Tor client into.
- Inner π
- A typestate object holding the parts of the client state that we may or may not have depending on whether we are running.
- Stream
Isolation πPreference - Record of how we are isolating connections
FunctionsΒ§
- tasks_
monitor_ πdormant - Monitor
dormant_modeand enable/disable periodic tasks as applicable - wrap_
err π - Alias for TorError::from(Error)