diff --git a/README.md b/README.md index fc2e1e4..bcf7eb3 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ ## 部署与使用教程 +> 在现在的Deno的个人面板中,已经移除了“New Project”按钮,由“New App”替代。其URL也发生了变化 [参考这里](#验证部署) + 按照以下步骤,轻松部署你自己的 AstrBot GitHub 加速服务: 1. **(可选但推荐)** 给本项目点个 [**Star ⭐**](https://github.com/lxfight/astrbot2github),你的支持是作者更新和维护的动力! @@ -64,6 +66,12 @@ 如果页面显示 `此地址只用于为astrbot提供更快速的github访问服务` 的信息,则表示你的代理服务已成功部署并正在运行。 +在新版本的astrbot中,需要在 **插件市场** 配置插件源,源地址格式: + +`https://.<组织别名>.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 代理。 diff --git a/deno_index.ts b/deno_index.ts index 2c9aa73..8cdeb8f 100644 --- a/deno_index.ts +++ b/deno_index.ts @@ -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 { const incomingUrl = new URL(req.url); if (incomingUrl.pathname === "/") { @@ -72,6 +70,7 @@ async function handler(req: Request): Promise { } } -console.log("此地址只用于帮助astrbot更快的连接github"); // Deno Deploy 会自动使用 $PORT -// 监听端口 8000 (本地) 或 Deno Deploy 指定的端口 -serve(handler); +// 使用 Deno 推荐的 Deno.serve 启动服务 +// 这种方式能让 Deno Deploy 自动管理端口和健康检查,避免部署失败 +Deno.serve(handler); +