sentinel_proxy/websocket/
mod.rs

1//! WebSocket frame handling for frame-level inspection.
2//!
3//! This module provides WebSocket frame parsing and encoding per RFC 6455,
4//! enabling agents to inspect individual WebSocket frames for security purposes.
5//!
6//! # Architecture
7//!
8//! After a WebSocket upgrade (101 response), Sentinel can optionally intercept
9//! the bidirectional byte stream and parse it into frames for inspection:
10//!
11//! ```text
12//! Client <-> [Frame Parser] <-> Sentinel <-> [Frame Parser] <-> Upstream
13//!                 |                                |
14//!                 v                                v
15//!          WebSocketFrame                   WebSocketFrame
16//!                          \               /
17//!                           v             v
18//!                        Agent Inspector
19//!                     (Allow/Drop/Close)
20//! ```
21//!
22//! # Features
23//!
24//! - RFC 6455 compliant frame parsing
25//! - Masking/unmasking support (client frames are masked)
26//! - Configurable maximum frame size
27//! - Frame-level agent inspection
28
29pub mod codec;
30pub mod inspector;
31pub mod proxy;
32
33pub use codec::{Opcode, WebSocketCodec, WebSocketFrame};
34pub use inspector::{InspectionResult, WebSocketInspector};
35pub use proxy::{CloseReason, FrameInspector, ProcessResult, WebSocketHandler};