Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

## 部署与使用教程

> 在现在的Deno的个人面板中,已经移除了“New Project”按钮,由“New App”替代。其URL也发生了变化 [参考这里](#验证部署)

按照以下步骤,轻松部署你自己的 AstrBot GitHub 加速服务:

1. **(可选但推荐)** 给本项目点个 [**Star ⭐**](https://github.com/lxfight/astrbot2github),你的支持是作者更新和维护的动力!
Expand Down Expand Up @@ -64,6 +66,12 @@

如果页面显示 `此地址只用于为astrbot提供更快速的github访问服务` 的信息,则表示你的代理服务已成功部署并正在运行。

在新版本的astrbot中,需要在 **插件市场** 配置插件源,源地址格式:

`https://<App名称>.<组织别名>.deno.net/https://raw.githubusercontent.com/AstrBotDevs/AstrBot_Plugins_Collection/refs/heads/main/plugins.json`

> `https://raw.githubusercontent.com/AstrBotDevs/AstrBot_Plugins_Collection/refs/heads/main/plugins.json`是官方仓库提供的插件列表。

## 注意事项

* **专为 AstrBot 设计**: 本项目主要解决了 AstrBot 在下载插件 `.zip` 包 (`/raw/` 或 `/archive/`) 时可能遇到的网络问题。它针对 AstrBot 的特定请求路径进行了优化,并非一个通用的 GitHub 网站或 API 代理。
Expand Down
9 changes: 4 additions & 5 deletions deno_index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { serve } from "https://deno.land/std@0.155.0/http/server.ts"; // 或更新到最新稳定版,如 @0.224.0

async function handler(req: Request): Promise<Response> {
const incomingUrl = new URL(req.url);
if (incomingUrl.pathname === "/") {
Expand Down Expand Up @@ -72,6 +70,7 @@ async function handler(req: Request): Promise<Response> {
}
}

console.log("此地址只用于帮助astrbot更快的连接github"); // Deno Deploy 会自动使用 $PORT
// 监听端口 8000 (本地) 或 Deno Deploy 指定的端口
serve(handler);
// 使用 Deno 推荐的 Deno.serve 启动服务
// 这种方式能让 Deno Deploy 自动管理端口和健康检查,避免部署失败
Deno.serve(handler);