A transparent HTTPS proxy that sits between your app and OpenAI, Anthropic, Gemini, Mistral or Groq. Caches identical queries, strips PII, trims chat history — locally, with sub-millisecond overhead. Zero code changes.
curl -fsSL https://raw.githubusercontent.com/anonymmized/FluxGate/main/install.sh | bash
Drag the sliders to estimate your monthly savings. Real numbers depend on your traffic — duplicate requests and long chat histories save the most.
FluxGate is a local HTTPS proxy. Your app talks to FluxGate; FluxGate optimises the request and forwards it to the real provider over a fresh, verified TLS connection.
Watch the savings live in the terminal, or open the web dashboard at http://127.0.0.1:9090/.
Built in C++20 on Asio. Thousands of concurrent sessions, per-session strand model, sub-millisecond overhead on a cache hit.
Identical queries return instantly from memory — no API call, no cost. Keys are normalized (sorted JSON, whitespace-insensitive) so reordered requests still hit. LRU + TTL, with an optional Redis backend.
Keeps only the last N messages in the context window. Cuts input token count on long conversations — often the biggest line on the bill.
Strips emails, phone numbers, credit cards, IP addresses and API-key-shaped secrets before they leave your network — plus your own custom regex rules. Toggle live.
MITM only the providers you choose; everything else tunnels through untouched. Defaults cover OpenAI, Anthropic, Gemini, Mistral, Groq.
A web control panel at :9090/ and a terminal TUI — live sparklines, and tabs for an Overview, Requests, Providers and Settings. Tune filters, cache TTL and limits without a restart.
A rolling log of every intercepted request — host, method, path, model, cache hit/miss, status, latency and tokens saved. Never logs body content.
Cost saved, hit rate, average latency and traffic broken down by provider and model — with provider-aware pricing instead of a flat rate.
Per-client token-bucket limits (requests/min + burst) to stop runaway costs, plus a monthly budget reference that surfaces a dashboard alert.
Single static binary, Docker image, systemd unit. Runs on Linux and macOS, on-prem or as a sidecar container.
NDJSON logs with request ID, host, method, path and upstream latency. Never logs body content. Pipes cleanly into Datadog, Splunk, or grep.
GET /metrics exposes every counter in Prometheus text format. Drop straight into your existing Grafana dashboards.
All settings in one fluxgate.toml. Generate it with the wizard or --dump-config; override any value from the command line.
Pick your path. The script and wizard handle the CA and config for you; Docker and source builds are one command each.
Trusting the CA system-wide may prompt for sudo. The installer prints the exact command if it can't do it automatically.
Inside a container the proxy must bind 0.0.0.0 — otherwise Docker's published ports can't reach it. docker compose up -d does all of this for you. To verify upstream certs without -k, mount and trust ./certs/ca.cert.pem in the calling environment.
Requires C++20, CMake ≥ 3.15 and OpenSSL. asio, simdjson and toml++ are fetched automatically. Redis backend: add -DFLUXGATE_REDIS=ON.
FluxGate is free and open-source. Enterprise support is available for teams that need SLAs, custom filters, or managed deployment.
Content-Type: text/event-stream).openai, anthropic), Node.js, Go, Ruby, Java, curl, and more. See examples/ for ready-to-run code.cache.backend = "redis") so all instances share one cache. Each instance is otherwise stateless.