Skip to content

🌐 A lightweight proxy forwarder based on Deno, suitable for breaking through geographical restrictions. 🌐 基于 Deno ηš„θ½»ι‡ηΊ§δ»£η†θ½¬ε‘ε™¨οΌŒι€‚η”¨δΊŽηͺη ΄εœ°η†ι™εˆΆγ€‚

License

Notifications You must be signed in to change notification settings

captainLegoo/deno-proxy-forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Deno Proxy Forwarder

A lightweight HTTP proxy forwarder powered by Deno Deploy. Automatically parses the destination host from the URL and forwards the request.

πŸ“– δΈ­ζ–‡ζ–‡ζ‘£οΌˆδΈ­ζ–‡θ―΄ζ˜ŽοΌ‰


πŸš€ Deploy to Deno Deploy

To deploy this project to Deno Deploy:

  1. Fork this repository to your own GitHub account:

    Click the top-right β€œFork” button on this page.

  2. Go to Deno Deploy dashboard

  3. Click "Deploy your own code"

  4. Select your GitHub account and choose the forked deno-proxy-forwarder repo

  5. Configure the deployment:

    • Build mode: No build step
    • Entry point: main.ts
  6. Click "Create & Deploy"

βœ… After deployment, you’ll get a public proxy URL, like: https://your-proxy.deno.dev


🧠 How to Use

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.


πŸ” Security Advice

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 });
}

About

🌐 A lightweight proxy forwarder based on Deno, suitable for breaking through geographical restrictions. 🌐 基于 Deno ηš„θ½»ι‡ηΊ§δ»£η†θ½¬ε‘ε™¨οΌŒι€‚η”¨δΊŽηͺη ΄εœ°η†ι™εˆΆγ€‚

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published