Run OpenAI, Anthropic, and Gemini-compatible clients through one gateway. GPROXY handles provider routing, protocol conversion, credentials, quotas, and observability, with an embedded console for day-to-day administration. Deploy it as a native binary, a Docker container, or a serverless edge function.
English · 简体中文
- 🪪 License: AGPL-3.0-or-later · 🐳 Image:
ghcr.io/leenhawk/gproxy - 🦀 Targets: native binary · Docker · edge wasm (Cloudflare / Deno / Netlify)
- 🖥️ Console: built in, served at
/console
GPROXY gives your applications one stable API while letting you choose and combine upstream providers behind it:
- Multi-provider routing — OpenAI, Anthropic, Gemini/Vertex, DeepSeek, Groq, OpenRouter, NVIDIA, Vercel AI Gateway, Claude Code, Codex, Grok Build, and any OpenAI-compatible custom endpoint.
- Two routing modes — aggregated
/v1/...(provider in the model name) and scoped/{provider}/v1/...(provider in the URL). - Cross-protocol translation — an OpenAI client can use a Claude or Gemini upstream, and responses are converted back to the format the client expects.
- Multi-tenant auth — users, API keys, glob model permissions, RPM/RPD/token rate limits, and USD quotas.
- Prompt and request controls — Claude and OpenAI cache breakpoints, reusable rewrite rules, credential failover, and circuit breakers.
- Pluggable storage — SQLite / PostgreSQL / MySQL, optional at-rest encryption.
- Embedded console — no separate frontend to deploy.
Fully self-contained: embedded console, local file storage, no external services.
docker run -p 8787:8787 -e GPROXY_ADMIN_PASSWORD=change-me ghcr.io/leenhawk/gproxy
# then open http://localhost:8787/console (admin / change-me)Set your own admin password before exposing the service. The container refuses to start when
GPROXY_ADMIN_PASSWORDis empty or contains only whitespace.Plain HTTP console access works for same-origin deployments, including LAN IPs, server IPs, and tunnels. Use HTTPS when exposing GPROXY beyond local development; cross-site console deployments still require HTTPS cookies.
Prebuilt bundles for three edge platforms live on the
deploy branch, so you do
not need a Rust toolchain to deploy them. Edge deployments use Turso for
persistent configuration and can optionally use Upstash for shared caching.
See the edge deployment guide
for platform-specific setup.
The Cloudflare and Netlify buttons prompt for the required TURSO_URL and
TURSO_TOKEN secrets before deployment. Use Turso's HTTP URL
(https://<db>.turso.io), not the libsql:// URL. Optional Upstash cache and
GPROXY_MASTER_KEY secrets can be added after the worker/site is created.
Cloudflare Workers, Netlify Edge, and Deno Deploy also ship the
Console assets in the same deployment. Set GPROXY_ADMIN_USER and a non-blank
GPROXY_ADMIN_PASSWORD, then open /console after deploy.
| Platform | Bundle | Deploy |
|---|---|---|
| Cloudflare Workers | deploy/cloudflare |
Deploy button or wrangler deploy |
| Netlify Edge | deploy/netlify |
Deploy button or netlify deploy --prod |
| Deno Deploy | — | deploy/deno/build.sh (CLI) |
Start with the download page or the latest GitHub Release. Releases include Android APK, Windows MSI, macOS DMG, Linux DEB, and portable ZIP builds. Linux GNU and musl builds support x86_64, AArch64, and RISC-V 64; both Docker image families publish the same three architectures. Installed desktop builds ask for an administrator username, password, and login-startup preference on first run. The launcher does not save the plaintext password; GPROXY stores its Argon2id hash for future logins. Automatic startup can be changed later in Console Settings. The APK provides the same startup switch and guides users through Android's background-operation permission. Console self-update selects the matching GNU, musl, or Android architecture; APK updates are verified before Android's system installer asks for approval.
If you only want to use GPROXY, download a prebuilt package. Do not clone and compile the repository unless you are developing GPROXY or need a custom build.
Environment variables configure the process itself. Providers, credentials,
routes, users, and other live settings are stored in the database and managed
through /console.
| Variable | Default | Purpose |
|---|---|---|
GPROXY_HOST / GPROXY_PORT |
127.0.0.1 / 8787 |
bind address |
GPROXY_PERSISTENCE |
binary: db; Docker: file |
db uses SQLite/PostgreSQL/MySQL; file stores JSON files and is single-instance only |
GPROXY_DSN |
generated SQLite DSN | Optional PostgreSQL/MySQL/SQLite DSN when persistence=db |
GPROXY_MASTER_KEY |
— | unseal stored secrets (absent = plaintext) |
GPROXY_ADMIN_USER / GPROXY_ADMIN_PASSWORD |
admin / random |
first-boot admin |
Upgrading from v1? Point v2 at the existing SQLite database. On first boot,
GPROXY imports the supported configuration and keeps the old database as a
*.v1.bak backup.
# Aggregated — provider/model in the body
curl http://127.0.0.1:8787/v1/chat/completions \
-H "Authorization: Bearer <your-key>" -H "Content-Type: application/json" \
-d '{"model":"openai-main/gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}]}'Ops endpoints (/healthz, /version, /metrics) are admin-gated.
If GPROXY is useful to you, you can support its continued development through GitHub Sponsors.
AGPL-3.0-or-later · Author: LeenHawk