Skip to main content

Module channel

Module channel 

Source
Expand description

Relay channel code.

This contains relay specific channel code. In other words, everything that a relay needs to establish a channel according to the Tor protocol.

Re-exportsยง

pub use responder::MaybeVerifiableRelayResponderChannel;
use digest::Digest; ๐Ÿ”’
use futures::AsyncRead; ๐Ÿ”’
use futures::AsyncWrite; ๐Ÿ”’
use rand::RngExt; ๐Ÿ”’
use safelog::Sensitive; ๐Ÿ”’
use std::net::IpAddr; ๐Ÿ”’
use std::net::SocketAddr; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::time::UNIX_EPOCH; ๐Ÿ”’
use tor_cell::chancell::msg; ๐Ÿ”’
use tor_cert::EncodedEd25519Cert; ๐Ÿ”’
use tor_cert::rsa::EncodedRsaCrosscert; ๐Ÿ”’
use tor_cert::x509::TlsKeyAndCert; ๐Ÿ”’
use tor_error::internal; ๐Ÿ”’
use tor_linkspec::HasRelayIds; ๐Ÿ”’
use tor_linkspec::OwnedChanTarget; ๐Ÿ”’
use tor_linkspec::RelayIdRef; ๐Ÿ”’
use tor_linkspec::RelayIdType; ๐Ÿ”’
use tor_llcrypto as ll; ๐Ÿ”’
use tor_llcrypto::pk::ed25519::Ed25519Identity; ๐Ÿ”’
use tor_llcrypto::pk::ed25519::Ed25519SigningKey; ๐Ÿ”’
use tor_llcrypto::pk::rsa; ๐Ÿ”’
use tor_llcrypto::pk::rsa::RsaIdentity; ๐Ÿ”’
use tor_relay_crypto::pk::RelayLinkSigningKeypair; ๐Ÿ”’
use tor_rtcompat::CertifiedConn; ๐Ÿ”’
use tor_rtcompat::CoarseTimeProvider; ๐Ÿ”’
use tor_rtcompat::SleepProvider; ๐Ÿ”’
use tor_rtcompat::StreamOps; ๐Ÿ”’
use crate::channel::handshake::VerifiedChannel; ๐Ÿ”’
use crate::channel::ClogDigest; ๐Ÿ”’
use crate::channel::SlogDigest; ๐Ÿ”’
use crate::peer::PeerAddr; ๐Ÿ”’
use crate::relay::CreateRequestHandler; ๐Ÿ”’
use crate::relay::channel::handshake::AUTHTYPE_ED25519_SHA256_RFC5705; ๐Ÿ”’
use crate::relay::channel::handshake::RelayResponderHandshake; ๐Ÿ”’
use crate::Error; ๐Ÿ”’
use crate::Result; ๐Ÿ”’
use crate::channel::RelayInitiatorHandshake; ๐Ÿ”’
use crate::memquota::ChannelAccount; ๐Ÿ”’

Modulesยง

create_handler ๐Ÿ”’
Handler for CREATE* cells.
handshake ๐Ÿ”’
Implementations for the relay channel handshake
initiator ๐Ÿ”’
Relay initiator channel.
responder ๐Ÿ”’
Relay responder channel.

Structsยง

ChannelAuthenticationData ๐Ÿ”’
Channel authentication data. This is only relevant for a Relay to Relay channel which are authenticated using this buffet of bytes.
RelayChannelAuthMaterial
Object containing the keys and certificates for channel authentication.
RelayChannelBuilder
Structure for building and launching a relay Tor channel.

Staticsยง

LINK_AUTH ๐Ÿ”’
A list of link authentication that we support (LinkAuth).

Functionsยง

build_certs_cell ๐Ÿ”’
Helper: Build a msg::Certs cell for the given relay identities and channel type.
build_netinfo_cell ๐Ÿ”’
Build a msg::Netinfo cell from the given peer IPs and our advertised addresses.