feat(cli): add edgee relay MITM proxy rerouting inference through the gateway#123
Open
SachaMorard wants to merge 1 commit into
Open
feat(cli): add edgee relay MITM proxy rerouting inference through the gateway#123SachaMorard wants to merge 1 commit into
edgee relay MITM proxy rerouting inference through the gateway#123SachaMorard wants to merge 1 commit into
Conversation
…gh the gateway `edgee relay [agent]` runs a local MITM proxy that logs LLM API traffic and transparently reroutes inference requests (/v1/messages, /v1/responses, /v1/chat/completions, and Codex's /backend-api/codex/responses → /v1/responses) to the Edgee gateway, injecting x-edgee-* auth. Works for launched agents (claude/codex) and external clients (--no-launch, e.g. Claude Desktop). - Reuse hudsucker (MITM) + rcgen (local CA), gated behind the `relay` feature. - Per-agent CA trust via NODE_EXTRA_CA_CERTS (Node) and CODEX_CA_CERTIFICATE (Rust). - Opt-in logging via --log-output <file> (request+response, full bodies, decoded, req↔response correlation ids). - `edgee launch claude --relay` delegates to the relay. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
KokaKiwi
requested changes
Jun 30, 2026
Comment on lines
+42
to
+45
| hudsucker = { version = "0.24", optional = true } | ||
| rcgen = { version = "0.14", optional = true } | ||
| http-body-util = { workspace = true, optional = true } | ||
| bytes = { workspace = true, optional = true } |
Member
There was a problem hiding this comment.
Crates should be declared at the workspace-level then be used with workspace = true on subcrates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
edgee relay [agent]— a local MITM proxy that logs LLM API traffic and reroutes inference requests to the Edgee gateway, giving local visibility into traffic that otherwise goes straight to the gateway (and bypasses the machine).How it works
rcgen), intercepts viahudsucker.x-edgee-api-key/x-edgee-session-id/x-edgee-repo:/v1/messages,/v1/responses,/v1/chat/completions→ same path on gateway/backend-api/codex/responses(Codex ChatGPT backend) → remapped to/v1/responsesUsage
Logging (opt-in via
--log-output <file>)#N) so parallel/interleaved traffic stays readable.CA trust
NODE_EXTRA_CA_CERTS(Node/Claude) andCODEX_CA_CERTIFICATE(Codex/Rust).--no-launch): trust the printed CA in the OS store (per-OS step).Notes
relayfeature (indefault). Build depaws-lc-rsneeds a C toolchain (+ NASM on Windows); can fall back toringif needed.launch's gateway/auth resolution (resolve_gateway_base_url, provider keys).Tests
cargo fmt/clippy/testclean (default +--features relay).🤖 Generated with Claude Code