finds.dev← search

// the find

easychen/openai-api-proxy

★ 1,613 · JavaScript · MIT · updated Mar 2024

一行Docker命令部署的 OpenAI/GPT API代理,支持SSE流式返回、腾讯云函数 。Simple proxy for OpenAi api via a one-line docker command

A thin reverse proxy that sits in front of the OpenAI API so clients in regions without direct access can reach it, deployable as a one-line Docker container or a Tencent Cloud function. It's for developers in China who need a quick self-hosted relay for GPT API calls, including SSE streaming, not a general-purpose API gateway.

SSE streaming is actually implemented (not just a stub), forwarding chunked responses correctly instead of buffering the whole completion. It runs anywhere Node 14+ does, so the same app.js works unmodified across plain Node, Docker, and Tencent Cloud functions. Setup is genuinely a single docker run command with no config file, which matches what it claims.

No tests at all, and the core logic lives in a single app.js with a near-duplicate copy under docker/ — any proxy bug fix has to be applied twice by hand. The built-in moderation feature is hard-wired to Tencent Cloud's content moderation API, so it's dead weight for anyone not already in that ecosystem. Last push was March 2024 with no subsequent activity, and the README explicitly states it only proxies GET/POST and skips file-upload endpoints, so anything using the Assistants/Files API is unsupported. PROXY_KEY is just a suffix appended to the OpenAI key string, which is a fragile, easy-to-misconfigure auth scheme rather than a proper header or token check.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →