Structure
TorConfiguration
Value-type configuration passed to TorClient at construction time.
struct TorConfiguration
Mentioned In
Overview
TorConfiguration is the Swift-side projection of the subset of torrc options swift-tor exposes to callers. All fields map either to a torrc directive (DataDirectory, CacheDirectory, SocksPort, CookieAuthentication, HashedControlPassword — see tor.1.txt) or to a swift-tor-only convenience (ownsDataDirectory, extraArgs). The struct is var-mutable on purpose: construct a baseline via makeDefault() or ephemeral(cacheDirectory:) and then override individual fields without using an explicit builder.
Note
Conformance is Sendable — every field is a value type and safely crosses concurrency domains. The struct is not Equatable; mutations through an inout binding replace the whole value via COW.
Important
Once a TorClient is constructed, its configuration is frozen for the life of that session. Mutating the original struct does not affect a running Tor instance; changes take effect only on the next start.
Topics
Core paths
Ports & auth
Extras
Construction