dsh-downloads
Manifest validDownload queue with aria2 and optional Xunlei engines, magnet links, and a per-session history; aria2 is not bundled and must be installed separately, and the Xunlei engine needs its own SDK and API k
@philomelcc/dsh-downloads
工作台模块:一个真正的下载队列——进度、暂停/继续/取消、磁力链接、Chrome 默认下载接管,以及每个会话下载过什么的记录。
安装
dsh plugin --profile web add @philomelcc/dsh-workbench
dsh plugin --profile web add @philomelcc/dsh-downloads
重启 Web UI,模块会加出下载标签。
引擎
| 来源 | 引擎 |
|---|---|
磁力 / .torrent | aria2(DHT + LPD,--seed-time=0) |
| HTTP / HTTPS | 配了 API Key 时走迅雷 P2SP,否则 aria2 16 连接 |
本包不自带 aria2(GPLv2,5 MB 的二进制)。自己装好后模块会自动找到:
- 环境变量
ARIA2C_PATH指向可执行文件,或 - 缓存副本
~/.dsh/download-center/bin/aria2c[.exe],或 winget install aria2.aria2/scoop install aria2后重启。
没有 aria2 时页面照样能开;磁力会给出可读错误,/wb/downloads/health 会说明原因。
迅雷引擎是可选的,也不是依赖(它带一个需要构建批准的原生模块)。有 API Key 就自己装:
npm i @xunlei-open/dlsdk @xunlei-open/dlsdk-native-windows-x64
凭据放在 ~/.dsh/secrets/xunlei.txt。没装 SDK 时磁力/HTTP 走 aria2,迅雷引擎给出可读错误,不影响页面。
端点
| 方法 | 路径 | 请求体 |
|---|---|---|
| GET | /wb/downloads/list | —(任务 + 统计) |
| GET | /wb/downloads/history | —(会话记录) |
| GET | /wb/downloads/health | —(引擎路径、默认目录) |
| POST | /wb/downloads/create | { url, dir?, fileName?, backend? } |
| POST | /wb/downloads/pause · resume · cancel · remove | { id } |
| POST | /wb/downloads/open | { id, kind: 'file' | 'dir' } |
| POST | /wb/downloads/register | { … } —— 供 fast_download 工具登记 |
所有路由只接受回环访问。
结构
index.js Host:上面的路由
client.js Client:页面 + registerView('downloads')
lib/tasks.js 任务表、状态机、持久化、历史记录
lib/engines.js aria2 / 迅雷子进程引擎与进度解析
lib/xunlei*.mjs 迅雷 worker(独立进程,dll 崩了不带走 host)
chrome-extension/ 可选的 Chrome 默认下载接管扩展
test/ client 侧冒烟测试
MIT。aria2 和迅雷 SDK 保持各自许可。
Comments
Loading…
Similar plugins
by BeiWay1145
DeepSeek Harness plugin: force every large-file download through the local aria2 engine by denying shell download commands at the tool pre-execute hook. 强制下载统一走 aria2 的 DSH 插件。
★ 0
MIT
JavaScript
Sep 17, 2026
dsh plugin --profile web add dsh-download-guardby BeiWay1145
DeepSeek Harness plugin: force every large-file download through the local aria2 engine by denying shell download commands at the tool pre-execute hook. 强制下载统一走 aria2 的 DSH 插件。
★ 0
MIT
JavaScript
Oct 30, 2026
dsh plugin --profile web add dsh-ops-guardby LeiSureYu
DSH 多线程下载插件:内置 aria2,智能探测文件大小自动选择下载策略(Windows x64/arm64、Linux x64/arm64)
★ 6
↓ 1.1k/wk
MIT
TypeScript
Nov 9, 2026
dsh plugin --profile web add @leisureyu/dsh-smart-dlby MorixMa
A download-progress indicator for the DSH session header: it reads the background-job roster and parses what downloaders already print — curl --progress-bar, wget, aria2, or a JSON progress file — int
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add dsh-download-progressby wangtheme-coder
Windows x64 only, 0.5.3 preview: two scoped tools (dragon_browser and dragon_desktop) that drive a visible browser through the DOM or CDP and Windows apps through UI Automation, with per-origin and pe
★ 0
MIT
JavaScript
Oct 22, 2026
dsh plugin --profile web add dsh-dragon-controlA dsh web plugin that wraps the running Harness in a native Windows desktop window: it bundles a Wails v3 desktop client (so installing the plugin is enough), probes the web port and writes the ~/.dsh
★ 1
↓ 430/wk
NOASSERTION
JavaScript
dsh plugin --profile web add @zerorigin-studio/dsh-desktop-shell