首页 购买软件

aria2更详细配置介绍请访问

# 更详细配置介绍请访问 https://aria2.github.io/manual/en/html/
# 全局代理
#all-proxy=http://127.0.0.1:1080/pac?auth=
# 代理请求方式,可用值 get, tunnel ,HTTPS 下载时一直使用 tunnel
#proxy-method=tunnel
# 不代理的主机名,域名和IP
#no-proxy=<DOMAINS>

# rpc
# 用户名
#rpc-user=user
# 密码
#rpc-passwd=passwd
# token验证(个人建议使用 token,ssl 自签证书没意义)
# 值可以为:我就是叫紫妈怎么了?有本事突然从我背后出现,把我的脸按在键盘上3sw4yde5uf6tgyhujikpo
rpc-secret=3sw4yde5uf6tgyhujikpo
# 允许rpc ,默认 false
enable-rpc=true
# 允许所有来源, web 界面跨域权限需要,默认 false
rpc-allow-origin-all=true
# 外部访问,默认 false
rpc-listen-all=true
# https加密,启用之后要设置公钥,私钥的文件路径
#rpc-secure=true
# 加密设置公钥
#rpc-certificate=example.crt
# 加密设置私钥
#rpc-private-key=example.key
# rpc端口,默认 6800
#rpc-listen-port=6800

# 下载
# 关闭 ipv6 ,默认 false
#disable-ipv6=true
# 最大同时下载数, 默认 5
#max-concurrent-downloads=3
# 断点续传,只在 HTTP(S) 和 FTP 中生效
continue=true
# HTTP 返回 503 时重试下载的秒数,0 为不重试下载,默认为 0
retry-wait=10
# 最大重试次数,0 为无限制,默认为 5
max-tries=0
#服务器返回文件找不到最大重试次数, 0 为一直重试,默认为 0
max-file-not-found=10
# 同服务器最大连接数,默认 1(好像不能使用过大的值,窝用20无法打开aria2)
max-connection-per-server=10
# 最小文件分段大小, 默认 20M
# 如果文件大小 < (min-split-size * split)则不分段
min-split-size=1M
# 单文件最大线程数, 默认 5
split=5

#referer ,这里由下载管理器调用
#如果为 * ,下载 URI 也可以是 referer ,这在开启 parameterized-uri 时很有用
#referer=<REFERER>
#参数化URI, balabala 不懂,默认 false
#Enable parameterized URI support. You can specify set of parts: http://{sv1,sv2,sv3}/foo.iso. Also you can specify numeric sequences with step counter: http://host/image[000-100:2].img. A step counter can be omitted. If all URIs do not point to the same file, such as the second example above, -Z option is required. Default: false
#parameterized-uri=true

# 全局下载速度限制
# 0为不受限制,默认为0,大小为 bytes/sec ,也可以使用 K 或 M,下同
#max-overall-download-limit=0
# 单文件下载速度限制
#max-download-limit=0
# 全局上传速度限制
#max-overall-upload-limit=100K
# 单文件上传速度限制
#max-upload-limit=0
# 断开速度过慢的连接,在 BT 中不生效
#lowest-speed-limit=0

# 文件保存路径,这里由下载管理器调用,默认为 Aria2 所在文件夹
#dir=
# 文件缓存,缓存到内存里,大小使用 K 或 M ,为 0 时关闭,默认 16M
disk-cache=64M
# 将文件映射到内存,如果文件没有预分配不能工作,默认 false
enable-mmap=true
# 映射内存文件大小最大限制
# 文件大小由一次下载中的全部文件决定,如果总大小大于设定值则禁用mmap
# 默认9223372036854775807 (单位有点迷)
max-mmap-limit=1280M
# 文件预分配
# 可用值 none, prealloc, trunc, falloc ,默认 prealloc
# 当使用新型文件系统,如 ext4, btrfs, xfs 或者 NTFS 文件系统时,推荐使用 falloc ,这种方式会在瞬间完成大文件(数 GB )的空间分配
# 不要在传统文件系统,如 ext3, FAT32 上使用 falloc ,因为这和使用 prealloc 所需的时间大同
# falloc 和 trunc 需要文件系统和内核支持
# 警告:使用 trunc 灰常快,但它其实是在文件系统中设置文件长度元数据,并不是分配磁盘空间,所以无法避免磁盘碎片化
# 简单来说开启文件预分配后,如果支持使用 falloc 就使用 falloc ,不支持就用 prealloc ,固态硬盘可以使用 trunc
# 开启后使用 32 位 aria2 下载大于 4G 的文件, aria2 会被系统杀掉 (骚年你还在用 32 位系统?)
# 使用 falloc 时,如果有警告[WARN] Gaining privilege SeManageVolumePrivilege failed. ,需要使用管理员权限打开
file-allocation=falloc
# 大小小于这个值的文件不进行文件预分配,默认 5M
no-file-allocation-limit=4096K
# 证书校验,默认 true
#check-certificate=false

# 任务记录
input-file=aria2.session
# 保存错误/未完成的任务记录
# 会在 dir 下生成同名.aria2文件,当 force-save=true 时完成时删除, force-save=false 时不删除
save-session=aria2.session
# 每隔几秒保存,默认 0, 0 为 aria2 退出时保存,不管设置为多少 aria2 退出时都会保存 session
save-session-interval=60
# 即使任务被移除或完成了也保存 session (使用 save-session 值) ,对 BT 有用,默认 false
# 会检查 session ,如果按照本配置打开 aria2 下载下来的文件如果没有删除元数据会再给你下载下来
# 简单来说: false 不保存完成记录,true 保存完成记录
force-save=true

# 强迫症专用, force-save=true 时删除同名.aria2
# .bat windows用, .sh linux用,需要在bat/sh里自己修改 dir
#on-download-complete=del.bat
#on-bt-download-complete=del_bt.bat
#on-download-complete=rm.sh
#on-bt-download-complete=rm_bt.bat

# 日志
# 级别,可用值 debug, info, notice, warn, error ,默认 debug
log-level=warn
# 位置
log=aria2.log

# 轮询事件
# 可用值 epoll, kqueue, port, poll, select ,默认值与系统有关
# epoll, kqueue, port and poll 需要系统支持
# epoll 支持最新的 Linux , kqueue 支持最新的 BSD 系(包括 MAC OS X), port 支持 Open Solaris
#event-poll=

# BitTorrent
# 启用本地节点查找,默认 false,如果种子设置为 private , aria2 不会使用此选项
bt-enable-lpd=true
# 当值为 true| mem 时,如果下载的文件是一个种子(以.torrent结尾)时, 就自动下载
# 当值为 mem 时,种子不会写入磁盘,但会一直在内存中
# 当值为 false 时不自动下载
# 默认 true
#follow-torrent=flase
# 监听端口,默认6881-6999
# , 为分隔不同端口, – 为两个值中的所有端口,如:’6881-6889,6999′, ‘6881,6885’
#listen-port=<PORT>…

# 强制加密,开启相当于 bt-require-crypto=true 和 bt-min-crypto-level=arc4 ,默认 false
bt-force-encryption=true
# 要求加密,默认 false
#bt-require-crypto=true
# 最低加密级别,可用值 plain, arc4 ,默认 plain
#bt-min-crypto-level=arc4

# 最大打开文件数量,默认 100
#bt-max-open-files=100
# 单种子最大连接数,默认 55 ,0 为不限制
#bt-max-peers=55
# 如果单种子的速度低于此值, aria2 会暂时增加种子的连接数量来增加下载速度,默认 50K
#bt-request-peer-speed-limit=50K

#添加额外的 tracker
#bt-tracker=<URI>[,…]
#要排除的 tracker,可以使用值 ‘*’ (不要引号),当使用 * 时会移除所有通告的的 tracker
#bt-exclude-tracker=<URI>[,…]
# tracker 重连超时时间(单位为秒),默认 60
#bt-tracker-connect-timeout=60
#tracker 超时时间(单位为秒),默认 60
#bt-tracker-timeout=60

# DHT
# 打开 ipv4 DHT, 默认 true
# 当种子文件设置了 private ,即使为 true ,aria2也不会从 DHT 中下载, ipv6 也一样
#enable-dht=true
# 打开 ipv6 DHT,默认 true
#enable-dht6=true
# BT 和 DHT 使用的外部 IP ,可能会发送到BitTorrent tracker
# 对于DHT,此选项应该被设置成要报告的本地节点,这对于在 private 网络中使用 DHT 很重要
# For DHT, this option should be set to report that local node is downloading a particular torrent. This is critical to use DHT in a private network
#bt-external-ip=<IPADDRESS>
# DHT和 UDP tracker监听端口,默认 6881-6999
#dht-listen-port=<PORT>…
# 启用种子交换,默认 true ,如果种子设置为 private ,即使为 true 也不会启用这个特性
#enable-peer-exchange=true
# 做种流量比例, 0.0 时一直做种,默认 1.0
#seed-ratio=0.0

# 改变 IPv4 DHT 路由表保存路径,默认 $HOME/.aria2/dht.dat
dht-file-path=dht.dat
# 改变 IPv6 DHT 路由表保存路径,默认 $HOME/.aria2/dht6.dat
dht-file-path6=dht6.dat

# 修改 UA,默认 aria2/$VERSION
# 只在 HTTP(S) 中有效,要拿来 PT 的洗洗睡了
#user-agent=<USER_AGENT>
# peer-id,默认 A2-$MAJOR-$MINOR-$PATCH- ,比如在 aria2 version 1.18.8 里为 A2-1-18-8-
# 在 BT 中只有前20个字符长度生效,超出的将被丢弃,不足则随机填充至20个字符
#peer-id-prefix=<PEER_ID_PREFIX>

# 保存元数据至 .torrent 文件,默认 false
#bt-save-metadata=true
# 从以前的种子下载不用验证散列,默认 false
# Seed previously downloaded files without verifying piece hashes
#bt-seed-unverified=true
# 种子哈希效验,开启时使用 check-integrity 选项和文件完成散列检查后才会继续,如果你想要下到损坏的文件那就关了吧。默认 true
# If true is given, after hash check using –check-integrity option and file is complete, continue to seed file. If you want to check file and download it only when it is damaged or incomplete, set this option to false. This option has effect only on BitTorrent download. Default: true
#bt-hash-check-seed=true
# 通过验证散列或整个文件的哈希值来检查文件完整性,只在 BT 中生效,HTTP(S)/FTP 使用 checksum 选项,默认 false
#check-integrity=false

 

评论

评论关闭

备案:吉ICP备13003065号