Expand description

tor-circmgr: circuits through the Tor network on demand.

Overview

This crate is part of Arti, a project to implement Tor in Rust.

In Tor, a circuit is an encrypted multi-hop tunnel over multiple relays. This crate’s purpose, long-term, is to manage a set of circuits for a client. It should construct circuits in response to a client’s needs, and preemptively construct circuits so as to anticipate those needs. If a client request can be satisfied with an existing circuit, it should return that circuit instead of constructing a new one.

Limitations

But for now, this tor-circmgr code is extremely preliminary; its data structures are all pretty bad, and it’s likely that the API is wrong too.

Modules

Facilities to build circuits directly, instead of via a circuit manager.

Code to construct paths through the Tor network

Structs

A Circuit Manager (CircMgr) manages a set of circuits, returning them when they’re suitable, and launching them if they don’t already exist.

Configuration for a circuit manager.

Configuration for circuit timeouts, expiration, and so on.

A token used to isolate unrelated streams on different circuits.

Rules for building paths over the network.

Configuration for preemptive circuits.

A set of information about how a stream should be isolated.

A port that we want to connect to as a client.

Enums

Represents what we know about the Tor network.

An error returned while looking up or building a circuit

Type Definitions

A Result type as returned from this crate.