Skip to main content

Module client

Module client 

Source
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.

StructsΒ§

BootstrapSetting πŸ”’
A representation of whether a TorClient is allowed to bootstrap, and whether it has begun to do so.
ClientShared πŸ”’
Shared pieces of a TorClient, used to implement client functionality.
InertTorClient
A Tor client that is not runnable.
NotConstructedInner πŸ”’
Information stored by a never-bootstrapped TorClient, used to eventually construct a RunningInner and bootstrap.
RunningInner πŸ”’
Data structures for a β€œrunning” client.
StreamPrefs
Preferences for how to route a stream over the Tor network.
TorClient
An active client session on the Tor network.

EnumsΒ§

BootstrapBehavior
Preferences for whether a TorClient should bootstrap on its own or not.
DormantMode
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.
StreamIsolationPreference πŸ”’
Record of how we are isolating connections

FunctionsΒ§

tasks_monitor_dormant πŸ”’
Monitor dormant_mode and enable/disable periodic tasks as applicable
wrap_err πŸ”’
Alias for TorError::from(Error)