|
@@ -97,40 +97,6 @@ npm run dev
|
|
|
npm start
|
|
|
```
|
|
|
|
|
|
-## API接口
|
|
|
-
|
|
|
-### 节点管理
|
|
|
-
|
|
|
-- `GET /api/nodes` - 获取节点列表
|
|
|
-- `GET /api/nodes/:id` - 获取节点详情
|
|
|
-- `POST /api/nodes` - 创建节点
|
|
|
-- `PUT /api/nodes/:id` - 更新节点
|
|
|
-- `DELETE /api/nodes/:id` - 删除节点
|
|
|
-
|
|
|
-### 配置导入
|
|
|
-
|
|
|
-- `POST /api/import/clash` - 导入Clash配置
|
|
|
-
|
|
|
-### 订阅管理
|
|
|
-
|
|
|
-- `POST /api/subscription/update` - 手动更新订阅
|
|
|
-- `GET /api/subscription/status` - 获取订阅状态
|
|
|
-
|
|
|
-### 测试管理
|
|
|
-
|
|
|
-- `POST /api/test/manual` - 手动触发测试
|
|
|
-- `GET /api/test/results` - 获取测试结果
|
|
|
-
|
|
|
-### 通知管理
|
|
|
-
|
|
|
-- `GET /api/notifications` - 获取通知列表
|
|
|
-- `POST /api/notifications/test` - 测试通知连接
|
|
|
-
|
|
|
-### 统计信息
|
|
|
-
|
|
|
-- `GET /api/stats` - 获取统计信息
|
|
|
-- `GET /api/status` - 获取系统状态
|
|
|
-
|
|
|
## 使用说明
|
|
|
|
|
|
### 1. 创建Telegram机器人
|
|
@@ -151,47 +117,16 @@ npm run get-chat-id
|
|
|
npm run test-telegram
|
|
|
```
|
|
|
|
|
|
-### 2. 导入Clash配置
|
|
|
-
|
|
|
-```bash
|
|
|
-# 通过API导入
|
|
|
-curl -X POST http://localhost:3000/api/import/clash \
|
|
|
- -H "Content-Type: application/json" \
|
|
|
- -d '{
|
|
|
- "configPath": "/path/to/your/clash/config.yaml"
|
|
|
- }'
|
|
|
-
|
|
|
-# 或通过URL导入
|
|
|
-curl -X POST http://localhost:3000/api/import/clash \
|
|
|
- -H "Content-Type: application/json" \
|
|
|
- -d '{
|
|
|
- "configUrl": "https://example.com/clash-config.yaml"
|
|
|
- }'
|
|
|
-```
|
|
|
-
|
|
|
-### 3. 订阅管理
|
|
|
+### 2. 使用Web界面
|
|
|
|
|
|
-```bash
|
|
|
-# 手动更新订阅
|
|
|
-curl -X POST http://localhost:3000/api/subscription/update
|
|
|
+启动应用后,在浏览器中访问 `http://localhost:3000` 即可使用Web界面进行:
|
|
|
|
|
|
-# 获取订阅状态
|
|
|
-curl -X GET http://localhost:3000/api/subscription/status
|
|
|
-```
|
|
|
-
|
|
|
-### 4. 手动测试
|
|
|
-
|
|
|
-```bash
|
|
|
-# 测试所有节点
|
|
|
-curl -X POST http://localhost:3000/api/test/manual
|
|
|
-
|
|
|
-# 测试指定节点
|
|
|
-curl -X POST http://localhost:3000/api/test/manual \
|
|
|
- -H "Content-Type: application/json" \
|
|
|
- -d '{
|
|
|
- "nodeIds": [1, 2, 3]
|
|
|
- }'
|
|
|
-```
|
|
|
+- 节点管理
|
|
|
+- 配置导入
|
|
|
+- 订阅管理
|
|
|
+- 手动测试
|
|
|
+- 查看测试结果
|
|
|
+- 通知设置
|
|
|
|
|
|
## 项目结构
|
|
|
|