rift-mock-core 0.25.0

Rift core engine: imposter lifecycle, matching, behaviors, scripting and flow-state — usable in-process without the CLI or admin server.
Documentation
//! Shared proxy/TLS utilities.
//!
//! This module used to host the reverse-proxy server and its request pipeline.
//! That mode was unwired from the binary in ada6f30 (2025-11-30) and removed in #975; what is left
//! is the TLS and listener machinery the imposter path and the intercept listener share.
//!
//! # Module Structure
//!
//! - `tls` - TLS acceptor construction and session resumption
//! - `outbound_tls` - the shared trust policy for connections Rift initiates (#974)
//! - `client_identity` - a `proxy` stub's client certificate for an mTLS upstream (#1609)
//! - `intercept_ca` - the TLS-MITM certificate authority and per-SNI resolver
//! - `truststore` - PKCS#12 / JKS export of that CA
//! - `network` - listener utilities (SO_REUSEPORT) and accept-error classification
//! - `preface` - bounded HTTP/1-vs-HTTP/2 detection for the `auto::Builder` listeners (#1030)

pub(crate) mod network;
pub(crate) mod tls;

pub mod client_identity;
pub mod intercept_ca;
pub mod outbound_tls;
pub mod preface;
pub mod truststore;

// Re-export public API types
// These are used by main.rs and may be used by external consumers
// TLS session-resumption config, shared with the intercept listener in rift-http-proxy (issue #705).
pub use tls::{TLS_SESSION_CACHE_SIZE, alpn_protocols, configure_session_resumption};
// One outbound-TLS trust policy for every client Rift initiates a connection with (issue #974).
pub use outbound_tls::OutboundTls;
// The client certificate a `proxy` stub presents to an mTLS upstream (issue #1609).
pub use client_identity::ClientIdentity;
// HTTP connection-builder tuning, shared with the metrics/admin accept loops in rift-http-proxy
// (issue #716) — `network` itself stays `pub(crate)`, only this type is exposed.
pub use network::{DEFAULT_HTTP_MAX_BUF, HttpTuning};
// The one rule for turning an operator's bind host into an address (issue #1137), shared by every
// bind door in the workspace: the admin plane, the intercept listener, the FFI, and imposters.
pub use network::{bind_addr, bind_host};
// Node's no-host listen and the server-listener socket builder, shared with rift-http-proxy's admin,
// metrics, front-door and intercept listeners (issue #1528).
pub use network::{bind_server_listener, bind_unspecified};
// Which clients imposter ports and the front door admit (`--local-only`, issue #1523).
pub use network::PeerPolicy;
// Accept-error handling shared by every listener in the workspace: the imposter serve loop
// (issue #750) and the admin API accept loop (issue #826), which must classify-and-retry rather
// than let one transient accept failure end the server.
pub use network::{
    AcceptBackoff, AcceptErrorClass, AcceptErrorEvent, AcceptErrorLog, classify_accept_error,
    is_fatal_listener_error,
};