# aria2c配置

几个终端下载工具。可能就只有aria2配置稍微比较麻烦一点了。

配置文件一般放在\~/.config/aria2/aria2.conf

```
# 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置
dir=/data/data/com.termux/files/home/storage/downloads

# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
disk-cache=32M

# 忽略证书检查
check-certificate=false

# 断点续传
continue=true

# 同一服务器连接数, 添加时可指定, 默认:1
max-connection-per-server=16

# 单个任务最大线程数, 添加时可指定, 默认:5
split=16

# 当种子的分享率达到这个数时, 自动停止做种, 0为一直做种, 默认:1.0
seed-ratio=0

# 打开DHT功能, PT需要禁用, 默认:true
enable-dht=true

# 单个种子最大连接数, 默认:55
bt-max-peers=100

# bt-tracklist,请自行更新
bt-tracker=xxxx
```

自动更新tracker脚本：

```
#!/data/data/com.termux/files/usr/bin/bash

list=`wget -qO- https://www.zsxwz.com/arch/trackers.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
sed -i "s@bt-tracker.*@bt-tracker=$list@g" $HOME/.config/aria2/aria2.conf
```

```
# 启动
nohup aria2c --enable-rpc --rpc-listen-all &
```

aria2c 管理面板可以参考使用：[aria2管理面板](https://zsxwz.com/2019/05/18/%e5%ae%89%e5%8d%93%e6%89%8b%e6%9c%ba%e9%85%8d%e7%bd%aearia2%e9%ab%98%e9%80%9f%e4%b8%8b%e8%bd%bd%e6%9c%8d%e5%8a%a1/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://termux-wiki.zsxwz.com/xia-zai-gong-ju/aria2c-pei-zhi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
