{"id":26804428,"url":"https://github.com/pwh-pwh/denoproxy","last_synced_at":"2025-08-03T14:33:36.165Z","repository":{"id":277304507,"uuid":"931973779","full_name":"pwh-pwh/DenoProxy","owner":"pwh-pwh","description":"利用Deno提供的服务进行代理中转","archived":false,"fork":false,"pushed_at":"2025-02-13T07:37:50.000Z","size":4,"stargazers_count":34,"open_issues_count":0,"forks_count":18,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T22:16:36.926Z","etag":null,"topics":["deno","proxy-server"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pwh-pwh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-13T06:45:12.000Z","updated_at":"2025-03-28T02:51:02.000Z","dependencies_parsed_at":"2025-02-13T08:42:30.644Z","dependency_job_id":null,"html_url":"https://github.com/pwh-pwh/DenoProxy","commit_stats":null,"previous_names":["pwh-pwh/denoproxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2FDenoProxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2FDenoProxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2FDenoProxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pwh-pwh%2FDenoProxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pwh-pwh","download_url":"https://codeload.github.com/pwh-pwh/DenoProxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372947,"owners_count":21419722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","proxy-server"],"created_at":"2025-03-29T22:16:41.879Z","updated_at":"2025-04-23T04:51:15.503Z","avatar_url":"https://github.com/pwh-pwh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 Deno Proxy\n\n欢迎使用 **Deno Proxy**！🚀  \n这是一个轻量级的代理服务应用，使用 **Deno** 构建，旨在将请求转发到指定的目标 URL。无论您需要通过代理访问网站，还是转发 API 请求，**Deno Proxy** 都能满足您的需求！\n\n## 📦 特性\n\n- **代理请求**: 将以 `/proxy` 开头的请求转发到指定的目标 URL。\n- **设置代理 URL**: 使用简单的 `?setUrl=TARGET_URL` 查询参数轻松设置或更改代理目标 URL。\n- **动态代理目标**: 使用 `/proxy` 端点设置活动的代理目标。\n\n## 🚀 快速开始\n\n### 1. 克隆项目\n\n通过以下命令克隆仓库并进入项目目录：\n\n```bash\ngit clone https://github.com/pwh-pwh/DenoProxy.git\ncd deno-proxy\n```\n\n### 2. 运行代理服务器\n\n确保已安装 **Deno**。如果没有安装，可以从 [deno.land](https://deno.land/) 获取并安装。  \n然后，使用以下命令运行代理服务器：\n\n```bash\ndeno run --allow-net --unstable proxy.ts\n```\n\n此命令会启动代理服务器并监听 `8000` 端口。\n\n### 3. 部署应用\n\n有两种方式实现部署\n\n1. 安装deno部署工具 deployctl `deno install -A jsr:@deno/deployctl --global` 项目目录执行 `deployctl deploy\n`\n2. fork本项目，进入deno控制台 https://dash.deno.com/ 进行部署操作\n\n### 4. 使用代理服务器\n\n#### 🌍 设置代理 URL\n\n要设置代理目标，您需要将有效的 URL 传递给 `setUrl` 参数：\n\n```bash\nhttp://localhost:8000/?setUrl=https://example.com\n```\n\n#### 🔄 使用代理\n\n设置代理后，只需访问任何以 `/proxy` 开头的路径，请求将会转发到指定的目标 URL。\n\n例如：\n\n```bash\nhttp://localhost:8000/proxy/some/path\n```\n\n此请求将会被转发到 `https://example.com/some/path`，并返回目标网站的响应！\n\n## 📚 API 参考\n\n### 1. `?setUrl=TARGET_URL`\n\n使用此端点来设置或更改代理目标 URL。所有访问 `/proxy` 的请求都会转发到此 URL。\n\n**示例**：\n```bash\nhttp://localhost:8000/?setUrl=https://example.com\n```\n\n### 2. `/proxy` 路径\n\n访问以 `/proxy` 开头的路径的请求将会转发到设置的目标 URL。\n\n**示例**：\n```bash\nhttp://localhost:8000/proxy/some/path\n```\n\n这将会把请求转发到目标 URL，并返回响应。\n\n## 📁 项目结构\n\n```\ndeno-proxy/\n├── main.ts          # 代理服务器代码\n├── README.md         # 这份超棒的文档！\n└── ...\n```\n\n## 🛠️ 使用的技术\n\n- **Deno**: 一个用于 JavaScript 和 TypeScript 的安全运行时。\n- **HTTP 服务器**: Deno 的原生 HTTP 服务器处理请求。\n\n## 🔑 权限\n\n服务器需要以下权限：\n\n- **`--allow-net`**: 允许网络访问（用于转发请求）。\n- **`--unstable`**: 启用不稳定的 Deno API（用于使用 `Deno.openKv()`）。\n\n## 🤝 贡献\n\n欢迎随时 fork 本仓库、提交问题或 Pull Request。您的贡献是我们不断改进的动力！\n\n## 📜 许可证\n\n本项目使用 [MIT 许可证](LICENSE) 进行授权。\n\n---\n\n### 🖼️ 预览\n\n一旦您运行了服务器，下面是如何操作的预览：\n\n1. **设置代理 URL**：\n\n   在浏览器中输入以下 URL 来设置目标 URL：\n\n   ![Set Proxy URL](https://img.shields.io/badge/Set_Proxy_URL-https%3A%2F%2Fexample.com-brightgreen?style=for-the-badge)\n\n2. **使用代理**：\n\n   然后，简单地调用 `/proxy` 端点：\n\n   ![Proxy Request](https://img.shields.io/badge/Use_Proxy-%2Fproxy%2Fsome%2Fpath-blue?style=for-the-badge)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwh-pwh%2Fdenoproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpwh-pwh%2Fdenoproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpwh-pwh%2Fdenoproxy/lists"}