Skip to main content

Module tor

Module tor 

Source
Expand description

Tor Transport Implementation

Provides Tor-based transport for FIPS peer communication. Supports three modes:

  • socks5: Outbound-only connections through a Tor SOCKS5 proxy to both clearnet peers and .onion hidden services.
  • control_port: Outbound via SOCKS5 plus control port connection for Tor daemon monitoring (bootstrap status, traffic stats, network liveness).
  • directory: Inbound via a Tor-managed HiddenServiceDir onion service, outbound via SOCKS5. No control port needed; enables Tor’s Sandbox 1 mode. Reads .onion address from hostname file.

§Architecture

Like TCP, each peer has its own connection. The transport reuses FMP stream framing from tcp::stream and follows the same connection pool pattern as the TCP transport. Inbound connections arrive via a local TCP listener that the Tor daemon forwards onion service traffic to.

Modules§

control
Tor control port client.
stats
Tor transport statistics.

Structs§

TorTransport
Tor transport for FIPS.

Enums§

TorAddr
Tor-specific address type for SOCKS5 CONNECT.