Skip to main content

krot_proto/
lib.rs

1//! Wire types and framing for the KROT tunnel protocol.
2//!
3//! This crate is the single source of truth for the on-the-wire format
4//! defined in wire protocol spec. Server and client implementations MUST route
5//! all encoding and decoding through the types exposed here.
6
7#![deny(missing_debug_implementations)]
8
9pub mod auth;
10pub mod consts;
11pub mod error;
12pub mod frames;
13pub mod framing;
14pub mod ids;
15pub mod mux;
16pub mod stream;
17
18pub use auth::{sign_challenge, verify_challenge, AUTH_DOMAIN_SEPARATOR};
19pub use consts::*;
20pub use error::ErrorCode;
21pub use frames::{ClientFrame, HttpMetadata, InspectionPrelude, ServerFrame, TunnelKind};
22pub use framing::{decode_frame, encode_frame, FramingError};
23pub use ids::{Nonce, PubKey, SessionId, Signature, TunnelId};
24pub use mux::{
25    is_client_opened, is_server_opened, MuxFlag, MuxHeader, MuxHeaderError, CONTROL_STREAM_ID,
26    MUX_HEADER_SIZE,
27};
28pub use stream::{DataHeader, StreamKind, StreamKindError};