NotePublic/Software/Applications/Aria2/Aria2_使用说明.md

4.3 KiB
Raw Blame History

layout title subtitle description excerpt date author tags categories published
post Aria2 使用说明 Aria2 是 Linux 下多线程支持端点续传的下载工具,本文主要介绍 Aria2 的基本使用方法。 对 Aria2 的参数进行说明。 2020-01-17 13:42:00 Rick Chan
Applications
Aria2
Software
true

安装

Linux 系统下使用下列命令进行安装:

sudo apt install aria2
sudo pacman -S aria2

基本使用

使用 Aria2 的基本命令格式如下:

aria2c [options] [uri|magnet|torrent file|metalink file]...

参数说明

见下表:

Options Description
-c 断点续传
-d <directory> 修改下载目录
-o <name> 重命名为指定文件名
-s <n> 使用 n 个连接下载文件。如 n 小于需要下载的 URI 数量,那么将使用所有连接,剩余的 URL 将作为候补。
-S <torrnet> 列出种子内容
-x <n> 每个下载中对单个服务器的最大连接数
--conf-path=<config file> 选择 Config 文件(一般为 aria2.conf
--enable-rpc=<true false>
--ftp-user=<user name> 设置 FTP 用户。此设置对所有 URL 有效。
--ftp-passwd=<passwd> 设置 FTP 密码。此设置对所有 URL 有效。
--http-user=<user name> 设置 HTTP 用户。此设置对所有 URL 有效。
--http-passwd=<passwd> 设置 HTTP 密码。此设置对所有 URL 有效。
--max-download-limit=<speedK/M> 单个文件最大下载速率
--max-overall-download-limit=<speedK/M> 团体下载最大速率
--file-allocation=<prealloc none
--rpc-secret=<token> 设置 RPC 访问 Token
--rpc-user=<user name> 设置 RPC 访问用户名
--rpc-passwd=<passwd> 设置 RPC 访问密码
--rpc-listen-port=<port> 设置 RPC 监听端口
--rpc-allow-origin-all=<true false>
--rpc-listen-all=<true false>
--select-file=<n1,n2-n3> 下载种子内编号为n1、n2~n3的文件

RPC Server

Aria2 支持 RPC 服务,当 Aria2 作为该服务启动后,将提供一个 Web 界面用于控制下载项。启动该服务的命令如下:

aria2c --enable-rpc --rpc-allow-origin-all

之后在本机通过浏览器访问 http://aria2c.com/ 即可访问到 Aria2 Web 控制台。该界面也可以访问远端的 Aria2 RPC 服务,前提是远端服务必须提供访问 Token 或 用户名及密码,并使用 rpc-listen-all 参数,此时启动参数如下:

aria2c --enable-rpc --rpc-allow-origin-all --rpc-listen-all --rpc-secret=XXXXXX

aria2c --enable-rpc --rpc-allow-origin-all --rpc-listen-all --rpc-user=user --rpc-passwd=pwd

之后依然通过 http://aria2c.com/ 进行访问,并在设置中修改 JSON-RPC Path 为

http://token:XXXXXX@host:port/jsonrpc

http://user:pwd@host:port/jsonrpc

默认端口为 6800可通过 --rpc-listen-port 参数修改为其他值。Aria2 & YAAW 的更详细使用说明可以参考:http://aria2c.com/usage.html

迅雷离线

参考:https://github.com/binux/ThunderLixianExporter 其他离线参考: https://www.cnblogs.com/RhinoC/p/aria2.htmlhttps://zhuanlan.zhihu.com/p/20563721

Trackerlist

访问:https://github.com/ngosang/trackerslist,获取最新 Trackerlist。