Crate slinger_mitm

Crate slinger_mitm 

Source
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§

CertificateAuthority
Certificate Authority for generating certificates
CertificateManager
Manager for caching generated server certificates
Interceptor
Default pass-through interceptor
InterceptorHandler
Combined interceptor handler
MitmConfig
Configuration for MITM proxy
MitmProxy
MITM Proxy main struct
ProxyServer
Proxy server implementation
ProxyServerBuilder
Builder for ProxyServer.
Socks5Server
SOCKS5 server for MITM proxy

Enums§

Error
Error types for MITM proxy operations
TargetAddr
SOCKS5 target address

Traits§

RequestInterceptor
Trait for intercepting and modifying HTTP requests
ResponseInterceptor
Trait for intercepting and modifying HTTP responses

Type Aliases§

Result
Result type for MITM operations