aria2
$ aria2c 社区开源 低风险aria2(aria2c)通过分段多连接(-x、-s)加速文件下载,支持 BitTorrent 与 Metalink、断点续传(-c)及可选 JSON-RPC/XML-RPC 接口(--enable-rpc),适合在无头自动化中稳定拉取大体积产物。
brew install aria2 aria2c 直接将数 GB 分段下载流式写入本地磁盘并完成断点续传与校验和验证,无法经由 MCP 服务器中转。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
参数确定性强(-x、-s、-d、-o、--checksum、--show-files)且支持 JSON-RPC,但标准 CLI 默认输出进度文本而非 --json。
- Supports non-interactive batch downloads (
-i urls.txt) and JSON-RPC (--enable-rpc) - CLI progress stdout is unstructured unless silenced (
-q)
支持 --checksum 哈希校验且默认采用 --allow-overwrite=false 避免静默覆盖,但下载落盘需配合 -d/-o 约束路径。
- Built-in
--checksumhash verification and--rpc-secretauth - Refuses silent overwrites unless
--allow-overwrite=trueis passed
原生 C++ 二进制,已收录于 Homebrew、apt、apk、winget 等全平台包管理器。
- Lightweight C++ binary available across all major package managers
在大文件多线程并发、断点续传与多源校验方面显著优于单连接 curl。
- Supports HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink in one binary
成熟的 GPL-2.0 社区项目(aria2/aria2),核心稳定但版本迭代较慢。
- Long-standing
aria2/aria2repository under GPL-2.0
官方手册详尽,并支持按分类检索帮助(如 --help=#<tag>、--help=#http)。
- Manual at aria2.github.io/manual and categorized
--help=#http
安全边界、鉴权与放权指南
可选从 ~/.netrc 或 ~/.aria2/aria2.conf 读取 HTTP/FTP 凭据,并通过 --rpc-secret 保护 RPC 接口。
GPL-2.0 开源 C++ 二进制,完全免费。
# aria2 (aria2c) Agent Rules - Always specify an explicit output directory (`-d`) and filename (`-o`) when downloading. - Use `--checksum=sha-256=<hex>` when verifying downloaded artifacts. - Inspect `.torrent` contents with `--show-files` before starting a transfer.
Agent 高频安全命令配方
只读查询(安全推荐)
aria2c --show-files package.torrent
解析 .torrent 或 .metalink 中的文件索引、大小与 Infohash 元数据后立即退出。
aria2c --help=#http
在本地打印所有 HTTP/HTTPS 传输参数与默认值。
受控写入与预演
aria2c -x 16 -s 16 -c -d /tmp/downloads -o archive.tar.gz https://example.com/archive.tar.gz
启用 16 并发连接与断点续传(-c),将远端归档下载到 /tmp/downloads。
核心优势
- + 分段并发
-x 16 -s 16、断点续传-c与--checksum校验在拉取大文件时优于curl。 - + 无运行时依赖,内存占用极低。
注意事项与踩坑点
- ! 默认标准输出会刷新动态进度条,脚本中建议附加
-q或--summary-interval=0。 - ! 单次下载模式不支持
--json摘要输出(JSON 仅用于 RPC 模式)。