A lightweight, zero-dependency reverse proxy in Go that queues incoming requests in-memory to prevent rate-limit failures, logs requests to SQLite, and injects customized headers or API keys dynamically.
Understand how adding this proxy centralizes controls, improves resiliency, and simplifies multi-app deployments.
Remove upstream API keys (e.g. OpenAI, Anthropic) from client code. Configure downstream clients to send virtual API keys, and map them to secret upstream keys centrally on the proxy server.
Upgrade model versions (e.g., swapping `gpt-3.5-turbo` with `gpt-4o-mini`) centrally. The proxy intercepts requests and dynamically modifies the URL paths and payload body parameters on the fly.
Bypass restrictions enforced by upstream firewalls or gateways. Spoof official SDK client signatures (e.g., custom User-Agents) and inject security context headers globally.
Rather than failing downline applications with hard `429 Too Many Requests` errors, the proxy buffers and queues requests in-memory, releasing them gradually to fit upstream rate limits.
Keep a comprehensive audit log of prompt bodies, response text, costs, latencies, and HTTP status codes in a local SQLite database without embedding telemetry code into client applications.
Built purely in Go with zero dependencies. Runs natively, inside containers (Docker/Podman), or as a systemd service, requiring tiny resources (under 15MB RAM).
Adjust variables to see changes in real-time. Copy the generated terminal commands or configuration scripts instantly.
Loading...
The proxy automatically saves request and response bodies asynchronously. This lets you write simple SQL scripts directly on the `gatepass.db` file to review usage patterns or monitor errors.
No libraries, cloud SaaS dependencies, or complex setup needed.
Spin up the proxy on your server, desktop, or cloud instances using your preferred environment model.
Download the source code and compile the Go project into a single, compact binary.
Provide environment parameters and start the compiled executable binary.
Generate a secure, lightweight, multi-stage image using the project's Dockerfile.
Mount the SQLite directory and run the proxy in detached mode.
Write a systemd configuration file inside `/etc/systemd/system/gatepass.service`:
Reload systemd configurations and launch the background daemon service.
Write a container service definition file inside `/etc/containers/systemd/gatepass.container` (or `~/.config/...` for rootless running):
Launch the service using standard user systemctl controls.