finds.dev← search

// the find

barretlee/cloudflare-proxy

★ 887 · JavaScript · MIT · updated Aug 2023

Cloudflare Worker 代理请求 ChatGPT API,支持 Stream 流式输出

A Cloudflare Worker script that proxies requests to the OpenAI API, letting clients in regions where api.openai.com is blocked route through a custom domain. Deployment is copy-paste into the CF Worker editor. Written in 2023 for a specific access problem, not as a maintained library.

The core idea is sound — Cloudflare Workers are genuinely the right tool for this kind of geo-transparent proxy. Stream passthrough works correctly by forwarding the response body without buffering. MIT license, no dependencies, nothing to install. Fits on a screen.

Last touched August 2023 and the OpenAI API has changed since — model names, endpoint paths, and auth header conventions may need manual fixups. No rate limiting, no auth on the proxy itself, so anyone who discovers your worker URL can use your Cloudflare account as a free relay. Single-file repo with no tests and no error handling beyond what the Worker runtime provides. There are now half a dozen maintained alternatives that do the same thing with more active upkeep.

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 →