28 lines
980 B
Rust
28 lines
980 B
Rust
//! The control protocol: framing, messages and the network membership
|
|||
|
|
//! handshake.
|
||
|
|
//!
|
||
|
|
//! Only control messages travel over iroh. User IP traffic is never tunnelled
|
||
|
|
//! through this protocol.
|
||
|
|
//!
|
||
|
|
//! Layering, outermost first:
|
||
|
|
//!
|
||
|
|
//! 1. iroh/QUIC connection with ALPN [`message::ALPN`] — endpoint
|
||
|
|
//! authentication, confidentiality and integrity.
|
||
|
|
//! 2. One bidirectional stream per session, carrying length-prefixed frames
|
||
|
|
//! ([`frame`]).
|
||
|
|
//! 3. The [`handshake`], which must complete before anything else is accepted.
|
||
|
|
//! 4. [`message::Envelope`]s carrying [`message::ControlMessage`]s, each
|
||
|
|
//! re-checked against the session's network id.
|
||
|
|
//!
|
||
|
|
//! Nothing here adds its own encryption on top of iroh.
|
||
|
|
|
||
|
|
pub mod frame;
|
||
|
|
pub mod handshake;
|
||
|
|
pub mod message;
|
||
|
|
|
||
|
|
pub use frame::{read_frame, write_frame};
|
||
|
|
pub use handshake::{HandshakeOutcome, Role};
|
||
|
|
pub use message::{
|
||
|
|
ALPN, Announcement, AuthProof, ControlMessage, Envelope, Hello, HelloAck, PROTOCOL_VERSION,
|
||
|
|
};
|