aria2在windows10下的使用教程
第1步:下載
點擊https://aria2.github.io/或者https://github.com/aria2/aria2進行下載
第2步:新增4個文件
在解壓后的目錄下,新增4個文件:
- Aria2.log (日志,空文件就行)
- aria2.session (下載歷史,空文件就行)
- aria2.conf (配置文件)
- HideRun.vbs (隱藏cmd窗口運行用到的)
第3步:編輯aria2.conf文件(最重要的一步!)
復制以下內容:
dir=C:\Users\Administrator\Desktop\
log=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\Aria2.log
input-file=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\aria2.session
save-session=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\aria2.session
async-dns-server=114.114.114.114
save-session-interval=60
force-save=true
log-level=error
# see --split option
max-concurrent-downloads=5
continue=true
max-overall-download-limit=0
max-overall-upload-limit=50K
max-upload-limit=20
# Http/FTP options
connect-timeout=120
lowest-speed-limit=10K
max-connection-per-server=10
max-file-not-found=2
min-split-size=1M
split=5
check-certificate=false
http-no-cache=true
# FTP Specific Options
# BT/PT Setting
bt-enable-lpd=true
#bt-max-peers=55
follow-torrent=true
enable-dht6=false
bt-seed-unverified
rpc-save-upload-metadata=true
bt-hash-check-seed
bt-remove-unselected-file
bt-request-peer-speed-limit=100K
seed-ratio=0.0
# Metalink Specific Options
# RPC Options
enable-rpc=true
pause=false
rpc-allow-origin-all=true
rpc-listen-all=true
rpc-save-upload-metadata=true
rpc-secure=false
# Advanced Options
daemon=true
disable-ipv6=true
enable-mmap=true
file-allocation=falloc
max-download-result=120
#no-file-allocation-limit=32M
force-sequential=true
parameterized-uri=true
然后更改前4行內容!更改前4行內容!更改前4行內容!
dir=C:\Users\Administrator\Desktop\(改為自己的下載文件保存路徑,隨意放,想放哪放哪)
log=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\Aria2.log(改為:"自己的aria2安裝路徑\Aria2.log")
input-file=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\aria2.session(改為:"自己的aria2安裝路徑\aria2.session")
save-session=C:\Users\Administrator\Desktop\temp\aria2-1.35.0\aria2.session(改為:"自己的aria2安裝路徑\aria2.session")
最后兩項是記錄和讀取下載歷史用的,斷電和重啟時保證下載任務不會丟失,如果有時aria2
不能啟動,清空這里面的內容就行了。
第4步:配置HideRun.vbs文件(可以跳過,沒啥大用)
在HideRun.vbs文件中寫入:
CreateObject("WScript.Shell").Run "自己的aria2安裝路徑\aria2c.exe --conf-path=aria2.conf --async-dns=false",0
第5步:啟動
有兩種啟動方式:
- (推薦使用)命令行窗口輸入
aria2c.exe --conf-path=aria2.conf
- 運行HideRun.vbs
如果使用第二種方式,需要額外增加一個StopRun.vbs:
taskkill /im aria2c.exe /t /f
當想要關閉的aria2的時候,運行StopRun.vbs即可,關於StopRun.vbs更深入的講解,參考網址:https://www.appinn.com/aria2-in-windows-setup/
第6步:打開網頁(這一步有很多坑!)
一些教程到了這里,直接讓打開https://aria2c.com/,這是錯的,這是針對linux操作系統而言的。在windows10下,如果這么干,會報一些難以解決的錯誤。
而這里我們用的是windows10操作系統。正確做法如下:
打開https://github.com/mayswind/AriaNg,進入release頁面,下載名字中帶有AllInOne的壓縮包,解壓之后,打開index.html。
就會看到這個界面:
大功告成
第7步:后續配置
完成了前6步,就可以使用aria2下載文件了,注意aria2這個軟件很傲嬌,下載文件的時候,如果下載速度低於10240B/s,它就會在日志上提示,如果連續好幾次下載速度低於10240B/S(10KB/S),aria2會直接放棄對這個文件的下載,這個時候點擊“重試”按鈕,多試幾次即可。
或者也有個一勞永逸的方法,在HTTP/FTP/SFTP中,將最小速度限制改為0(原本是10K),注意,不能直接在頁面上改,直接在頁面上改是沒有用的,必須在aria2.conf文件中改,然后重啟。
參考資料:
https://juejin.cn/post/6844903823803154446