Repository navigation
feat: ✨ LLM proxy - #40
Merged
Merged
Conversation
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.
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.
No description provided.