English | 中文
A simple API proxy service built with Nitro framework. It forwards HTTP requests to configured target APIs based on request paths.
Note: Please be aware of Vercel's free plan usage limits. Public deployment is not recommended to prevent abuse.
This is a simple reverse proxy that:
- Takes HTTP requests on specific paths (e.g.,
/openai/**) - Forwards them to configured target servers (e.g.,
https://api.openai.com) - Returns the response back to the client
- Removes client IP headers for basic privacy
It's useful for:
- Bypassing CORS restrictions in web applications
- Hiding API endpoints behind a single domain
- Adding a simple layer between clients and APIs
- Request Forwarding: Forwards HTTP requests including headers, body, and query parameters
- Privacy Protection: Removes client IP headers (
x-forwarded-for,x-real-ip) from forwarded requests - Environment Configuration: Configure proxy targets via environment variables
- Optional Dashboard: Simple web interface to view configured endpoints
- Lightweight: Minimal dependencies, built with Nitro framework
Configure proxy targets using the pattern PROXY_{NAME}_TARGET:
# Basic proxy configurationsPROXY_GEMINI_TARGET=https://generativelanguage.googleapis.comPROXY_OPENAI_TARGET=https://api.openai.comPROXY_ANTHROPIC_TARGET=https://api.anthropic.com# Optional: Enable homepage dashboardHOMEPAGE_ENABLE=true| Endpoint Path | Target URL | Environment Variable | Description |
|---|---|---|---|
/gemini/** | https://generativelanguage.googleapis.com | PROXY_GEMINI_TARGET=https://generativelanguage.googleapis.com | Google Gemini API |
/openai/** | https://api.openai.com | PROXY_OPENAI_TARGET=https://api.openai.com | OpenAI API |
/anthropic/** | https://api.anthropic.com | PROXY_ANTHROPIC_TARGET=https://api.anthropic.com | Anthropic API |
To add a new proxy endpoint, simply add an environment variable following the naming pattern:
# Forward /myapi/** requests to https://api.example.comPROXY_MYAPI_TARGET=https://api.example.com# Forward /v1/chat/** requests to https://chat.example.comPROXY_V1_CHAT_TARGET=https://chat.example.comThe service will automatically:
- Convert
PROXY_MYAPI_TARGETto route/myapi/** - Convert
PROXY_V1_CHAT_TARGETto route/v1/chat/**
When HOMEPAGE_ENABLE=true, accessing the root URL shows:
- List of configured proxy endpoints
- Target URLs for each endpoint
- Copy buttons for quick URL copying
This project is licensed under the MIT License - see the LICENSE file for details.