aria2 是一款非常流行的开源下载工具,可以用来下载各种协议文件,包括 BT 种子与磁力链接.

安装并配置Aria2

首先,安装:

apt-get install aria2

创建 Aria2 的配置文件夹:

mkdir /etc/aria2

创建 session 和配置文件:

touch /etc/aria2/aria2.session
touch /etc/aria2/aria2.conf

编辑 /etc/aria2/aria2.conf:

vim /etc/aria2/aria2.conf

完整配置文件:
然后执行:

aria2c --conf-path=/etc/aria2/aria2.conf -D

没有任何提示则表示成功。接下来添加开机自启:

touch /etc/init.d/aria2c
nano /etc/init.d/aria2c

添加:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          aria2
# Required-Start:    remotefsnetwork
# Required-Stop:     remotefsnetwork
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Aria2 Downloader
### END INIT INFO
 
case "$1" in
start)
    echo -n "Starting aria2c"
    sudo aria2c --conf-path=/etc/aria2/aria2.conf -D

;;
stop)
    echo -n "Shutting down aria2c "
    killall aria2c
;;
restart)
    # killall aria2c
    sudo aria2c --conf-path=/etc/aria2/aria2.conf -D

;;
esac
exit

执行:

chmod +x /etc/init.d/aria2c

关于添加Bt-crack

这是一份在 GitHub 上的 trackers 列表:[Github](https://github.com/ngosang/trackerslist/blob/master/trackers_all.txt
在初次使用 aria2 时会发现始终无速度的问题,听说只需要添加这份trackers 列表进 aria2 就能明显的提高下载速度。但是aira2需要以逗号隔开trackers,故写下如下Python脚本。

with open('/home/pi/Documents/btcrackall.txt') as f:
    while True:
        line = f.readline()
        if not line:break
        if line != '\n':
            liness = line.rstrip('\n')
            print(liness,end=",")

以下是的出的结果

udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.opentrackr.org:1337/announce,http://tracker.opentrackr.org:1337/announce,udp://tracker.leechers-paradise.org:6969/announce,udp://9.rarbg.to:2710/announce,udp://9.rarbg.me:2710/announce,udp://p4p.arenabg.com:1337/announce,udp://exodus.desync.com:6969/announce,udp://tracker.cyberia.is:6969/announce,udp://retracker.lanta-net.ru:2710/announce,udp://open.stealth.si:80/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker3.itzmx.com:6961/announce,udp://tracker.moeking.me:6969/announce,http://tracker3.itzmx.com:6961/announce,http://tracker1.itzmx.com:8080/announce,udp://ipv4.tracker.harry.lu:80/announce,udp://bt2.archive.org:6969/announce,udp://bt1.archive.org:6969/announce,udp://zephir.monocul.us:6969/announce,udp://valakas.rollo.dnsabr.com:2710/announce,udp://tracker.zerobytes.xyz:1337/announce,udp://tracker.uw0.xyz:6969/announce,udp://tracker.lelux.fi:6969/announce,udp://tracker.kamigami.org:2710/announce,udp://tracker.ds.is:6969/announce,udp://tracker-udp.gbitt.info:80/announce,udp://retracker.akado-ural.ru:80/announce,udp://opentracker.i2p.rocks:6969/announce,udp://opentor.org:2710/announce,udp://explodie.org:6969/announce,https://tracker.lelux.fi:443/announce,https://tracker.gbitt.info:443/announce,http://vps02.net.orel.ru:80/announce,http://tracker.zerobytes.xyz:1337/announce,http://tracker.nyap2p.com:8080/announce,http://tracker.lelux.fi:80/announce,http://tracker.kamigami.org:2710/announce,http://tracker.gbitt.info:80/announce,http://opentracker.i2p.rocks:6969/announce,http://h4.trakx.nibba.trade:80/announce,http://explodie.org:6969/announce,udp://tracker.jae.moe:6969/announce,udp://tracker.army:6969/announce,udp://chihaya.de:6969/announce,udp://aaa.army:8866/announce,https://tracker.nitrix.me:443/announce,https://tracker.jae.moe:443/announce,https://aaa.army:8866/announce,http://t.overflow.biz:6969/announce,http://open.acgtracker.com:1096/announce,http://aaa.army:8866/announce,udp://www.loushao.net:8080/announce,udp://u.wwwww.wtf:1/announce,udp://tracker4.itzmx.com:2710/announce,udp://tracker.yoshi210.com:6969/announce,udp://tracker.teambelgium.net:6969/announce,udp://tracker.dler.org:6969/announce,udp://tr2.ysagin.top:2710/announce,udp://t3.leech.ie:1337/announce,udp://t2.leech.ie:1337/announce,udp://t1.leech.ie:1337/announce,udp://retracker.sevstar.net:2710/announce,udp://retracker.netbynet.ru:2710/announce,udp://qg.lorzl.gq:2710/announce,https://w.wwwww.wtf:443/announce,https://tracker.tamersunion.org:443/announce,https://tracker.sloppyta.co:443/announce,https://tracker.nanoha.org:443/announce,https://tracker.hama3.net:443/announce,https://tr.ready4.icu:443/announce,https://1337.abcvg.info:443/announce,http://www.loushao.net:8080/announce,http://tracker2.dler.org:80/announce,http://tracker.yoshi210.com:6969/announce,http://tracker.ygsub.com:6969/announce,http://tracker.sloppyta.co:80/announce,http://tracker.dler.org:6969/announce,http://t3.leech.ie:80/announce,http://t2.leech.ie:80/announce,http://t1.leech.ie:80/announce,http://t.nyaatracker.com:80/announce,http://retracker.sevstar.net:2710/announce,http://pow7.com:80/announce,http://open.acgnxtracker.com:80/announce,http://mail2.zelenaya.net:80/announce,udp://tracker6.dler.org:2710/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker.filemail.com:6969/announce,udp://tr.bangumi.moe:6969/announce,udp://bt2.54new.com:8080/announce,https://tracker.vectahosting.eu:2053/announce,https://tracker.shittyurl.org:443/announce,https://tracker.imgoingto.icu:443/announce,https://tracker.coalition.space:443/announce,http://tracker4.itzmx.com:2710/announce,http://tracker2.itzmx.com:6961/announce,http://tracker.shittyurl.org:80/announce,http://t.acg.rip:6699/announce

安装Uget

安装uGet

sudo apt-get install uget

打开uget并最大化,点击edit->setting

点击插件,选aria2,注意输入token,点击ok。

如果出现不能下载的问题,如uGet弹出Error occourred when downloading。可能是aria2的问题,在terminal中执行aria2c --daemon --enable-rpc=true即可 。

下载迅雷链接

需要多进行一步链接转换。
迅雷下载协议是经过加密的,如:

thunder://QUFodHRwOi8vd3d3LmNub3N3aWtpLmNvbS93cC1jb250ZW50L3RoZW1lcy9tb25vY2hyb21lL2ltZy9sb2dvLmdpZlpa

直接在Linux下面是没有办法下载的。

在ubuntu中,可在终端下使用echo url|base64 -d 来显示解密后的地址。如(URL为迅雷链接去掉开头):

echo
QUFodHRwOi8vd3d3LmNub3N3aWtpLmNvbS93cC1jb250ZW50L3RoZW1lcy9tb25vY2hyb21lL2ltZy9sb2dvLmdpZlpa
|base64 -d

显示结果是:

AAhttp://www.cnoswiki.com/wp-content/themes/monochrome/img/logo.gifZZ

然后去除开头的AA和结尾的ZZ既是解密后的地址:

http://www.cnoswiki.com/wp-content/themes/monochrome/img/logo.gif

拿到解密后的地址后,就可以使用uGet下载工具进行下载!

参考

树莓派安装Aria2
Aria2配置文件-aria2.conf
在linux中下载迅雷链接(thunder://)