一直用aria2下载文件,aria2一直用的默认配置 协议用的是http 发现一些https的网站调用aria2的时候会因为http出现异常 比如这样 ![异常]() 要开启https,首先需要为自己的域名申请一个证书,没有域名的话就… 申请免费的证书有不少方法,我选择SSL For Free 具体方法嘛 利用SSL For Free工具3分钟获取Let’s Encrypt免费SSL证书 申请完毕之后得到一个压缩包,里面有私钥,证书,中间证书三个文件,保存起来下面用 接下来修改aria2的配置文件 加入
 要开启https,首先需要为自己的域名申请一个证书,没有域名的话就… 申请免费的证书有不少方法,我选择SSL For Free 具体方法嘛 利用SSL For Free工具3分钟获取Let’s Encrypt免费SSL证书 申请完毕之后得到一个压缩包,里面有私钥,证书,中间证书三个文件,保存起来下面用 接下来修改aria2的配置文件 加入
| 12
 3
 4
 5
 6
 7
 8
 
 | 
 rpc-secure=true
 
 
 rpc-certificate=/path/to/certificate.pem
 
 rpc-private-key=/path/to/certificate.key
 
 | 
其中的rpc-certificate改为之前得到的证书的位置,rpc-private-key改为密钥的位置 重启aria2~~~
试试把aria2 JSONRPC的链接改为https,是不是没有红叉了,强迫症表示非常满足!!! 附上aria2配置文件的示例
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 
 | 
 
 
 
 
 dir=~/downloads
 
 
 
 
 
 
 
 
 continue=true
 
 
 
 
 
 
 max-connection-per-server=5
 
 
 min-split-size=10M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 input-file=/etc/aria2/aria2.session
 
 save-session=/etc/aria2/aria2.session
 
 
 
 
 
 
 enable-rpc=true
 
 rpc-allow-origin-all=true
 
 rpc-listen-all=true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 listen-port=51413
 
 
 
 enable-dht=false
 
 
 
 
 
 
 
 enable-peer-exchange=false
 
 
 
 peer-id-prefix=-TR2770-
 user-agent=Transmission/2.77
 
 seed-ratio=0
 
 
 
 
 
 
 bt-seed-unverified=true
 
 bt-save-metadata=true
 
 |