Skip to content

Ten-o/api_gateway_worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

API Hub

一个强大的 API 代理服务集合

演示站点GitHub

🚀 快速开始

标准版本

部署完整功能的 API Hub

Deploy to Cloudflare Workers

优化版本

禁止亚太区域作为出口

Deploy to Cloudflare Workers (Exclude Asia Pacific)

  1. 点击上方按钮
  2. 登录你的 Cloudflare 账号
  3. 等待自动部署完成
  4. 访问分配的 Workers 域名即可使用

手动部署

如果一键部署不成功,可以尝试以下方式:

  1. 登录 Cloudflare Dashboard
  2. 进入 Workers & Pages
  3. 创建新的 Worker
  4. 复制 src/worker.js 中的代码到 Worker 编辑器
  5. 点击 "Save and Deploy"

本地部署

# 克隆项目
git clone https://github.com/Ten-o/api_gateway_worker.git
cd api_gateway_worker

# 部署
node src/deploy

⚡ 功能特性

AI API 代理服务

  • OpenAI API (/openai/*)
  • Google Gemini API (/gemini/*)
  • Claude API (/claude/*)
  • Grok API (/grok/*)

其他服务

  • Docker Registry (/docker/*)
  • GitHub API (/github/*)
  • Telegram Bot API (/telegram/*)

核心优势

  • 统一入口 统一管理
  • 简单易用的配置方式
  • 优雅的 Web UI 界面
  • 支持跨域请求(CORS)
  • 保持原始 API 的请求格式

🔧 配置说明

src/worker.js 中配置各个 API 服务:

const API_CONFIGS = {
  "服务名称": {
    host: "api.example.com",
    paths: ["/v1/"],
    description: "服务描述",
    logo: "📦"
  }
}

📦 项目结构

.
├── src/
│   ├── worker.js      # cf worker 部署
│   ├── server.js      # 服务器部署
│   └── ...
├── package.json
└── README.md

🤝 参与贡献

欢迎提交 Issue 和 Pull Request 来帮助改进项目。

📬 联系方式

About

Workers 反代

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors