b14c5f370e
`tor-rtcompat`'s `TlsConnector` trait previously included a method to create a TLS-over-TCP connection, which implied creating a TCP stream inside that method. This commit changes that, and makes the function wrap a TCP stream, as returned from the runtime's `TcpProvider` trait implementation, instead. This means you can actually override `TcpProvider` and have it apply to *all* connections Arti makes, which is useful for issues like arti#235 and other cases where you want to have a custom TCP stream implementation. This required updating the mock TCP/TLS types in `tor-rtmock` slightly; due to the change in API, we now store whether a `LocalStream` should actually be a TLS stream inside the stream itself, and check this property on reads/writes in order to detect misuse. The fake TLS wrapper checks this property and removes it in order to "wrap" the stream, making reads and writes work again. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
README.md
tor-chanmgr
tor-chanmgr
: Manage a set of channels on the Tor network.
Overview
This crate is part of Arti, a project to implement Tor in Rust.
In Tor, a channel is a connection to a Tor relay. It can be direct via TLS, or indirect via TLS over a pluggable transport. (For now, only direct channels are supported.)
Since a channel can be used for more than one circuit, it's
important to reuse channels when possible. This crate implements
a [ChanMgr
] type that can be used to create channels on demand,
and return existing channels when they already exist.
License: MIT OR Apache-2.0