Expand description
§NNTP Proxy Library
A high-performance NNTP proxy server implementation with two operating modes: 1:1 mode (one backend per client) and per-command routing mode.
§Architecture
The proxy is organized into several modules for clean separation of concerns:
- auth: Authentication handling for both client and backend connections
- command: NNTP command parsing and classification
- config: Configuration loading and management
- pool: Connection and buffer pooling for high performance
- protocol: NNTP protocol constants and response parsing
- proxy: Main proxy orchestration (NntpProxy struct)
- router: Backend selection and load balancing
- types: Core type definitions (ClientId, RequestId, BackendId)
§Design Philosophy
This proxy operates in stateless mode, rejecting commands that require maintaining session state (like GROUP, NEXT, LAST). This design enables:
- Simpler architecture with clear separation of concerns
- Per-command routing mode where each command can use a different backend
- Easy testing and maintenance of individual components
§Operating Modes
- 1:1 mode: Traditional mode where each client gets a dedicated backend connection
- Per-command routing mode: Each command is routed to a backend (round-robin), but commands are still processed serially (NNTP is synchronous)
Re-exports§
pub use config::CacheConfig;pub use config::Config;pub use config::ServerConfig;pub use config::create_default_config;pub use config::load_config;pub use network::SocketOptimizer;
Modules§
- cache
- Cache module for NNTP article caching
- command
- Command processing module
- config
- Configuration module
- connection_
error - Connection error types for the NNTP proxy
- constants
- Constants used throughout the NNTP proxy
- health
- network
- Network socket optimization utilities
- pool
- Connection pooling and buffer pooling modules
- protocol
- NNTP protocol handling module
- router
- Backend server selection and load balancing
- session
- Client session management
- stream
- Stream abstraction for supporting multiple connection types
- tls
- TLS configuration and handshake management for NNTP connections
- types
- Core types for request tracking and identification