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ยง
- Channel
Authentication ๐Data - Channel authentication data. This is only relevant for a Relay to Relay channel which are authenticated using this buffet of bytes.
- Relay
Channel Auth Material - Object containing the keys and certificates for channel authentication.
- Relay
Channel Builder - 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::Certscell for the given relay identities and channel type. - build_
netinfo_ ๐cell - Build a
msg::Netinfocell from the given peer IPs and our advertised addresses.