1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Proxy server module.
//!
//! This module provides the proxy server implementation with support for:
//! - Fault injection (latency, error, TCP faults)
//! - Script-based fault decisions (Rhai, Lua, JavaScript)
//! - Mountebank-compatible response behaviors (wait, copy, lookup, decorate)
//! - Request recording and replay (proxyOnce, proxyAlways modes)
//! - Multi-upstream routing
//! - TLS/HTTPS support
//!
//! # Module Structure
//!
//! - `server` - ProxyServer struct and main run loop
//! - `handler` - Request handling and fault injection logic
//! - `forwarding` - Request forwarding to upstream servers
//! - `client` - HTTP client creation and configuration
//! - `tls` - TLS utilities and certificate handling
//! - `network` - Network listener utilities (SO_REUSEPORT)
//! - `response_ext` - Response extension traits for body transformations
// Re-export public API types
// These are used by main.rs and may be used by external consumers
pub use error_response;
pub use rule_applies_to_upstream;
pub use ProxyServer;