relay-core — zsh
$ cargo install relay-core-cli Installing relay-core-cli v0.3.5... Finished [debug] target 2.3MB 0.42s $ relay-core-cli run --port 8080 > RelayCore v0.3.5 initializing... > Loading configuration from ~/.relay-core/config.toml > Starting HTTP proxy on 0.0.0.0:8080 > MCP server listening on :25519 > REST API available at http://127.0.0.1:3000/api/v1/ > 10,247 flows captured this session ▋
RUST-BASED TRAFFIC INTERCEPTION ENGINE
Zero-copy async runtime. Sub-millisecond overhead.
MITM proxy for HTTP/HTTPS/WebSocket with full programmatic control.
// CAPABILITIES
What RelayCore Does
Full MITM Support
Dynamic TLS certificate generation with automatic CA installation.
WebSocket Interception
Message-level inspection, modification, and replay for WebSocket.
Rule Engine
Match + action pipeline for headers, body, status, redirect, mock.
Scriptable
Deno runtime for dynamic request/response modification.
Interception Breakpoints
Pause live traffic, inspect, modify, then resume or drop.
Prometheus Metrics
Built-in Prometheus text format and JSON metrics endpoint.
// STRUCTURE
Architecture
┌─────────────────────────────────────────────────────┐
│ RELAYCORE ARCHITECTURE │
└─────────────────────────────────────────────────────┘
┌──────────────────────────────────┐
│ ADAPTER LAYER │
│ ┌──────┐ ┌──────┐ ┌────────┐ │
│ │ HTTP │ │ MCP │ │ Tauri │ │
│ │ API │ │Probe │ │Plugin │ │
│ └──────┘ └──────┘ └────────┘ │
└──────────────┬───────────────────┘
│
▼
┌──────────────────────────────┐
│ relay-core-runtime │
│ (State, Events, Rules) │
└──────────────┬───────────────┘
│
┌─────────────────┼─────────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────────┐ ┌──────────────┐
│ lib │ │ storage │ │ script │
│ (engine) │ │ (SQLite) │ │ (Deno/V8) │
└──────────┘ └──────────────┘ └──────────────┘ PUBLIC relay-core-runtime State orchestration, lifecycle, rules
PUBLIC relay-core-http REST + SSE adapter
BETA relay-core-probe MCP adapter for AI agents
BETA relay-core-cli Standalone CLI and TUI
INTERNAL relay-core-lib Core engine: MITM, TLS, proxy
INTERNAL relay-core-storage SQLite persistence
// METRICS
Performance
>10K
req/s
Throughput (S1)
<200
ms
Cold Start
<50
MB
Idle RSS
<5
ms
P99 Latency Add
Metric RelayCore mitmproxy Charles
Language Rust Python Java
Throughput 10K+ req/s ~1K req/s ~2K req/s
Memory (idle) 38MB ~150MB ~300MB
P99 Overhead <5ms ~50ms ~30ms
// REST API
HTTP API
GET http://127.0.0.1:3000/api/v1/flows?limit=10
Response 200 OK
// JSON response
GET /api/v1/flows Search and paginate flows
GET /api/v1/flows/:id Get flow detail
GET /api/v1/rules List all rules
PUT /api/v1/rules Upsert a rule
DELETE /api/v1/rules/:id Delete a rule
POST /api/v1/intercepts Create intercept rule
GET /api/v1/events SSE stream of live updates
GET /api/v1/metrics/prometheus Prometheus format metrics
// COMMAND LINE
CLI Reference
$ relay-core-cli run
> RelayCore v0.3.5 > Proxy listening on 0.0.0.0:8080 > Web UI: http://127.0.0.1:8080/ui > Press Ctrl+C to stop
$ relay-core-cli ca init
> Generating new CA certificate... > CA certificate generated successfully > Path: ~/.relay-core/ca.crt
$ relay-core-cli rules list
ID PRIORITY FILTER ACTION ENABLED ───────────────────────────────────────────────────────────── rul_01 100 method:GET host:*.example.com log true rul_02 90 path:/api/v2/* intercept true
$ relay-core-cli flows --limit 5
TIME METHOD PATH STATUS DURATION ─────────────────────────────────────────────────────────── 10:23:45 GET /users/relaycraft 200 45ms 10:23:42 POST /repos 201 120ms 10:23:38 GET /search?q=relay-core 200 89ms
relay-core-cli run Start proxy server relay-core-cli run --ui Start with TUI interface relay-core-cli ca init CA certificate management relay-core-cli rules list Rule management relay-core-cli flows Query captured flows relay-core-cli metrics View runtime metrics // INSTALL