pub struct TorConfig {
pub socks_proxy: SocketAddr,
pub control_port: SocketAddr,
pub data_dir: PathBuf,
pub stream_isolation: bool,
pub max_circuits: usize,
pub circuit_timeout: Duration,
pub enable_bandwidth_limit: bool,
pub max_bandwidth_bps: u64,
pub use_bridges: bool,
pub bridges: Vec<String>,
}Expand description
Configuration for Tor manager
Fields§
§socks_proxy: SocketAddrSOCKS5 proxy address (default: 127.0.0.1:9050)
control_port: SocketAddrControl port address (default: 127.0.0.1:9051)
data_dir: PathBufTor data directory
stream_isolation: boolEnable stream isolation (separate circuits per stream)
max_circuits: usizeMaximum circuits to maintain
circuit_timeout: DurationCircuit timeout duration
enable_bandwidth_limit: boolEnable bandwidth limiting
max_bandwidth_bps: u64Maximum bandwidth in bytes/sec (0 = unlimited)
use_bridges: boolUse bridges for censorship circumvention
bridges: Vec<String>Bridge addresses (if use_bridges is true)
Implementations§
Source§impl TorConfig
impl TorConfig
Sourcepub fn high_privacy() -> Self
pub fn high_privacy() -> Self
Configuration for high-privacy mode
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Configuration for high-performance mode
Sourcepub fn censorship_resistant() -> Self
pub fn censorship_resistant() -> Self
Configuration for censorship circumvention
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TorConfig
impl RefUnwindSafe for TorConfig
impl Send for TorConfig
impl Sync for TorConfig
impl Unpin for TorConfig
impl UnwindSafe for TorConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more