Skip to content

feat: ✨ LLM proxy - #40

Merged
tmeckel merged 6 commits into
masterfrom
feat/llm-proxy
Nov 24, 2026
Merged

tmeckel merged 6 commits into
masterfrom
feat/llm-proxy

Conversation

@tmeckel

@tmeckel tmeckel commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Introduce llm-proxy, a localhost reverse/forward proxy written in Rust that
terminates client TLS over plain HTTP and opens classical single-packet TLS
1.3 ClientHello messages upstream. Azure's front-end resets multi-segment
ClientHello messages carrying X25519MLKEM768 key shares, so the proxy uses
rustls with the ring provider (no post-quantum groups) and prioritizes
SECP384R1 to keep ClientHello small and avoid HelloRetryRequest.

The Dockerfile builds llm-proxy in a multi-stage build and copies the binary
into the Bun image. The entrypoint starts llm-proxy, forces HTTP(S)_PROXY to
point at it, and enforces NO_PROXY for localhost traffic. Optionally logs
every LLM call and token usage as JSONL via LLM_LOG_FILE.
…logging

Intercept CONNECT traffic for configured host suffixes and terminate TLS to control upstream cipher negotiation. Add configurable log levels and sinks, syslog support, TLS certificate dependencies, and a size-optimized release profile.
Allow disabling llm-proxy at container startup and rename its listen and upstream proxy settings to use the `LLM_PROXY_` prefix.
Pin the Rust proxy build to Cargo.lock, install its MITM CA during image creation, and remove build caches before finalizing the runtime image.
@tmeckel
tmeckel merged commit 13d1ce2 into master Nov 24, 2026
1 check passed
@tmeckel
tmeckel deleted the feat/llm-proxy branch November 24, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant