refactor: simplify auth and subscription links
This commit is contained in:
@@ -566,8 +566,8 @@ func RunSettledWithConcurrency[T any](tasks []func() (T, error), concurrency int
|
||||
|
||||
| 任务 | 产出 | 原项目对照 |
|
||||
|------|------|-----------|
|
||||
| `GET /download/collection/:name/:target?/:token?` | `handler/download.go` | `download.ts` |
|
||||
| `GET /download/source/:name/:target?/:token?` | `handler/download.go` | `download.ts` |
|
||||
| `GET /collections/:name/:token` | `handler/download.go` | `download.ts` |
|
||||
| `GET /sources/:name/:token` | `handler/download.go` | `download.ts` |
|
||||
| Download token 验证 (全局 + scoped grant) | `handler/download.go` | `download.ts` rejectInvalidDownloadToken |
|
||||
| Target 推断 (显式 + UA 推断) | `handler/download.go` | `download.ts` getDownloadTarget |
|
||||
| 临时源覆盖 (url/content/ua query) | `handler/download.go` | `download.ts` getTemporarySourceOverride |
|
||||
@@ -720,8 +720,8 @@ func RunSettledWithConcurrency[T any](tasks []func() (T, error), concurrency int
|
||||
|
||||
| 方法 | 路径 | Phase | 说明 |
|
||||
|------|------|-------|------|
|
||||
| GET | `/download/collection/:name/:target?/:token?` | 8 | 下载集合 |
|
||||
| GET | `/download/source/:name/:target?/:token?` | 8 | 下载源 |
|
||||
| GET | `/collections/:name/:token` | 8 | 下载集合 |
|
||||
| GET | `/sources/:name/:token` | 8 | 下载源 |
|
||||
|
||||
### 其他
|
||||
|
||||
@@ -808,7 +808,7 @@ output: YAML with proxies: [{name:"test", type:"ss", ...}]
|
||||
```
|
||||
1. 创建 remote source (url: mock server)
|
||||
2. 创建 collection (sourceIds: [source.id])
|
||||
3. GET /download/collection/:id/mihomo?token=xxx
|
||||
3. GET /collections/:id/xxx?target=mihomo
|
||||
4. 验证 YAML 输出包含正确的 proxy 节点
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user