Skip to content
rosxnbPublic

About

DeepSeer is a MITM proxy capable of deep packet analysis (DPI).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

DeepSeer

DeepSeer is a MITM proxy with deep packet inspection (DPI) capabilities. It intercepts HTTP and HTTPS traffic, inspects requests/responses, and forwards them transparently. For HTTPS, it performs TLS interception by dynamically generating per-host certificates signed by a local CA. It is also has Seer capabilities. To active the Seer capabilities, refer to this document.

Prerequisites

  • C++23 compiler (Clang 18+ or GCC 15+)
  • CMake 4.3+
  • Ninja
  • OpenSSL 3.0+

Dependencies fetched automatically via CMake FetchContent:

Build

# Configure and build
cmake --preset <preset>
cmake --build --preset <preset>

# Debug build
cmake --preset debug
cmake --build --preset debug

Build presets

Preset Description
debug Debug build with tests enabled
release Optimized release build, no tests
relwithdebinfo Release with debug symbols
asan AddressSanitizer + UBSan
tsan ThreadSanitizer

Run

HTTP-only (no TLS interception)

./build/debug/bin/DeepSeer

HTTPS CONNECT requests are tunneled as opaque TCP — the proxy cannot inspect the encrypted traffic.

With TLS interception (MITM)

Generate a local CA certificate:

./tools/gen_ca.sh <out-dir>

This creates ca.crt and ca.key in the output directory. Trust the CA on your system so browsers/curl accept the forged certificates:

# macOS
sudo security add-trusted-cert -d -r trustRoot \
    -k /Library/Keychains/System.keychain ca.crt

# Linux (Debian/Ubuntu)
sudo cp ca.crt /usr/local/share/ca-certificates/deepseer-ca.crt
sudo update-ca-certificates

Start the proxy with the CA:

./build/debug/bin/DeepSeer --ca-cert ca.crt --ca-key ca.key

CLI options

Flag Description Default
--port N Listen port 8080
--ca-cert Path to CA certificate PEM (none)
--ca-key Path to CA private key PEM (none)
--version Print version and exit

Testing with curl

# HTTP proxy
curl -v http://example.com --proxy "127.0.0.1:8080"

# HTTPS with MITM (requires CA trust or --cacert)
curl -v https://httpbin.org/get --proxy "127.0.0.1:8080"
curl -v https://example.com --proxy "127.0.0.1:8080" --cacert ca.crt

# HTTPS tunnel (no MITM, when CA not provided)
curl -v https://example.com --proxy "127.0.0.1:8080"

Stop the server with Ctrl+C (SIGINT) or SIGTERM.

Test

# Run all tests
ctest --preset debug

# Run a specific test binary
./build/debug/bin/TestConnection
./build/debug/bin/TestEventLoop
./build/debug/bin/TestBuffer
./build/debug/bin/TestLogger
./build/debug/bin/TestHttp1Codec

Project structure

DeepSeerLib/        Proxy Library
Seer/               AI inference library (Magika content classifier, see seer/README.md)
tools/              Helper scripts (gen_ca.sh, extract_magika_weights.py)
models/             Model weights (gitignored, see Seer/README.md for setup)
docs/               Research reference documents

About

DeepSeer is a MITM proxy capable of deep packet analysis (DPI).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages