Skip to main content

Module initiator

Module initiator 

Source
Expand description

Relay initiator channel.

Code only related to a relay channel opened as an initiator. The handshake code is responsible for creating an UnverifiedInitiatorRelayChannel when connecting to another relay in order to build a tor channel.

The UnverifiedInitiatorRelayChannel::verify function needs to be called to verify the underlying channel and build a VerifiedInitiatorRelayChannel channel which needs to be finished with VerifiedInitiatorRelayChannel::finish to get a Channel/Reactor.

Note that channel cells are sent in the handshake upon connection. And then in the finish() process. The verify can be CPU intensive and thus in its own function.

Re-exportsยง

use digest::Digest; ๐Ÿ”’
use futures::AsyncRead; ๐Ÿ”’
use futures::AsyncWrite; ๐Ÿ”’
use futures::SinkExt; ๐Ÿ”’
use safelog::MaybeSensitive; ๐Ÿ”’
use std::net::IpAddr; ๐Ÿ”’
use std::ops::Deref; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use tracing::trace; ๐Ÿ”’
use tor_cell::chancell::msg; ๐Ÿ”’
use tor_linkspec::OwnedChanTarget; ๐Ÿ”’
use tor_rtcompat::CertifiedConn; ๐Ÿ”’
use tor_rtcompat::CoarseTimeProvider; ๐Ÿ”’
use tor_rtcompat::Runtime; ๐Ÿ”’
use tor_rtcompat::SleepProvider; ๐Ÿ”’
use tor_rtcompat::StreamOps; ๐Ÿ”’
use crate::ClockSkew; ๐Ÿ”’
use crate::RelayChannelAuthMaterial; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use crate::channel::Channel; ๐Ÿ”’
use crate::channel::ChannelMode; ๐Ÿ”’
use crate::channel::ClogDigest; ๐Ÿ”’
use crate::channel::Reactor; ๐Ÿ”’
use crate::channel::SlogDigest; ๐Ÿ”’
use crate::channel::circmap::CircIdRange; ๐Ÿ”’
use crate::channel::handshake::UnverifiedInitiatorChannel; ๐Ÿ”’
use crate::channel::handshake::VerifiedChannel; ๐Ÿ”’
use crate::peer::PeerAddr; ๐Ÿ”’
use crate::peer::PeerInfo; ๐Ÿ”’
use crate::relay::CreateRequestHandler; ๐Ÿ”’
use crate::relay::channel::ChannelAuthenticationData; ๐Ÿ”’

Structsยง

UnverifiedInitiatorRelayChannel
An unverified relay initiator channel.
VerifiedInitiatorRelayChannel
A verified relay initiator channel.