A lightweight HTTP proxy forwarder powered by Deno Deploy. Automatically parses the destination host from the URL and forwards the request.
To deploy this project to Deno Deploy:
-
Fork this repository to your own GitHub account:
Click the top-right βForkβ button on this page.
-
Go to Deno Deploy dashboard
-
Click "Deploy your own code"
-
Select your GitHub account and choose the forked
deno-proxy-forwarder
repo -
Configure the deployment:
- Build mode:
No build step
- Entry point:
main.ts
- Build mode:
-
Click "Create & Deploy"
β
After deployment, youβll get a public proxy URL, like: https://your-proxy.deno.dev
Example:
https://your-proxy.deno.dev/api.openai.com/v1/chat/completions β https://api.openai.com/v1/chat/completions
It automatically extracts the host from the path and proxies your request.
You can restrict target domains by adding a whitelist in main.ts
:
const WHITELIST = ["api.openai.com", "api.github.com"];
if (!WHITELIST.includes(hostname)) {
return new Response("Unauthorized target", { status: 403 });
}