relay-core — zsh
$ relay-core-cli --version relay-core-cli 0.5.2 $ relay-core-cli ca generate CA certificate generated at ~/.relay-core/ca_cert.pem $ relay-core-cli run --listen 127.0.0.1:8080 RelayCore proxy started Proxy 127.0.0.1:8080 Control http://127.0.0.1:8081/ CA cert=~/.relay-core/ca_cert.pem key=~/.relay-core/ca_key.pem ▋
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
PUBLIC relay-core-runtime State orchestration, lifecycle, rules
PUBLIC relay-core-http REST + SSE adapter
PUBLIC relay-core-probe MCP adapter for AI agents
PUBLIC relay-core-cli CLI · TUI · embedded HTTP API
INTERNAL relay-core-api Flow / Rule shared contracts
INTERNAL relay-core-lib MITM · proxy · rule execution
INTERNAL relay-core-script Deno/V8 scripting (optional)
INTERNAL relay-core-storage SQLite persistence (optional)
// 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:8082/api/v1/flows?limit=10
Response 200 OK
{
"flows": [
{
"id": "fld_01HX5K9P3Q8Y2Z7",
"method": "GET",
"path": "/users",
"status": 200,
"duration_ms": 42
}
],
"pagination": {
"total": 12847,
"returned": 10,
"offset": 0
}
} 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 --listen 127.0.0.1:8080
RelayCore proxy started Proxy 127.0.0.1:8080 Control http://127.0.0.1:8081/ TUI run with --ui for interactive mode CA cert=~/.relay-core/ca_cert.pem key=~/.relay-core/ca_key.pem
$ relay-core-cli ca generate
CA certificate generated at ~/.relay-core/ca_cert.pem
$ relay-core-cli rules list
No rules loaded.
$ relay-core-cli metrics
Metric | Value --------------------------|----------- Flows Total | 128 Flows In Memory | 100 Intercepts Pending | 0 Rule Exec Errors | 0
relay-core-cli run Start proxy server relay-core-cli run --ui Start with TUI interface relay-core-cli ca generate CA certificate management relay-core-cli rules list Rule management relay-core-cli run --api-port 8082 Enable REST API relay-core-cli run --upstream http://corp-proxy:8080 Chain through a parent proxy (see Proxy Modes) relay-core-cli analyze --file flows.jsonl Offline analysis of flow dumps relay-core-cli flows --host example.com Search flows (requires --api-port) // INSTALL