Expand description
MITM Proxy with Transparent Traffic Interception
This crate provides a man-in-the-middle (MITM) proxy implementation similar to Burp Suite, allowing transparent interception and modification of HTTP/HTTPS traffic.
§Features
- Automatic CA certificate generation
- Transparent HTTPS interception using rustls backend
- Traffic interception and modification interfaces
- Reuses slinger’s Socket implementation
§Example
use slinger_mitm::{MitmProxy, MitmConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = MitmConfig::default();
let proxy = MitmProxy::new(config).await?;
proxy.start("127.0.0.1:8080").await?;
Ok(())
}Structs§
- Certificate
Authority - Certificate Authority for generating certificates
- Certificate
Manager - Manager for caching generated server certificates
- Interceptor
- Default pass-through interceptor
- Interceptor
Handler - Combined interceptor handler for both HTTP and TCP traffic
- Logging
Interceptor - Logging interceptor implementation that handles both HTTP and TCP traffic
- Mitm
Config - Configuration for MITM proxy
- Mitm
Proxy - MITM Proxy main struct
- Mitm
Request - MITM Request wrapper that wraps slinger::Request with connection metadata. Used for both HTTP and non-HTTP (raw TCP) traffic interception.
- Mitm
Response - MITM Response wrapper that wraps slinger::Response with connection metadata. Used for both HTTP and non-HTTP (raw TCP) traffic interception.
- Proxy
Server - Proxy server implementation
- Proxy
Server Builder - Builder for
ProxyServer. - Socks5
Server - SOCKS5 server for MITM proxy
Enums§
- Error
- Error types for MITM proxy operations
- Target
Addr - SOCKS5 target address
Traits§
- Request
Interceptor - Trait for intercepting and modifying requests (both HTTP and raw TCP)
- Response
Interceptor - Trait for intercepting and modifying responses (both HTTP and raw TCP)
Type Aliases§
- Result
- Result type for MITM operations