46 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/public/aria2.js:
--------------------------------------------------------------------------------
1 | ;(function (global) {
2 | 'use strict'
3 |
4 | function polygoat (fn, cb, Promise) {
5 | if (cb) {
6 | fn(function (err, res) {
7 | cb(err, res)
8 | })
9 | } else {
10 | var P = Promise || global.Promise
11 | return new P(function (resolve, reject) {
12 | fn(function (err, res) {
13 | if (err !== null && err !== undefined) {
14 | reject(err)
15 | } else {
16 | resolve(res)
17 | }
18 | })
19 | })
20 | }
21 | }
22 |
23 | window.polygoat = polygoat
24 | }(typeof global !== 'undefined' ? global : this))
25 | ;(function (global) {
26 | 'use strict'
27 |
28 | var WebSocket
29 | var fetch
30 | var pg
31 |
32 | var isNode = false; //typeof module !== 'undefined' && module.exports
33 |
34 | if (isNode) {
35 | WebSocket = require('ws')
36 | fetch = require('node-fetch')
37 | pg = require('polygoat')
38 | } else {
39 | WebSocket = global.WebSocket
40 | fetch = global.fetch
41 | pg = global.polygoat
42 | }
43 |
44 | var Aria2 = function (opts) {
45 | this.callbacks = Object.create(null)
46 | this.lastId = 0
47 |
48 | for (var i in Aria2.options) {
49 | this[i] = typeof opts === 'object' && i in opts ? opts[i] : Aria2.options[i]
50 | }
51 | }
52 |
53 | Aria2.prototype.http = function (m, fn) {
54 | var that = this
55 | var content = {
56 | method: m.method,
57 | id: m.id
58 | }
59 |
60 | if (Array.isArray(m.params) && m.params.length > 0) {
61 | content.params = m.params
62 | }
63 |
64 | var url = 'http' + (this.secure ? 's' : '') + '://' + this.host + ':' + this.port + this.path
65 | fetch(url, {
66 | method: 'POST',
67 | body: JSON.stringify(content),
68 | headers: {
69 | 'Accept': 'application/json',
70 | 'Content-Type': 'application/json'
71 | }})
72 | .then(function (res) {
73 | return res.json()
74 | })
75 | .then(function (msg) {
76 | that._onmessage(msg)
77 | })
78 | .catch(fn)
79 | }
80 |
81 | Aria2.prototype.send = function (method /* [,param] [,param] [,...] [, fn] */) {
82 | var params = Array.prototype.slice.call(arguments, 1)
83 | var cb = typeof params[params.length - 1] === 'function' ? params.pop() : null
84 | return this.exec(method, params, cb)
85 | }
86 |
87 | Aria2.prototype.exec = function (method, parameters, cb) {
88 | if (typeof method !== 'string') {
89 | throw new TypeError(method + ' is not a string')
90 | }
91 |
92 | if (method.indexOf('system.') !== 0 && method.indexOf('aria2.') !== 0) {
93 | method = 'aria2.' + method
94 | }
95 |
96 | var m = {
97 | 'method': method,
98 | 'json-rpc': '2.0',
99 | 'id': this.lastId++
100 | }
101 |
102 | var params = this.secret ? ['token:' + this.secret] : []
103 | if (Array.isArray(parameters)) {
104 | params = params.concat(parameters)
105 | }
106 |
107 | if (params.length > 0) m.params = params
108 |
109 | this.onsend(m)
110 |
111 | var that = this
112 |
113 | // send via websocket
114 | if (this.socket && this.socket.readyState === 1) {
115 | this.socket.send(JSON.stringify(m))
116 | // send via http
117 | } else {
118 | this.http(m, function (err) {
119 | that.callbacks[m.id](err)
120 | delete that.callbacks[m.id]
121 | })
122 | }
123 |
124 | return pg(function (done) {
125 | that.callbacks[m.id] = done
126 | }, cb)
127 | }
128 |
129 | Aria2.prototype._onmessage = function (m) {
130 | this.onmessage(m)
131 |
132 | if (m.id !== undefined) {
133 | var callback = this.callbacks[m.id]
134 | if (callback) {
135 | if (m.error) {
136 | callback(m.error)
137 | } else {
138 | callback(null, m.result)
139 | }
140 | delete this.callbacks[m.id]
141 | }
142 | } else if (m.method) {
143 | var n = m.method.split('aria2.')[1]
144 | if (n.indexOf('on') === 0 && typeof this[n] === 'function' && Aria2.notifications.indexOf(n) > -1) {
145 | this[n].apply(this, m.params)
146 | }
147 | }
148 | }
149 |
150 | Aria2.prototype.open = function (fn) {
151 | var url = 'ws' + (this.secure ? 's' : '') + '://' + this.host + ':' + this.port + this.path
152 | var socket = this.socket = new WebSocket(url)
153 | var that = this
154 | var called = false
155 |
156 | socket.onclose = function () {
157 | that.onclose()
158 | }
159 | socket.onmessage = function (event) {
160 | that._onmessage(JSON.parse(event.data))
161 | }
162 |
163 | return pg(function (done) {
164 | socket.onopen = function () {
165 | if (!called) {
166 | done()
167 | called = true
168 | }
169 | that.onopen()
170 | }
171 | socket.onerror = function (err) {
172 | if (!called) {
173 | done(err)
174 | called = true
175 | }
176 | }
177 | }, fn)
178 | }
179 |
180 | Aria2.prototype.close = function (fn) {
181 | var socket = this.socket
182 | var called = false
183 | return pg(function (done) {
184 | if (!socket) {
185 | done()
186 | } else {
187 | if (socket.readyState === 3) {
188 | done()
189 | } else {
190 | var d = function(){
191 | if(!called){
192 | done()
193 | called = true
194 | }
195 | }
196 | socket.addEventListener('close', d)
197 | socket.close()
198 | setTimeout(d, 3000)
199 | }
200 | }
201 | }, fn)
202 | }
203 |
204 | // https://aria2.github.io/manual/en/html/aria2c.html#methods
205 | Aria2.methods = [
206 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.addUri
207 | 'addUri',
208 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.addTorrent
209 | 'addTorrent',
210 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.addMetalink
211 | 'addMetalink',
212 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.remove
213 | 'remove',
214 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.forceRemove
215 | 'forceRemove',
216 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.pause
217 | 'pause',
218 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.pauseAll
219 | 'pauseAll',
220 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.forcePause
221 | 'forcePause',
222 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.forcePauseAll
223 | 'forcePauseAll',
224 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.unpause
225 | 'unpause',
226 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.unpauseAll
227 | 'unpauseAll',
228 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.tellStatus
229 | 'tellStatus',
230 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getUris
231 | 'getUris',
232 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getFiles
233 | 'getFiles',
234 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getPeers
235 | 'getPeers',
236 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getServers
237 | 'getServers',
238 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.tellActive
239 | 'tellActive',
240 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.tellWaiting
241 | 'tellWaiting',
242 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.tellStopped
243 | 'tellStopped',
244 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.changePosition
245 | 'changePosition',
246 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.changeUri
247 | 'changeUri',
248 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getOption
249 | 'getOption',
250 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.changeOption
251 | 'changeOption',
252 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getGlobalOption
253 | 'getGlobalOption',
254 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.changeGlobalOption
255 | 'changeGlobalOption',
256 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getGlobalStat
257 | 'getGlobalStat',
258 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.purgeDownloadResult
259 | 'purgeDownloadResult',
260 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.removeDownloadResult
261 | 'removeDownloadResult',
262 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getVersion
263 | 'getVersion',
264 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.getSessionInfo
265 | 'getSessionInfo',
266 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.shutdown
267 | 'shutdown',
268 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.forceShutdown
269 | 'forceShutdown',
270 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.saveSession
271 | 'saveSession',
272 | // https://aria2.github.io/manual/en/html/aria2c.html#system.multicall
273 | 'system.multicall',
274 | // https://aria2.github.io/manual/en/html/aria2c.html#system.listMethods
275 | 'system.listMethods',
276 | // https://aria2.github.io/manual/en/html/aria2c.html#system.listNotifications
277 | 'system.listNotifications'
278 | ]
279 |
280 | // https://aria2.github.io/manual/en/html/aria2c.html#notifications
281 | Aria2.notifications = [
282 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onDownloadStart
283 | 'onDownloadStart',
284 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onDownloadPause
285 | 'onDownloadPause',
286 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onDownloadStop
287 | 'onDownloadStop',
288 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onDownloadComplete
289 | 'onDownloadComplete',
290 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onDownloadError
291 | 'onDownloadError',
292 | // https://aria2.github.io/manual/en/html/aria2c.html#aria2.onBtDownloadComplete
293 | 'onBtDownloadComplete'
294 | ]
295 |
296 | Aria2.events = [
297 | 'onopen',
298 | 'onclose',
299 | 'onsend',
300 | 'onmessage'
301 | ]
302 |
303 | Aria2.options = {
304 | 'secure': false,
305 | 'host': 'localhost',
306 | 'port': 6800,
307 | 'secret': '',
308 | 'path': '/jsonrpc'
309 | }
310 |
311 | Aria2.methods.forEach(function (method) {
312 | var sufix = method.indexOf('.') > -1 ? method.split('.')[1] : method
313 | Aria2.prototype[sufix] = function (/* [param] [,param] [,...] */) {
314 | return this.send.apply(this, [method].concat(Array.prototype.slice.call(arguments)))
315 | }
316 | })
317 |
318 | Aria2.notifications.forEach(function (notification) {
319 | Aria2.prototype[notification] = function () {}
320 | })
321 |
322 | Aria2.events.forEach(function (event) {
323 | Aria2.prototype[event] = function () {}
324 | })
325 |
326 | if (isNode) {
327 | module.exports = Aria2
328 | } else {
329 | global.Aria2 = Aria2
330 | }
331 | }(this))
332 |
--------------------------------------------------------------------------------
/public/aria2cli/aria2.conf:
--------------------------------------------------------------------------------
1 | ## '#'开头为注释内容, 选项都有相应的注释说明, 根据需要修改 ##
2 | ## 被注释的选项填写的是默认值, 建议在需要修改时再取消注释 ##
3 | ## 添加了@和默认启用的选项都是系统需要调用的,请不要随意改动否则可能无法正常运行
4 |
5 | ## 文件保存相关 ##
6 |
7 | # 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置
8 | # 此项 OS X 无法使用 $HOME 及 ~/ 设置路径 建议使用 /users/用户名/downloads
9 | #@dir=$HOME/downloads
10 | # 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
11 | #@disk-cache=32M
12 | # 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
13 | # 预分配所需时间: none < falloc ? trunc < prealloc
14 | # falloc和trunc则需要文件系统和内核支持
15 | # NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项
16 | # file-allocation=none
17 | # 断点续传
18 | #@continue=true
19 |
20 | ## 下载连接相关 ##
21 |
22 | # 最大同时下载任务数, 运行时可修改, 默认:5
23 | max-concurrent-downloads=10
24 | # 同一服务器连接数, 添加时可指定, 默认:1
25 | max-connection-per-server=16
26 | # 最小文件分片大小, 添加时可指定, 取值范围1M -1024M, 默认:20M
27 | # 假定size=10M, 文件为20MiB 则使用两个来源下载; 文件为15MiB 则使用一个来源下载
28 | #@min-split-size=10M
29 | # 单个任务最大线程数, 添加时可指定, 默认:5
30 | split=16
31 | # 整体下载速度限制, 运行时可修改, 默认:0
32 | #@max-overall-download-limit=0
33 | # 单个任务下载速度限制, 默认:0
34 | #@max-download-limit=0
35 | # 整体上传速度限制, 运行时可修改, 默认:0
36 | #@max-overall-upload-limit=0
37 | # 单个任务上传速度限制, 默认:0
38 | #@max-upload-limit=0
39 | # 禁用IPv6, 默认:false
40 | disable-ipv6=false
41 | #运行覆盖已存在文件
42 | #@allow-overwrite=true
43 | #自动重命名
44 | #@auto-file-renaming=true
45 |
46 | ## 进度保存相关 ##
47 |
48 | # 从会话文件中读取下载任务
49 | #@input-file=/Users/Shared/aria2.session
50 | # 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
51 | #@save-session=/Users/Shared/aria2.session
52 | # 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
53 | save-session-interval=30
54 |
55 | ## RPC相关设置 ##
56 |
57 | # 启用RPC, 默认:false
58 | enable-rpc=true
59 | # 允许所有来源, 默认:false
60 | rpc-allow-origin-all=true
61 | # 允许非外部访问, 默认:false
62 | rpc-listen-all=true
63 | # 事件轮询方式, 取值:[epoll, kqueue, port, poll, select], 不同系统默认值不同
64 | #event-poll=select
65 | # RPC监听端口, 端口被占用时可以修改, 默认:6800
66 | # 使用本客户端请勿修改此项
67 | rpc-listen-port=6800
68 | # 设置的RPC授权令牌, v1.18.4新增功能, 取代 --rpc-user 和 --rpc-passwd 选项
69 | #rpc-secret=token
70 |
71 | ## BT/PT下载相关 ##
72 |
73 | # 当下载的是一个种子(以.torrent结尾)时, 自动开始BT任务, 默认:true
74 | #follow-torrent=true
75 | # BT监听端口, 当端口被屏蔽时使用, 默认:6881-6999
76 | listen-port=51413
77 | # 单个种子最大连接数, 默认:55
78 | #bt-max-peers=55
79 | # 打开DHT功能, PT需要禁用, 默认:true
80 | # enable-dht=false
81 | bt-enable-lpd=true
82 | # 打开IPv6 DHT功能, PT需要禁用
83 | #enable-dht6=false
84 | # DHT网络监听端口, 默认:6881-6999
85 | #dht-listen-port=6881-6999
86 | # 本地节点查找, PT需要禁用, 默认:false
87 | #bt-enable-lpd=false
88 | # 种子交换, PT需要禁用, 默认:true
89 | #enable-peer-exchange=false
90 | # 每个种子限速, 对少种的PT很有用, 默认:50K
91 | #bt-request-peer-speed-limit=50K
92 | # 客户端伪装, PT需要
93 | peer-id-prefix=-TR2770-
94 | user-agent=Transmission/2.77
95 | # 当种子的分享率达到这个数时, 自动停止做种, 0为一直做种, 默认:1.0
96 | seed-ratio=0
97 | # 强制保存会话, 即使任务已经完成, 默认:false
98 | # 较新的版本开启后会在任务完成后依然保留.aria2文件
99 | #force-save=false
100 | # BT校验相关, 默认:true
101 | #bt-hash-check-seed=true
102 | # 继续之前的BT任务时, 无需再次校验, 默认:false
103 | bt-seed-unverified=true
104 | # 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
105 | # bt-save-metadata=true
106 |
107 | # bt-tracker数据来自https://github.com/ngosang/trackerslist/blob/master/trackers_all_udp.txt
108 |
109 | bt-tracker=udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.open-internet.nl:6969/announce,udp://tracker.skyts.net:6969/announce,udp://tracker.piratepublic.com:1337/announce,udp://tracker.opentrackr.org:1337/announce,udp://9.rarbg.to:2710/announce,udp://public.popcorn-tracker.org:6969/announce,udp://inferno.demonoid.pw:3418/announce,udp://wambo.club:1337/announce,udp://trackerxyz.tk:1337/announce,udp://tracker4.itzmx.com:2710/announce,udp://tracker2.christianbro.pw:6969/announce,udp://tracker1.wasabii.com.tw:6969/announce,udp://tracker.zer0day.to:1337/announce,udp://tracker.xku.tv:6969/announce,udp://tracker.vanitycore.co:6969/announce,udp://tracker.mg64.net:6969/announce,udp://open.facedatabg.net:6969/announce,udp://mgtracker.org:6969/announce,udp://ipv4.tracker.harry.lu:80/announce,udp://tracker.christianbro.pw:6969/announce,udp://tracker.bluefrog.pw:2710/announce,udp://tracker.acg.gg:2710/announce,udp://thetracker.org:80/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.internetwarriors.net:1337/announce,udp://tracker.halfchub.club:6969/announce,udp://tracker.grepler.com:6969/announce,udp://tracker.files.fm:6969/announce,udp://tracker.dler.org:6969/announce,udp://tracker.desu.sh:6969/announce,udp://tracker.cypherpunks.ru:6969/announce,udp://p4p.arenabg.com:1337/announce,udp://open.stealth.si:80/announce,udp://explodie.org:6969/announce,udp://bt.xxx-tracker.com:2710/announce,udp://tracker.torrent.eu.org:451/announce,udp://retracker.lanta-net.ru:2710/announce,udp://tracker.uw0.xyz:6969/announce,udp://zephir.monocul.us:6969/announce,udp://tracker.tvunderground.org.ru:3218/announce,udp://retracker.coltel.ru:2710/announce,udp://pubt.in:2710/announce,udp://tracker.kamigami.org:2710/announce,udp://peerfect.org:6969/announce,udp://z.crazyhd.com:2710/announce,udp://tracker.swateam.org.uk:2710/announce,udp://tracker.justseed.it:1337/announce,udp://tracker.cyberia.is:6969/announce,udp://t.agx.co:61655/announce,udp://sd-95.allfon.net:2710/announce,udp://santost12.xyz:6969/announce,udp://sandrotracker.biz:1337/announce,udp://retracker.nts.su:2710/announce,udp://packages.crunchbangplusplus.org:6969/announce,udp://104.238.198.186:8000/announce
110 |
--------------------------------------------------------------------------------
/public/aria2cli/aria2.session:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/aria2cli/aria2.session
--------------------------------------------------------------------------------
/public/aria2icon.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/aria2icon.icns
--------------------------------------------------------------------------------
/public/aria2icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/aria2icon.ico
--------------------------------------------------------------------------------
/public/aria2icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/aria2icon.png
--------------------------------------------------------------------------------
/public/aria2icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/aria2icon_16.png
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
23 |
28 |
37 | Aria2Desktop
38 |
39 |
40 |
43 |
44 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/public/main.js:
--------------------------------------------------------------------------------
1 | const {
2 | app, BrowserWindow, Menu, shell,
3 | Tray, globalShortcut, ipcMain
4 | } = require('electron');
5 | const child_process = require('child_process');
6 | const path = require('path');
7 | const fs = require('fs');
8 | const url = require('url');
9 | const os = require('os');
10 |
11 | const userHomeDir = os.homedir();
12 | const ARIA2DESKTOP_DEV = process.env.ARIA2DESKTOP_DEV === 'true';
13 |
14 | const platform = process.platform;
15 | let secret;
16 |
17 | const template = [
18 | {
19 | label: '编辑',
20 | submenu: [
21 | {role: 'undo'},
22 | {role: 'redo'},
23 | {type: 'separator'},
24 | {role: 'cut', label: '剪切'},
25 | {role: 'copy', label: '复制'},
26 | {role: 'paste', label: '粘贴'},
27 | {role: 'delete', label: '删除'},
28 | {role: 'selectall', label: '全选'}
29 | ]
30 | },
31 | {
32 | label: '视图',
33 | submenu: [
34 | {role: 'reload', label: '重新载入'},
35 | {role: 'forcereload', label: '强制重新载入'},
36 | {type: 'separator'},
37 | {role: 'togglefullscreen'}
38 | ]
39 | },
40 | {
41 | role: 'window',
42 | label: '窗口',
43 | submenu: [
44 | {role: 'minimize', label: '最小化'},
45 | {role: 'close', label: '关闭'}
46 | ]
47 | },
48 | {
49 | role: 'help',
50 | label: '帮助',
51 | submenu: [
52 | {
53 | label: '在线帮助',
54 | click() {
55 | shell.openExternal('https://github.com/wapznw/aria2desktop')
56 | }
57 | }
58 | ]
59 | }
60 | ];
61 |
62 | if (platform === 'darwin') {
63 | template.unshift({
64 | label: app.getName(),
65 | submenu: [
66 | {role: 'about', label: '关于' + app.getName()},
67 | {type: 'separator'},
68 | {role: 'services', label: '服务', submenu: []},
69 | {type: 'separator'},
70 | {role: 'hide'},
71 | {role: 'hideothers'},
72 | {role: 'unhide'},
73 | {type: 'separator'},
74 | {role: 'quit', label: '退出'}
75 | ]
76 | });
77 | }
78 |
79 | let menu = Menu.buildFromTemplate(template);
80 |
81 | let mainWindow;
82 |
83 | function createWindow() {
84 | mainWindow = new BrowserWindow({
85 | width: 900,
86 | height: 600,
87 | minWidth: 900,
88 | minHeight: 600,
89 | center: true,
90 | titleBarStyle: 'hiddenInset',
91 | show: false,
92 | frame: platform === 'darwin',
93 | title: 'Aria2Desktop'
94 | });
95 |
96 | const loadUrl = ARIA2DESKTOP_DEV ? 'http://localhost:3000/' : url.format({
97 | pathname: path.join(__dirname, 'index.html'),
98 | protocol: 'file:',
99 | slashes: true
100 | });
101 | mainWindow.loadURL(loadUrl + '#' + secret);
102 | console.log('loadUrl', loadUrl + '#' + secret);
103 |
104 | mainWindow.on('closed', function () {
105 | mainWindow = null
106 | });
107 |
108 | mainWindow.once('ready-to-show', () => {
109 | Menu.setApplicationMenu(process.platform === 'darwin' ? menu : null);
110 | // ubuntu 第一次创建窗口加载有问题
111 | if (process.platform === 'linux') {
112 | mainWindow.reload();
113 | setTimeout(function () {
114 | mainWindow.show()
115 | }, 380)
116 | } else {
117 | mainWindow.show()
118 | }
119 | })
120 | }
121 |
122 | function toggleWindow() {
123 | if (mainWindow === null) {
124 | createWindow()
125 | } else {
126 | if (mainWindow.isVisible() && !mainWindow.isFocused()) {
127 | mainWindow.focus();
128 | } else {
129 | mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show();
130 | }
131 | }
132 | }
133 |
134 | let tray;
135 | let templateMenu = [
136 | {label: '关于' + app.getName(), click:function () {
137 | let aboutWin = new BrowserWindow({
138 | width: 600,
139 | height: 400,
140 | titleBarStyle: 'hiddenInset',
141 | center: true,
142 | resizable: false,
143 | title: '关于' + app.getName(),
144 | parent: mainWindow
145 | });
146 | const aboutUrl = url.format({
147 | pathname: path.join(__dirname, 'about.html'),
148 | protocol: 'file:',
149 | slashes: true
150 | })
151 | aboutWin.loadURL(aboutUrl)
152 | }},
153 | {type: 'separator'},
154 | {role: 'quit', label: '完全退出'}
155 | ];
156 |
157 | const shouldQuit = app.makeSingleInstance(() => {
158 | if (mainWindow) {
159 | if (mainWindow.isMinimized()) {
160 | mainWindow.restore();
161 | }
162 | mainWindow.focus();
163 | } else {
164 | createWindow();
165 | }
166 | });
167 | if (shouldQuit) {
168 | app.quit();
169 | } else {
170 | app.on('ready', function () {
171 | createWindow();
172 | tray = new Tray(path.join(__dirname, 'aria2icon_16.png'));
173 | tray.setToolTip('aria2 desktop');
174 | if (platform === 'darwin') {
175 | tray.on('right-click', () => {
176 | tray.popUpContextMenu(Menu.buildFromTemplate(templateMenu))
177 | })
178 | } else {
179 | templateMenu.splice(1, 0, {type: 'separator'}, {
180 | label: '显示/隐藏',
181 | click() {
182 | toggleWindow()
183 | }
184 | });
185 | tray.setContextMenu(Menu.buildFromTemplate(templateMenu))
186 | }
187 | tray.on('click', () => {
188 | toggleWindow()
189 | });
190 | globalShortcut.register('CommandOrControl+Alt+J', () => {
191 | if (mainWindow && mainWindow.webContents) {
192 | mainWindow.webContents.openDevTools()
193 | }
194 | });
195 | });
196 |
197 | app.on('window-all-closed', function () {
198 | // if (process.platform !== 'darwin') {
199 | // app.quit()
200 | // }
201 | });
202 |
203 | app.on('activate', function () {
204 | if (mainWindow === null) {
205 | createWindow()
206 | }
207 | mainWindow.isFocused() || mainWindow.focus();
208 | });
209 |
210 |
211 |
212 | const aria2dir = path.resolve(__dirname, 'aria2cli');
213 |
214 | const aria2home = path.join(userHomeDir, app.getName());
215 | const aria2Cli = path.resolve(aria2home, 'aria2c');
216 | const aria2DownloadDir = path.join(userHomeDir, 'Downloads');
217 | const sessionFile = path.join(aria2home, 'aria2.session');
218 | const aria2ConfFile = path.join(aria2home, 'aria2.conf');
219 |
220 | if (!fs.existsSync(aria2home)) {
221 | fs.mkdirSync(aria2home);
222 | }
223 |
224 | fs.readdirSync(aria2dir).forEach(file => {
225 | let src = path.join(aria2dir, file);
226 | let dest = path.join(aria2home, file);
227 | if (!fs.existsSync(dest)) {
228 | console.log('释放文件: ', src);
229 | if ('copyFileSync' in fs) {
230 | fs.copyFileSync(src, dest);
231 | } else {
232 | fs.writeFileSync(dest, fs.readFileSync(src));
233 | if (file === 'aria2c') {
234 | fs.chmodSync(dest, 755)
235 | }
236 | }
237 | }
238 | });
239 |
240 | secret = Math.random().toString(32).substr(2);
241 | if (fs.existsSync(aria2ConfFile)) {
242 | let confContent = fs.readFileSync(aria2ConfFile).toString();
243 | let c = confContent.replace(/\\n/g, "\n").replace(/#.+/g, '');
244 | let m = c.match(/rpc-secret=(.+)/i);
245 | if (m && m.length > 1) {
246 | secret = m[1]
247 | } else {
248 | confContent = confContent.replace(/rpc-secret=(.+)/i, 'rpc-secret=' + secret);
249 | fs.writeFileSync(aria2ConfFile, confContent);
250 | }
251 | }
252 |
253 | const aria2Conf = [
254 | '--dir', aria2DownloadDir,
255 | '--conf-path', aria2ConfFile,
256 | '--input-file', sessionFile,
257 | '--save-session', sessionFile,
258 | // '--max-concurrent-downloads', 10,
259 | // '--max-connection-per-server', 16,
260 | // '--min-split-size', '1024K',
261 | // '--split', 16,
262 | // '--max-overall-download-limit', '0K',
263 | // '--max-overall-upload-limit', '0K',
264 | // '--max-download-limit', '0K',
265 | // '--max-upload-limit', '0K',
266 | // '--continue', 'true',
267 | // '--auto-file-renaming', 'true',
268 | // '--allow-overwrite', 'true',
269 | // '--disk-cache', '0M',
270 | // '--max-tries', 0,
271 | // '--retry-wait', 5,
272 | '--rpc-secret', secret
273 | ];
274 |
275 |
276 | let aria2Status = null;
277 | let aria2Runing = false;
278 | const startAria2 = function () {
279 | if (fs.existsSync(aria2Cli) || (os.platform() === 'win32' && fs.existsSync(aria2Cli + '.exe'))) {
280 | console.log('rpc-secret: ', secret);
281 | const worker = child_process.spawn(aria2Cli, aria2Conf);
282 |
283 | worker.stdout.on('data', function (data) {
284 | console.log(data.toString());
285 | if (data.toString().indexOf('Address already in use') >= 0) {
286 | aria2Status = {
287 | error: true,
288 | message: data.toString()
289 | }
290 | } else if (data.toString().indexOf('IPv4 RPC: listening on TCP port') >= 0) {
291 | aria2Status = {
292 | error: false,
293 | message: data.toString()
294 | }
295 | }
296 | });
297 |
298 | process.on('exit', function () {
299 | worker.killed || worker.kill();
300 | });
301 | return process
302 | }
303 | return null
304 | };
305 |
306 | ipcMain.on('get-aria2-status', function (e) {
307 | e.returnValue = aria2Status
308 | aria2Status = null
309 | });
310 |
311 | ipcMain.on('start-aria2-cli', function (e) {
312 | if (!aria2Runing) {
313 | startAria2();
314 | aria2Runing = true
315 | }
316 | e.returnValue = aria2Runing
317 | });
318 |
319 | }
320 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": "./index.html",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/public/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "aria2-desktop",
3 | "version": "0.1.6",
4 | "private": true,
5 | "main": "main.js",
6 | "author": "wapznw ",
7 | "homepage": "https://github.com/wapznw/aria2desktop",
8 | "devDependencies": {
9 | "electron": "^1.8.4"
10 | },
11 | "build": {
12 | "appId": "com.wendaojiang.aria2desktop",
13 | "asar": true,
14 | "mac": {
15 | "icon": "aria2icon.icns",
16 | "target": "dmg",
17 | "category": "Utility"
18 | },
19 | "win": {
20 | "icon": "aria2icon.ico",
21 | "target": {
22 | "target": "nsis"
23 | }
24 | },
25 | "linux": {
26 | "category": "Utility",
27 | "target": {
28 | "target": "deb"
29 | }
30 | }
31 | },
32 | "scripts": {
33 | "pack": "electron-builder --dir",
34 | "dist": "electron-builder"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/AUTHORS:
--------------------------------------------------------------------------------
1 | These are people who made lots of contributions:
2 |
3 | Tatsuhiro Tsujikawa
4 | Ross Smith II (Windows port)
5 | Nils Maier
6 |
7 | The aria2 contributor's list extracted from commit logs [1]:
8 |
9 | 103yiran
10 | Alexander Amanuel
11 | Anthony Bryan
12 | Artur Petrov
13 | Athmane Madjoudj
14 | Char
15 | Cristian Rodríguez
16 | Dan Fandrich
17 | David Macek
18 | Florian Gamböck
19 | Fredrik Fornwall
20 | ITriskTI
21 | Igor Khomyakov
22 | Jarda Snajdr
23 | JimmyZ
24 | Juan Francisco Cantero Hurtado
25 | Kcchouette
26 | Kurt Kartaltepe
27 | Michał Górny
28 | Michał Leśniewski
29 | Mingye Wang
30 | Nils Maier
31 | ORiON-
32 | ReadmeCritic
33 | Ross Smith II
34 | Ryan Steinmetz
35 | Ryo ONODERA
36 | Sarim Khan
37 | Sergey Zolotarev
38 | Sonny Piers
39 | Sébastien Cabaniols
40 | Tatsuhiro Tsujikawa
41 | Torbjörn Lönnemark
42 | Tse Kit Yam
43 | Vasilij Schneidermann
44 | Zoltan Toth-Czifra
45 | amtlib-dot-dll
46 | c3mb0
47 | diadistis
48 | geetam
49 | gilberto dos santos alves
50 | gt
51 | klemens
52 | kwkam
53 | luokar
54 | mozillazg
55 | multisnow
56 | oliviercommelarbre
57 | qweaszxcdf
58 | rotor
59 | suzker
60 |
61 | [1] https://gist.github.com/tatsuhiro-t/deaffeb064652104ad11
62 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/ChangeLog:
--------------------------------------------------------------------------------
1 | commit dd0413ee5062ffe5212655c7953c28737a5098f3 (HEAD, tag: release-1.33.1, origin/release-1.33.x, origin/HEAD, release-1.33.x)
2 | Author: Tatsuhiro Tsujikawa
3 | AuthorDate: 2017-11-08
4 | Commit: Tatsuhiro Tsujikawa
5 | CommitDate: 2017-11-08
6 |
7 | android: Update third-party libraries
8 |
9 | commit bfb8d6dcac3f2e8f7233700b014f0956857e897f
10 | Author: Tatsuhiro Tsujikawa
11 | AuthorDate: 2017-11-06
12 | Commit: Tatsuhiro Tsujikawa
13 | CommitDate: 2017-11-06
14 |
15 | Update NEWS
16 |
17 | commit b9d74ca88bb8d8c53ccbfc7e95e05f9e2a155455
18 | Author: Tatsuhiro Tsujikawa
19 | AuthorDate: 2017-11-06
20 | Commit: Tatsuhiro Tsujikawa
21 | CommitDate: 2017-11-06
22 |
23 | Bump up version number to 1.33.1
24 |
25 | commit 5b677fa7f2cc2280628d41bc1b9ea57f57e82dd0
26 | Author: Tatsuhiro Tsujikawa
27 | AuthorDate: 2017-11-05
28 | Commit: Tatsuhiro Tsujikawa
29 | CommitDate: 2017-11-06
30 |
31 | mingw: Fix high CPU usage in BitTorrent downloads
32 |
33 | This commit fixes high CPU usage in BitTorrent downloads. Only mingw
34 | build is affected by this bug.
35 |
36 | Thank you kwkam for identifying the cause of the issue, and helping
37 | debugging this patch.
38 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/LICENSE.OpenSSL:
--------------------------------------------------------------------------------
1 | Certain source files in this program permit linking with the OpenSSL
2 | library (http://www.openssl.org), which otherwise wouldn't be allowed
3 | under the GPL. For purposes of identifying OpenSSL, most source files
4 | giving this permission limit it to versions of OpenSSL having a license
5 | identical to that listed in this file (LICENSE.OpenSSL). It is not
6 | necessary for the copyright years to match between this file and the
7 | OpenSSL version in question. However, note that because this file is
8 | an extension of the license statements of these source files, this file
9 | may not be changed except with permission from all copyright holders
10 | of source files in this program which reference this file.
11 |
12 |
13 | LICENSE ISSUES
14 | ==============
15 |
16 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
17 | the OpenSSL License and the original SSLeay license apply to the toolkit.
18 | See below for the actual license texts. Actually both licenses are BSD-style
19 | Open Source licenses. In case of any license issues related to OpenSSL
20 | please contact openssl-core@openssl.org.
21 |
22 | OpenSSL License
23 | ---------------
24 |
25 | /* ====================================================================
26 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
27 | *
28 | * Redistribution and use in source and binary forms, with or without
29 | * modification, are permitted provided that the following conditions
30 | * are met:
31 | *
32 | * 1. Redistributions of source code must retain the above copyright
33 | * notice, this list of conditions and the following disclaimer.
34 | *
35 | * 2. Redistributions in binary form must reproduce the above copyright
36 | * notice, this list of conditions and the following disclaimer in
37 | * the documentation and/or other materials provided with the
38 | * distribution.
39 | *
40 | * 3. All advertising materials mentioning features or use of this
41 | * software must display the following acknowledgment:
42 | * "This product includes software developed by the OpenSSL Project
43 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
44 | *
45 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
46 | * endorse or promote products derived from this software without
47 | * prior written permission. For written permission, please contact
48 | * openssl-core@openssl.org.
49 | *
50 | * 5. Products derived from this software may not be called "OpenSSL"
51 | * nor may "OpenSSL" appear in their names without prior written
52 | * permission of the OpenSSL Project.
53 | *
54 | * 6. Redistributions of any form whatsoever must retain the following
55 | * acknowledgment:
56 | * "This product includes software developed by the OpenSSL Project
57 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
58 | *
59 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
60 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
62 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
63 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
64 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
66 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
68 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
69 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
70 | * OF THE POSSIBILITY OF SUCH DAMAGE.
71 | * ====================================================================
72 | *
73 | * This product includes cryptographic software written by Eric Young
74 | * (eay@cryptsoft.com). This product includes software written by Tim
75 | * Hudson (tjh@cryptsoft.com).
76 | *
77 | */
78 |
79 | Original SSLeay License
80 | -----------------------
81 |
82 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
83 | * All rights reserved.
84 | *
85 | * This package is an SSL implementation written
86 | * by Eric Young (eay@cryptsoft.com).
87 | * The implementation was written so as to conform with Netscapes SSL.
88 | *
89 | * This library is free for commercial and non-commercial use as long as
90 | * the following conditions are aheared to. The following conditions
91 | * apply to all code found in this distribution, be it the RC4, RSA,
92 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation
93 | * included with this distribution is covered by the same copyright terms
94 | * except that the holder is Tim Hudson (tjh@cryptsoft.com).
95 | *
96 | * Copyright remains Eric Young's, and as such any Copyright notices in
97 | * the code are not to be removed.
98 | * If this package is used in a product, Eric Young should be given attribution
99 | * as the author of the parts of the library used.
100 | * This can be in the form of a textual message at program startup or
101 | * in documentation (online or textual) provided with the package.
102 | *
103 | * Redistribution and use in source and binary forms, with or without
104 | * modification, are permitted provided that the following conditions
105 | * are met:
106 | * 1. Redistributions of source code must retain the copyright
107 | * notice, this list of conditions and the following disclaimer.
108 | * 2. Redistributions in binary form must reproduce the above copyright
109 | * notice, this list of conditions and the following disclaimer in the
110 | * documentation and/or other materials provided with the distribution.
111 | * 3. All advertising materials mentioning features or use of this software
112 | * must display the following acknowledgement:
113 | * "This product includes cryptographic software written by
114 | * Eric Young (eay@cryptsoft.com)"
115 | * The word 'cryptographic' can be left out if the rouines from the library
116 | * being used are not cryptographic related :-).
117 | * 4. If you include any Windows specific code (or a derivative thereof) from
118 | * the apps directory (application code) you must include an acknowledgement:
119 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
120 | *
121 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
122 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
123 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
124 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
125 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
126 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
127 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
128 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
129 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
130 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
131 | * SUCH DAMAGE.
132 | *
133 | * The licence and distribution terms for any publically available version or
134 | * derivative of this code cannot be changed. i.e. this code cannot simply be
135 | * copied and put under another distribution licence
136 | * [including the GNU Public Licence.]
137 | */
138 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/NEWS:
--------------------------------------------------------------------------------
1 | aria2 1.33.1
2 | ============
3 |
4 | Release Note
5 | ------------
6 |
7 | This release fixes a bug that causes high CPU usage in mingw build.
8 |
9 | Changes
10 | -------
11 |
12 | * mingw: Fix high CPU usage in BitTorrent downloads
13 |
14 | This commit fixes high CPU usage in BitTorrent downloads. Only
15 | mingw build is affected by this bug.
16 |
17 | Thank you kwkam for identifying the cause of the issue, and helping
18 | debugging this patch.
19 |
20 |
21 |
22 | aria2 1.33.0
23 | ============
24 |
25 | Release Note
26 | ------------
27 |
28 | This release fixes several bugs, and add new features.
29 |
30 | Changes
31 | -------
32 |
33 | * Include arm in a filename of android zip
34 |
35 | * Upgrade base image of Dockerfile.mingw to ubuntu:16.04
36 |
37 | * wintls: Potential fix for undecrypted read
38 |
39 | GH-1021
40 |
41 | * libaria2: Return last error code from DownloadHandle::getErrorCode
42 |
43 | GH-991
44 |
45 | * Windows: pass writefds also as exceptfds to select()
46 |
47 | winsock notifies connect() failures on exceptfds instead of
48 | writefds.
49 |
50 | Fixes GH-969
51 | Fixes GH-975
52 |
53 | * libuv: use pkg-config
54 |
55 | * FeatureConfig: align text
56 |
57 | * Update Dockerfile.mingw
58 |
59 | avoid docker cache when using git
60 |
61 | Patch from qweaszxcdf
62 |
63 | GH-970
64 |
65 | * Add --peer-agent option
66 |
67 | Add --peer-agent for setting the version/user agent used in the
68 | extended handshake protocol for bittorrent.
69 |
70 | Patch from Kurt Kartaltepe
71 |
72 | GH-947
73 |
74 | * OSX: Allow to specify a build
75 |
76 | * OSX: update c-ares
77 |
78 | * [Docs, libaria2] Fix type of obj pushed into options vector
79 |
80 | aria::KeyVals is a vector of pair of std strings, therefore the type
81 | of object being pushed should be std::pair, however in the docs, the type of the said object is
83 | KeyVals. If one follows the docs, their code will fail to compile.
84 |
85 | Patch from geetam
86 |
87 | GH-941
88 |
89 | * AppleTLS: Silence cipher suite selection
90 |
91 | * Unbreak build OSX build
92 |
93 | * Update macOS versions
94 |
95 | * Add --bt-load-saved-metadata option
96 |
97 | Before getting torrent metadata from DHT when downloading with
98 | magnet link, first try to read file saved by --bt-save-metadata
99 | option. If it is successful, then skip downloading metadata from
100 | DHT. By default, this feature is turned off.
101 |
102 | GH-909
103 |
104 | * Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93
105 |
106 | Don't save control file if --auto-save-interval is 0.
107 |
108 | GH-917
109 |
110 | * Fix infinite loop bug when file is not found
111 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/README:
--------------------------------------------------------------------------------
1 | See README.rst
2 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-linux-x64/aria2c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/res/aria2/aria2-1.33.1-linux-x64/aria2c
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/AUTHORS:
--------------------------------------------------------------------------------
1 | These are people who made lots of contributions:
2 |
3 | Tatsuhiro Tsujikawa
4 | Ross Smith II (Windows port)
5 | Nils Maier
6 |
7 | The aria2 contributor's list extracted from commit logs [1]:
8 |
9 | 103yiran
10 | Alexander Amanuel
11 | Anthony Bryan
12 | Artur Petrov
13 | Athmane Madjoudj
14 | Char
15 | Cristian Rodríguez
16 | Dan Fandrich
17 | David Macek
18 | Florian Gamböck
19 | Fredrik Fornwall
20 | ITriskTI
21 | Igor Khomyakov
22 | Jarda Snajdr
23 | JimmyZ
24 | Juan Francisco Cantero Hurtado
25 | Kcchouette
26 | Kurt Kartaltepe
27 | Michał Górny
28 | Michał Leśniewski
29 | Mingye Wang
30 | Nils Maier
31 | ORiON-
32 | ReadmeCritic
33 | Ross Smith II
34 | Ryan Steinmetz
35 | Ryo ONODERA
36 | Sarim Khan
37 | Sergey Zolotarev
38 | Sonny Piers
39 | Sébastien Cabaniols
40 | Tatsuhiro Tsujikawa
41 | Torbjörn Lönnemark
42 | Tse Kit Yam
43 | Vasilij Schneidermann
44 | Zoltan Toth-Czifra
45 | amtlib-dot-dll
46 | c3mb0
47 | diadistis
48 | geetam
49 | gilberto dos santos alves
50 | gt
51 | klemens
52 | kwkam
53 | luokar
54 | mozillazg
55 | multisnow
56 | oliviercommelarbre
57 | qweaszxcdf
58 | rotor
59 | suzker
60 |
61 | [1] https://gist.github.com/tatsuhiro-t/deaffeb064652104ad11
62 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/ChangeLog:
--------------------------------------------------------------------------------
1 | commit dd0413ee5062ffe5212655c7953c28737a5098f3 (HEAD, tag: release-1.33.1, origin/release-1.33.x, origin/HEAD, release-1.33.x)
2 | Author: Tatsuhiro Tsujikawa
3 | AuthorDate: 2017-11-08
4 | Commit: Tatsuhiro Tsujikawa
5 | CommitDate: 2017-11-08
6 |
7 | android: Update third-party libraries
8 |
9 | commit bfb8d6dcac3f2e8f7233700b014f0956857e897f
10 | Author: Tatsuhiro Tsujikawa
11 | AuthorDate: 2017-11-06
12 | Commit: Tatsuhiro Tsujikawa
13 | CommitDate: 2017-11-06
14 |
15 | Update NEWS
16 |
17 | commit b9d74ca88bb8d8c53ccbfc7e95e05f9e2a155455
18 | Author: Tatsuhiro Tsujikawa
19 | AuthorDate: 2017-11-06
20 | Commit: Tatsuhiro Tsujikawa
21 | CommitDate: 2017-11-06
22 |
23 | Bump up version number to 1.33.1
24 |
25 | commit 5b677fa7f2cc2280628d41bc1b9ea57f57e82dd0
26 | Author: Tatsuhiro Tsujikawa
27 | AuthorDate: 2017-11-05
28 | Commit: Tatsuhiro Tsujikawa
29 | CommitDate: 2017-11-06
30 |
31 | mingw: Fix high CPU usage in BitTorrent downloads
32 |
33 | This commit fixes high CPU usage in BitTorrent downloads. Only mingw
34 | build is affected by this bug.
35 |
36 | Thank you kwkam for identifying the cause of the issue, and helping
37 | debugging this patch.
38 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/LICENSE.OpenSSL:
--------------------------------------------------------------------------------
1 | Certain source files in this program permit linking with the OpenSSL
2 | library (http://www.openssl.org), which otherwise wouldn't be allowed
3 | under the GPL. For purposes of identifying OpenSSL, most source files
4 | giving this permission limit it to versions of OpenSSL having a license
5 | identical to that listed in this file (LICENSE.OpenSSL). It is not
6 | necessary for the copyright years to match between this file and the
7 | OpenSSL version in question. However, note that because this file is
8 | an extension of the license statements of these source files, this file
9 | may not be changed except with permission from all copyright holders
10 | of source files in this program which reference this file.
11 |
12 |
13 | LICENSE ISSUES
14 | ==============
15 |
16 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
17 | the OpenSSL License and the original SSLeay license apply to the toolkit.
18 | See below for the actual license texts. Actually both licenses are BSD-style
19 | Open Source licenses. In case of any license issues related to OpenSSL
20 | please contact openssl-core@openssl.org.
21 |
22 | OpenSSL License
23 | ---------------
24 |
25 | /* ====================================================================
26 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
27 | *
28 | * Redistribution and use in source and binary forms, with or without
29 | * modification, are permitted provided that the following conditions
30 | * are met:
31 | *
32 | * 1. Redistributions of source code must retain the above copyright
33 | * notice, this list of conditions and the following disclaimer.
34 | *
35 | * 2. Redistributions in binary form must reproduce the above copyright
36 | * notice, this list of conditions and the following disclaimer in
37 | * the documentation and/or other materials provided with the
38 | * distribution.
39 | *
40 | * 3. All advertising materials mentioning features or use of this
41 | * software must display the following acknowledgment:
42 | * "This product includes software developed by the OpenSSL Project
43 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
44 | *
45 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
46 | * endorse or promote products derived from this software without
47 | * prior written permission. For written permission, please contact
48 | * openssl-core@openssl.org.
49 | *
50 | * 5. Products derived from this software may not be called "OpenSSL"
51 | * nor may "OpenSSL" appear in their names without prior written
52 | * permission of the OpenSSL Project.
53 | *
54 | * 6. Redistributions of any form whatsoever must retain the following
55 | * acknowledgment:
56 | * "This product includes software developed by the OpenSSL Project
57 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
58 | *
59 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
60 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
62 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
63 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
64 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
66 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
68 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
69 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
70 | * OF THE POSSIBILITY OF SUCH DAMAGE.
71 | * ====================================================================
72 | *
73 | * This product includes cryptographic software written by Eric Young
74 | * (eay@cryptsoft.com). This product includes software written by Tim
75 | * Hudson (tjh@cryptsoft.com).
76 | *
77 | */
78 |
79 | Original SSLeay License
80 | -----------------------
81 |
82 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
83 | * All rights reserved.
84 | *
85 | * This package is an SSL implementation written
86 | * by Eric Young (eay@cryptsoft.com).
87 | * The implementation was written so as to conform with Netscapes SSL.
88 | *
89 | * This library is free for commercial and non-commercial use as long as
90 | * the following conditions are aheared to. The following conditions
91 | * apply to all code found in this distribution, be it the RC4, RSA,
92 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation
93 | * included with this distribution is covered by the same copyright terms
94 | * except that the holder is Tim Hudson (tjh@cryptsoft.com).
95 | *
96 | * Copyright remains Eric Young's, and as such any Copyright notices in
97 | * the code are not to be removed.
98 | * If this package is used in a product, Eric Young should be given attribution
99 | * as the author of the parts of the library used.
100 | * This can be in the form of a textual message at program startup or
101 | * in documentation (online or textual) provided with the package.
102 | *
103 | * Redistribution and use in source and binary forms, with or without
104 | * modification, are permitted provided that the following conditions
105 | * are met:
106 | * 1. Redistributions of source code must retain the copyright
107 | * notice, this list of conditions and the following disclaimer.
108 | * 2. Redistributions in binary form must reproduce the above copyright
109 | * notice, this list of conditions and the following disclaimer in the
110 | * documentation and/or other materials provided with the distribution.
111 | * 3. All advertising materials mentioning features or use of this software
112 | * must display the following acknowledgement:
113 | * "This product includes cryptographic software written by
114 | * Eric Young (eay@cryptsoft.com)"
115 | * The word 'cryptographic' can be left out if the rouines from the library
116 | * being used are not cryptographic related :-).
117 | * 4. If you include any Windows specific code (or a derivative thereof) from
118 | * the apps directory (application code) you must include an acknowledgement:
119 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
120 | *
121 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
122 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
123 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
124 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
125 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
126 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
127 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
128 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
129 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
130 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
131 | * SUCH DAMAGE.
132 | *
133 | * The licence and distribution terms for any publically available version or
134 | * derivative of this code cannot be changed. i.e. this code cannot simply be
135 | * copied and put under another distribution licence
136 | * [including the GNU Public Licence.]
137 | */
138 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/NEWS:
--------------------------------------------------------------------------------
1 | aria2 1.33.1
2 | ============
3 |
4 | Release Note
5 | ------------
6 |
7 | This release fixes a bug that causes high CPU usage in mingw build.
8 |
9 | Changes
10 | -------
11 |
12 | * mingw: Fix high CPU usage in BitTorrent downloads
13 |
14 | This commit fixes high CPU usage in BitTorrent downloads. Only
15 | mingw build is affected by this bug.
16 |
17 | Thank you kwkam for identifying the cause of the issue, and helping
18 | debugging this patch.
19 |
20 |
21 |
22 | aria2 1.33.0
23 | ============
24 |
25 | Release Note
26 | ------------
27 |
28 | This release fixes several bugs, and add new features.
29 |
30 | Changes
31 | -------
32 |
33 | * Include arm in a filename of android zip
34 |
35 | * Upgrade base image of Dockerfile.mingw to ubuntu:16.04
36 |
37 | * wintls: Potential fix for undecrypted read
38 |
39 | GH-1021
40 |
41 | * libaria2: Return last error code from DownloadHandle::getErrorCode
42 |
43 | GH-991
44 |
45 | * Windows: pass writefds also as exceptfds to select()
46 |
47 | winsock notifies connect() failures on exceptfds instead of
48 | writefds.
49 |
50 | Fixes GH-969
51 | Fixes GH-975
52 |
53 | * libuv: use pkg-config
54 |
55 | * FeatureConfig: align text
56 |
57 | * Update Dockerfile.mingw
58 |
59 | avoid docker cache when using git
60 |
61 | Patch from qweaszxcdf
62 |
63 | GH-970
64 |
65 | * Add --peer-agent option
66 |
67 | Add --peer-agent for setting the version/user agent used in the
68 | extended handshake protocol for bittorrent.
69 |
70 | Patch from Kurt Kartaltepe
71 |
72 | GH-947
73 |
74 | * OSX: Allow to specify a build
75 |
76 | * OSX: update c-ares
77 |
78 | * [Docs, libaria2] Fix type of obj pushed into options vector
79 |
80 | aria::KeyVals is a vector of pair of std strings, therefore the type
81 | of object being pushed should be std::pair, however in the docs, the type of the said object is
83 | KeyVals. If one follows the docs, their code will fail to compile.
84 |
85 | Patch from geetam
86 |
87 | GH-941
88 |
89 | * AppleTLS: Silence cipher suite selection
90 |
91 | * Unbreak build OSX build
92 |
93 | * Update macOS versions
94 |
95 | * Add --bt-load-saved-metadata option
96 |
97 | Before getting torrent metadata from DHT when downloading with
98 | magnet link, first try to read file saved by --bt-save-metadata
99 | option. If it is successful, then skip downloading metadata from
100 | DHT. By default, this feature is turned off.
101 |
102 | GH-909
103 |
104 | * Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93
105 |
106 | Don't save control file if --auto-save-interval is 0.
107 |
108 | GH-917
109 |
110 | * Fix infinite loop bug when file is not found
111 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/README:
--------------------------------------------------------------------------------
1 | See README.rst
2 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-mac-x64/aria2c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/res/aria2/aria2-1.33.1-mac-x64/aria2c
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/AUTHORS:
--------------------------------------------------------------------------------
1 | These are people who made lots of contributions:
2 |
3 | Tatsuhiro Tsujikawa
4 | Ross Smith II (Windows port)
5 | Nils Maier
6 |
7 | The aria2 contributor's list extracted from commit logs [1]:
8 |
9 | 103yiran
10 | Alexander Amanuel
11 | Anthony Bryan
12 | Artur Petrov
13 | Athmane Madjoudj
14 | Char
15 | Cristian Rodríguez
16 | Dan Fandrich
17 | David Macek
18 | Florian Gamböck
19 | Fredrik Fornwall
20 | ITriskTI
21 | Igor Khomyakov
22 | Jarda Snajdr
23 | JimmyZ
24 | Juan Francisco Cantero Hurtado
25 | Kcchouette
26 | Kurt Kartaltepe
27 | Michał Górny
28 | Michał Leśniewski
29 | Mingye Wang
30 | Nils Maier
31 | ORiON-
32 | ReadmeCritic
33 | Ross Smith II
34 | Ryan Steinmetz
35 | Ryo ONODERA
36 | Sarim Khan
37 | Sergey Zolotarev
38 | Sonny Piers
39 | Sébastien Cabaniols
40 | Tatsuhiro Tsujikawa
41 | Torbjörn Lönnemark
42 | Tse Kit Yam
43 | Vasilij Schneidermann
44 | Zoltan Toth-Czifra
45 | amtlib-dot-dll
46 | c3mb0
47 | diadistis
48 | geetam
49 | gilberto dos santos alves
50 | gt
51 | klemens
52 | kwkam
53 | luokar
54 | mozillazg
55 | multisnow
56 | oliviercommelarbre
57 | qweaszxcdf
58 | rotor
59 | suzker
60 |
61 | [1] https://gist.github.com/tatsuhiro-t/deaffeb064652104ad11
62 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Library General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License
307 | along with this program; if not, write to the Free Software
308 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
309 |
310 |
311 | Also add information on how to contact you by electronic and paper mail.
312 |
313 | If the program is interactive, make it output a short notice like this
314 | when it starts in an interactive mode:
315 |
316 | Gnomovision version 69, Copyright (C) year name of author
317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 | This is free software, and you are welcome to redistribute it
319 | under certain conditions; type `show c' for details.
320 |
321 | The hypothetical commands `show w' and `show c' should show the appropriate
322 | parts of the General Public License. Of course, the commands you use may
323 | be called something other than `show w' and `show c'; they could even be
324 | mouse-clicks or menu items--whatever suits your program.
325 |
326 | You should also get your employer (if you work as a programmer) or your
327 | school, if any, to sign a "copyright disclaimer" for the program, if
328 | necessary. Here is a sample; alter the names:
329 |
330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
332 |
333 | , 1 April 1989
334 | Ty Coon, President of Vice
335 |
336 | This General Public License does not permit incorporating your program into
337 | proprietary programs. If your program is a subroutine library, you may
338 | consider it more useful to permit linking proprietary applications with the
339 | library. If this is what you want to do, use the GNU Library General
340 | Public License instead of this License.
341 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/ChangeLog:
--------------------------------------------------------------------------------
1 | commit dd0413ee5062ffe5212655c7953c28737a5098f3 (HEAD, tag: release-1.33.1, origin/release-1.33.x, origin/HEAD, release-1.33.x)
2 | Author: Tatsuhiro Tsujikawa
3 | AuthorDate: 2017-11-08
4 | Commit: Tatsuhiro Tsujikawa
5 | CommitDate: 2017-11-08
6 |
7 | android: Update third-party libraries
8 |
9 | commit bfb8d6dcac3f2e8f7233700b014f0956857e897f
10 | Author: Tatsuhiro Tsujikawa
11 | AuthorDate: 2017-11-06
12 | Commit: Tatsuhiro Tsujikawa
13 | CommitDate: 2017-11-06
14 |
15 | Update NEWS
16 |
17 | commit b9d74ca88bb8d8c53ccbfc7e95e05f9e2a155455
18 | Author: Tatsuhiro Tsujikawa
19 | AuthorDate: 2017-11-06
20 | Commit: Tatsuhiro Tsujikawa
21 | CommitDate: 2017-11-06
22 |
23 | Bump up version number to 1.33.1
24 |
25 | commit 5b677fa7f2cc2280628d41bc1b9ea57f57e82dd0
26 | Author: Tatsuhiro Tsujikawa
27 | AuthorDate: 2017-11-05
28 | Commit: Tatsuhiro Tsujikawa
29 | CommitDate: 2017-11-06
30 |
31 | mingw: Fix high CPU usage in BitTorrent downloads
32 |
33 | This commit fixes high CPU usage in BitTorrent downloads. Only mingw
34 | build is affected by this bug.
35 |
36 | Thank you kwkam for identifying the cause of the issue, and helping
37 | debugging this patch.
38 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/LICENSE.OpenSSL:
--------------------------------------------------------------------------------
1 | Certain source files in this program permit linking with the OpenSSL
2 | library (http://www.openssl.org), which otherwise wouldn't be allowed
3 | under the GPL. For purposes of identifying OpenSSL, most source files
4 | giving this permission limit it to versions of OpenSSL having a license
5 | identical to that listed in this file (LICENSE.OpenSSL). It is not
6 | necessary for the copyright years to match between this file and the
7 | OpenSSL version in question. However, note that because this file is
8 | an extension of the license statements of these source files, this file
9 | may not be changed except with permission from all copyright holders
10 | of source files in this program which reference this file.
11 |
12 |
13 | LICENSE ISSUES
14 | ==============
15 |
16 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
17 | the OpenSSL License and the original SSLeay license apply to the toolkit.
18 | See below for the actual license texts. Actually both licenses are BSD-style
19 | Open Source licenses. In case of any license issues related to OpenSSL
20 | please contact openssl-core@openssl.org.
21 |
22 | OpenSSL License
23 | ---------------
24 |
25 | /* ====================================================================
26 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
27 | *
28 | * Redistribution and use in source and binary forms, with or without
29 | * modification, are permitted provided that the following conditions
30 | * are met:
31 | *
32 | * 1. Redistributions of source code must retain the above copyright
33 | * notice, this list of conditions and the following disclaimer.
34 | *
35 | * 2. Redistributions in binary form must reproduce the above copyright
36 | * notice, this list of conditions and the following disclaimer in
37 | * the documentation and/or other materials provided with the
38 | * distribution.
39 | *
40 | * 3. All advertising materials mentioning features or use of this
41 | * software must display the following acknowledgment:
42 | * "This product includes software developed by the OpenSSL Project
43 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
44 | *
45 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
46 | * endorse or promote products derived from this software without
47 | * prior written permission. For written permission, please contact
48 | * openssl-core@openssl.org.
49 | *
50 | * 5. Products derived from this software may not be called "OpenSSL"
51 | * nor may "OpenSSL" appear in their names without prior written
52 | * permission of the OpenSSL Project.
53 | *
54 | * 6. Redistributions of any form whatsoever must retain the following
55 | * acknowledgment:
56 | * "This product includes software developed by the OpenSSL Project
57 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
58 | *
59 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
60 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
62 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
63 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
64 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
66 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
68 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
69 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
70 | * OF THE POSSIBILITY OF SUCH DAMAGE.
71 | * ====================================================================
72 | *
73 | * This product includes cryptographic software written by Eric Young
74 | * (eay@cryptsoft.com). This product includes software written by Tim
75 | * Hudson (tjh@cryptsoft.com).
76 | *
77 | */
78 |
79 | Original SSLeay License
80 | -----------------------
81 |
82 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
83 | * All rights reserved.
84 | *
85 | * This package is an SSL implementation written
86 | * by Eric Young (eay@cryptsoft.com).
87 | * The implementation was written so as to conform with Netscapes SSL.
88 | *
89 | * This library is free for commercial and non-commercial use as long as
90 | * the following conditions are aheared to. The following conditions
91 | * apply to all code found in this distribution, be it the RC4, RSA,
92 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation
93 | * included with this distribution is covered by the same copyright terms
94 | * except that the holder is Tim Hudson (tjh@cryptsoft.com).
95 | *
96 | * Copyright remains Eric Young's, and as such any Copyright notices in
97 | * the code are not to be removed.
98 | * If this package is used in a product, Eric Young should be given attribution
99 | * as the author of the parts of the library used.
100 | * This can be in the form of a textual message at program startup or
101 | * in documentation (online or textual) provided with the package.
102 | *
103 | * Redistribution and use in source and binary forms, with or without
104 | * modification, are permitted provided that the following conditions
105 | * are met:
106 | * 1. Redistributions of source code must retain the copyright
107 | * notice, this list of conditions and the following disclaimer.
108 | * 2. Redistributions in binary form must reproduce the above copyright
109 | * notice, this list of conditions and the following disclaimer in the
110 | * documentation and/or other materials provided with the distribution.
111 | * 3. All advertising materials mentioning features or use of this software
112 | * must display the following acknowledgement:
113 | * "This product includes cryptographic software written by
114 | * Eric Young (eay@cryptsoft.com)"
115 | * The word 'cryptographic' can be left out if the rouines from the library
116 | * being used are not cryptographic related :-).
117 | * 4. If you include any Windows specific code (or a derivative thereof) from
118 | * the apps directory (application code) you must include an acknowledgement:
119 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
120 | *
121 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
122 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
123 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
124 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
125 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
126 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
127 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
128 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
129 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
130 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
131 | * SUCH DAMAGE.
132 | *
133 | * The licence and distribution terms for any publically available version or
134 | * derivative of this code cannot be changed. i.e. this code cannot simply be
135 | * copied and put under another distribution licence
136 | * [including the GNU Public Licence.]
137 | */
138 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/NEWS:
--------------------------------------------------------------------------------
1 | aria2 1.33.1
2 | ============
3 |
4 | Release Note
5 | ------------
6 |
7 | This release fixes a bug that causes high CPU usage in mingw build.
8 |
9 | Changes
10 | -------
11 |
12 | * mingw: Fix high CPU usage in BitTorrent downloads
13 |
14 | This commit fixes high CPU usage in BitTorrent downloads. Only
15 | mingw build is affected by this bug.
16 |
17 | Thank you kwkam for identifying the cause of the issue, and helping
18 | debugging this patch.
19 |
20 |
21 |
22 | aria2 1.33.0
23 | ============
24 |
25 | Release Note
26 | ------------
27 |
28 | This release fixes several bugs, and add new features.
29 |
30 | Changes
31 | -------
32 |
33 | * Include arm in a filename of android zip
34 |
35 | * Upgrade base image of Dockerfile.mingw to ubuntu:16.04
36 |
37 | * wintls: Potential fix for undecrypted read
38 |
39 | GH-1021
40 |
41 | * libaria2: Return last error code from DownloadHandle::getErrorCode
42 |
43 | GH-991
44 |
45 | * Windows: pass writefds also as exceptfds to select()
46 |
47 | winsock notifies connect() failures on exceptfds instead of
48 | writefds.
49 |
50 | Fixes GH-969
51 | Fixes GH-975
52 |
53 | * libuv: use pkg-config
54 |
55 | * FeatureConfig: align text
56 |
57 | * Update Dockerfile.mingw
58 |
59 | avoid docker cache when using git
60 |
61 | Patch from qweaszxcdf
62 |
63 | GH-970
64 |
65 | * Add --peer-agent option
66 |
67 | Add --peer-agent for setting the version/user agent used in the
68 | extended handshake protocol for bittorrent.
69 |
70 | Patch from Kurt Kartaltepe
71 |
72 | GH-947
73 |
74 | * OSX: Allow to specify a build
75 |
76 | * OSX: update c-ares
77 |
78 | * [Docs, libaria2] Fix type of obj pushed into options vector
79 |
80 | aria::KeyVals is a vector of pair of std strings, therefore the type
81 | of object being pushed should be std::pair, however in the docs, the type of the said object is
83 | KeyVals. If one follows the docs, their code will fail to compile.
84 |
85 | Patch from geetam
86 |
87 | GH-941
88 |
89 | * AppleTLS: Silence cipher suite selection
90 |
91 | * Unbreak build OSX build
92 |
93 | * Update macOS versions
94 |
95 | * Add --bt-load-saved-metadata option
96 |
97 | Before getting torrent metadata from DHT when downloading with
98 | magnet link, first try to read file saved by --bt-save-metadata
99 | option. If it is successful, then skip downloading metadata from
100 | DHT. By default, this feature is turned off.
101 |
102 | GH-909
103 |
104 | * Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93
105 |
106 | Don't save control file if --auto-save-interval is 0.
107 |
108 | GH-917
109 |
110 | * Fix infinite loop bug when file is not found
111 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/README.mingw:
--------------------------------------------------------------------------------
1 | aria2 Windows build
2 | ===================
3 |
4 | aria2 Windows build is provided in 2 flavors: 32bit version and 64bit
5 | version. The executable was compiled using mingw-w64 cross compiler on
6 | Debian Linux.
7 |
8 | * gcc-mingw-w64 6.3.0-14+19.3
9 | * binutils-mingw-w64-i686 2.28-5+7.4+b4
10 | * binutils-mingw-w64-x86-64 2.28-5+7.4+b4
11 |
12 | The executable is statically linked, so no extra DLLs are
13 | necessary. The linked libraries are:
14 |
15 | * gmp 6.1.2
16 | * expat 2.2.4
17 | * sqlite 3.20.1
18 | * zlib 1.2.11
19 | * c-ares 1.13.0
20 | * libssh2 1.8.0
21 |
22 | This build has the following difference from the original release:
23 |
24 | * 32bit version only: ``--disable-ipv6`` is enabled by default. (In
25 | other words, IPv6 support is disabled by default).
26 |
27 | Known Issues
28 | ------------
29 |
30 | * --file-allocation=falloc uses SetFileValidData function to allocate
31 | disk space without filling zero. But it has security
32 | implications. Refer to
33 | https://msdn.microsoft.com/en-us/library/windows/desktop/aa365544%28v=vs.85%29.aspx
34 | for more details.
35 |
36 | * When Ctrl-C is pressed, aria2 shows "Shutdown sequence
37 | commencing... Press Ctrl-C again for emergency shutdown." But
38 | mingw32 build cannot handle second Ctrl-C properly. The second
39 | Ctrl-C just kills aria2 instantly without proper shutdown sequence
40 | and you may lose data. So don't press Ctrl-C twice.
41 |
42 | * --daemon option doesn't work.
43 |
44 | * 32bit version only: When ``--disable-ipv6=false`` is given,
45 | BitTorrent DHT may not work properly.
46 |
47 | * 32bit version only: Most of the IPv6 functionality does not work
48 | even if ``--disable-ipv6=false`` is given.
49 |
50 | References
51 | ----------
52 |
53 | * http://smithii.com/aria2
54 | * http://kemovitra.blogspot.com/2009/12/download-aria2-163.html
55 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-ia32/aria2c.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/res/aria2/aria2-1.33.1-win-ia32/aria2c.exe
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/AUTHORS:
--------------------------------------------------------------------------------
1 | These are people who made lots of contributions:
2 |
3 | Tatsuhiro Tsujikawa
4 | Ross Smith II (Windows port)
5 | Nils Maier
6 |
7 | The aria2 contributor's list extracted from commit logs [1]:
8 |
9 | 103yiran
10 | Alexander Amanuel
11 | Anthony Bryan
12 | Artur Petrov
13 | Athmane Madjoudj
14 | Char
15 | Cristian Rodríguez
16 | Dan Fandrich
17 | David Macek
18 | Florian Gamböck
19 | Fredrik Fornwall
20 | ITriskTI
21 | Igor Khomyakov
22 | Jarda Snajdr
23 | JimmyZ
24 | Juan Francisco Cantero Hurtado
25 | Kcchouette
26 | Kurt Kartaltepe
27 | Michał Górny
28 | Michał Leśniewski
29 | Mingye Wang
30 | Nils Maier
31 | ORiON-
32 | ReadmeCritic
33 | Ross Smith II
34 | Ryan Steinmetz
35 | Ryo ONODERA
36 | Sarim Khan
37 | Sergey Zolotarev
38 | Sonny Piers
39 | Sébastien Cabaniols
40 | Tatsuhiro Tsujikawa
41 | Torbjörn Lönnemark
42 | Tse Kit Yam
43 | Vasilij Schneidermann
44 | Zoltan Toth-Czifra
45 | amtlib-dot-dll
46 | c3mb0
47 | diadistis
48 | geetam
49 | gilberto dos santos alves
50 | gt
51 | klemens
52 | kwkam
53 | luokar
54 | mozillazg
55 | multisnow
56 | oliviercommelarbre
57 | qweaszxcdf
58 | rotor
59 | suzker
60 |
61 | [1] https://gist.github.com/tatsuhiro-t/deaffeb064652104ad11
62 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/COPYING:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Library General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License
307 | along with this program; if not, write to the Free Software
308 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
309 |
310 |
311 | Also add information on how to contact you by electronic and paper mail.
312 |
313 | If the program is interactive, make it output a short notice like this
314 | when it starts in an interactive mode:
315 |
316 | Gnomovision version 69, Copyright (C) year name of author
317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 | This is free software, and you are welcome to redistribute it
319 | under certain conditions; type `show c' for details.
320 |
321 | The hypothetical commands `show w' and `show c' should show the appropriate
322 | parts of the General Public License. Of course, the commands you use may
323 | be called something other than `show w' and `show c'; they could even be
324 | mouse-clicks or menu items--whatever suits your program.
325 |
326 | You should also get your employer (if you work as a programmer) or your
327 | school, if any, to sign a "copyright disclaimer" for the program, if
328 | necessary. Here is a sample; alter the names:
329 |
330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
332 |
333 | , 1 April 1989
334 | Ty Coon, President of Vice
335 |
336 | This General Public License does not permit incorporating your program into
337 | proprietary programs. If your program is a subroutine library, you may
338 | consider it more useful to permit linking proprietary applications with the
339 | library. If this is what you want to do, use the GNU Library General
340 | Public License instead of this License.
341 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/ChangeLog:
--------------------------------------------------------------------------------
1 | commit dd0413ee5062ffe5212655c7953c28737a5098f3 (HEAD, tag: release-1.33.1, origin/release-1.33.x, origin/HEAD, release-1.33.x)
2 | Author: Tatsuhiro Tsujikawa
3 | AuthorDate: 2017-11-08
4 | Commit: Tatsuhiro Tsujikawa
5 | CommitDate: 2017-11-08
6 |
7 | android: Update third-party libraries
8 |
9 | commit bfb8d6dcac3f2e8f7233700b014f0956857e897f
10 | Author: Tatsuhiro Tsujikawa
11 | AuthorDate: 2017-11-06
12 | Commit: Tatsuhiro Tsujikawa
13 | CommitDate: 2017-11-06
14 |
15 | Update NEWS
16 |
17 | commit b9d74ca88bb8d8c53ccbfc7e95e05f9e2a155455
18 | Author: Tatsuhiro Tsujikawa
19 | AuthorDate: 2017-11-06
20 | Commit: Tatsuhiro Tsujikawa
21 | CommitDate: 2017-11-06
22 |
23 | Bump up version number to 1.33.1
24 |
25 | commit 5b677fa7f2cc2280628d41bc1b9ea57f57e82dd0
26 | Author: Tatsuhiro Tsujikawa
27 | AuthorDate: 2017-11-05
28 | Commit: Tatsuhiro Tsujikawa
29 | CommitDate: 2017-11-06
30 |
31 | mingw: Fix high CPU usage in BitTorrent downloads
32 |
33 | This commit fixes high CPU usage in BitTorrent downloads. Only mingw
34 | build is affected by this bug.
35 |
36 | Thank you kwkam for identifying the cause of the issue, and helping
37 | debugging this patch.
38 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/LICENSE.OpenSSL:
--------------------------------------------------------------------------------
1 | Certain source files in this program permit linking with the OpenSSL
2 | library (http://www.openssl.org), which otherwise wouldn't be allowed
3 | under the GPL. For purposes of identifying OpenSSL, most source files
4 | giving this permission limit it to versions of OpenSSL having a license
5 | identical to that listed in this file (LICENSE.OpenSSL). It is not
6 | necessary for the copyright years to match between this file and the
7 | OpenSSL version in question. However, note that because this file is
8 | an extension of the license statements of these source files, this file
9 | may not be changed except with permission from all copyright holders
10 | of source files in this program which reference this file.
11 |
12 |
13 | LICENSE ISSUES
14 | ==============
15 |
16 | The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
17 | the OpenSSL License and the original SSLeay license apply to the toolkit.
18 | See below for the actual license texts. Actually both licenses are BSD-style
19 | Open Source licenses. In case of any license issues related to OpenSSL
20 | please contact openssl-core@openssl.org.
21 |
22 | OpenSSL License
23 | ---------------
24 |
25 | /* ====================================================================
26 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
27 | *
28 | * Redistribution and use in source and binary forms, with or without
29 | * modification, are permitted provided that the following conditions
30 | * are met:
31 | *
32 | * 1. Redistributions of source code must retain the above copyright
33 | * notice, this list of conditions and the following disclaimer.
34 | *
35 | * 2. Redistributions in binary form must reproduce the above copyright
36 | * notice, this list of conditions and the following disclaimer in
37 | * the documentation and/or other materials provided with the
38 | * distribution.
39 | *
40 | * 3. All advertising materials mentioning features or use of this
41 | * software must display the following acknowledgment:
42 | * "This product includes software developed by the OpenSSL Project
43 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
44 | *
45 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
46 | * endorse or promote products derived from this software without
47 | * prior written permission. For written permission, please contact
48 | * openssl-core@openssl.org.
49 | *
50 | * 5. Products derived from this software may not be called "OpenSSL"
51 | * nor may "OpenSSL" appear in their names without prior written
52 | * permission of the OpenSSL Project.
53 | *
54 | * 6. Redistributions of any form whatsoever must retain the following
55 | * acknowledgment:
56 | * "This product includes software developed by the OpenSSL Project
57 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
58 | *
59 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
60 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
61 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
62 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
63 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
64 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
65 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
66 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
68 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
69 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
70 | * OF THE POSSIBILITY OF SUCH DAMAGE.
71 | * ====================================================================
72 | *
73 | * This product includes cryptographic software written by Eric Young
74 | * (eay@cryptsoft.com). This product includes software written by Tim
75 | * Hudson (tjh@cryptsoft.com).
76 | *
77 | */
78 |
79 | Original SSLeay License
80 | -----------------------
81 |
82 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
83 | * All rights reserved.
84 | *
85 | * This package is an SSL implementation written
86 | * by Eric Young (eay@cryptsoft.com).
87 | * The implementation was written so as to conform with Netscapes SSL.
88 | *
89 | * This library is free for commercial and non-commercial use as long as
90 | * the following conditions are aheared to. The following conditions
91 | * apply to all code found in this distribution, be it the RC4, RSA,
92 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation
93 | * included with this distribution is covered by the same copyright terms
94 | * except that the holder is Tim Hudson (tjh@cryptsoft.com).
95 | *
96 | * Copyright remains Eric Young's, and as such any Copyright notices in
97 | * the code are not to be removed.
98 | * If this package is used in a product, Eric Young should be given attribution
99 | * as the author of the parts of the library used.
100 | * This can be in the form of a textual message at program startup or
101 | * in documentation (online or textual) provided with the package.
102 | *
103 | * Redistribution and use in source and binary forms, with or without
104 | * modification, are permitted provided that the following conditions
105 | * are met:
106 | * 1. Redistributions of source code must retain the copyright
107 | * notice, this list of conditions and the following disclaimer.
108 | * 2. Redistributions in binary form must reproduce the above copyright
109 | * notice, this list of conditions and the following disclaimer in the
110 | * documentation and/or other materials provided with the distribution.
111 | * 3. All advertising materials mentioning features or use of this software
112 | * must display the following acknowledgement:
113 | * "This product includes cryptographic software written by
114 | * Eric Young (eay@cryptsoft.com)"
115 | * The word 'cryptographic' can be left out if the rouines from the library
116 | * being used are not cryptographic related :-).
117 | * 4. If you include any Windows specific code (or a derivative thereof) from
118 | * the apps directory (application code) you must include an acknowledgement:
119 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
120 | *
121 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
122 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
123 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
124 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
125 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
126 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
127 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
128 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
129 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
130 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
131 | * SUCH DAMAGE.
132 | *
133 | * The licence and distribution terms for any publically available version or
134 | * derivative of this code cannot be changed. i.e. this code cannot simply be
135 | * copied and put under another distribution licence
136 | * [including the GNU Public Licence.]
137 | */
138 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/NEWS:
--------------------------------------------------------------------------------
1 | aria2 1.33.1
2 | ============
3 |
4 | Release Note
5 | ------------
6 |
7 | This release fixes a bug that causes high CPU usage in mingw build.
8 |
9 | Changes
10 | -------
11 |
12 | * mingw: Fix high CPU usage in BitTorrent downloads
13 |
14 | This commit fixes high CPU usage in BitTorrent downloads. Only
15 | mingw build is affected by this bug.
16 |
17 | Thank you kwkam for identifying the cause of the issue, and helping
18 | debugging this patch.
19 |
20 |
21 |
22 | aria2 1.33.0
23 | ============
24 |
25 | Release Note
26 | ------------
27 |
28 | This release fixes several bugs, and add new features.
29 |
30 | Changes
31 | -------
32 |
33 | * Include arm in a filename of android zip
34 |
35 | * Upgrade base image of Dockerfile.mingw to ubuntu:16.04
36 |
37 | * wintls: Potential fix for undecrypted read
38 |
39 | GH-1021
40 |
41 | * libaria2: Return last error code from DownloadHandle::getErrorCode
42 |
43 | GH-991
44 |
45 | * Windows: pass writefds also as exceptfds to select()
46 |
47 | winsock notifies connect() failures on exceptfds instead of
48 | writefds.
49 |
50 | Fixes GH-969
51 | Fixes GH-975
52 |
53 | * libuv: use pkg-config
54 |
55 | * FeatureConfig: align text
56 |
57 | * Update Dockerfile.mingw
58 |
59 | avoid docker cache when using git
60 |
61 | Patch from qweaszxcdf
62 |
63 | GH-970
64 |
65 | * Add --peer-agent option
66 |
67 | Add --peer-agent for setting the version/user agent used in the
68 | extended handshake protocol for bittorrent.
69 |
70 | Patch from Kurt Kartaltepe
71 |
72 | GH-947
73 |
74 | * OSX: Allow to specify a build
75 |
76 | * OSX: update c-ares
77 |
78 | * [Docs, libaria2] Fix type of obj pushed into options vector
79 |
80 | aria::KeyVals is a vector of pair of std strings, therefore the type
81 | of object being pushed should be std::pair, however in the docs, the type of the said object is
83 | KeyVals. If one follows the docs, their code will fail to compile.
84 |
85 | Patch from geetam
86 |
87 | GH-941
88 |
89 | * AppleTLS: Silence cipher suite selection
90 |
91 | * Unbreak build OSX build
92 |
93 | * Update macOS versions
94 |
95 | * Add --bt-load-saved-metadata option
96 |
97 | Before getting torrent metadata from DHT when downloading with
98 | magnet link, first try to read file saved by --bt-save-metadata
99 | option. If it is successful, then skip downloading metadata from
100 | DHT. By default, this feature is turned off.
101 |
102 | GH-909
103 |
104 | * Fix regression in bfc54d0b9a694e5d87efd8ed11b5393bc4b66f93
105 |
106 | Don't save control file if --auto-save-interval is 0.
107 |
108 | GH-917
109 |
110 | * Fix infinite loop bug when file is not found
111 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/README.mingw:
--------------------------------------------------------------------------------
1 | aria2 Windows build
2 | ===================
3 |
4 | aria2 Windows build is provided in 2 flavors: 32bit version and 64bit
5 | version. The executable was compiled using mingw-w64 cross compiler on
6 | Debian Linux.
7 |
8 | * gcc-mingw-w64 6.3.0-14+19.3
9 | * binutils-mingw-w64-i686 2.28-5+7.4+b4
10 | * binutils-mingw-w64-x86-64 2.28-5+7.4+b4
11 |
12 | The executable is statically linked, so no extra DLLs are
13 | necessary. The linked libraries are:
14 |
15 | * gmp 6.1.2
16 | * expat 2.2.4
17 | * sqlite 3.20.1
18 | * zlib 1.2.11
19 | * c-ares 1.13.0
20 | * libssh2 1.8.0
21 |
22 | This build has the following difference from the original release:
23 |
24 | * 32bit version only: ``--disable-ipv6`` is enabled by default. (In
25 | other words, IPv6 support is disabled by default).
26 |
27 | Known Issues
28 | ------------
29 |
30 | * --file-allocation=falloc uses SetFileValidData function to allocate
31 | disk space without filling zero. But it has security
32 | implications. Refer to
33 | https://msdn.microsoft.com/en-us/library/windows/desktop/aa365544%28v=vs.85%29.aspx
34 | for more details.
35 |
36 | * When Ctrl-C is pressed, aria2 shows "Shutdown sequence
37 | commencing... Press Ctrl-C again for emergency shutdown." But
38 | mingw32 build cannot handle second Ctrl-C properly. The second
39 | Ctrl-C just kills aria2 instantly without proper shutdown sequence
40 | and you may lose data. So don't press Ctrl-C twice.
41 |
42 | * --daemon option doesn't work.
43 |
44 | * 32bit version only: When ``--disable-ipv6=false`` is given,
45 | BitTorrent DHT may not work properly.
46 |
47 | * 32bit version only: Most of the IPv6 functionality does not work
48 | even if ``--disable-ipv6=false`` is given.
49 |
50 | References
51 | ----------
52 |
53 | * http://smithii.com/aria2
54 | * http://kemovitra.blogspot.com/2009/12/download-aria2-163.html
55 |
--------------------------------------------------------------------------------
/res/aria2/aria2-1.33.1-win-x64/aria2c.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/res/aria2/aria2-1.33.1-win-x64/aria2c.exe
--------------------------------------------------------------------------------
/screenshot/WX20180408-172402.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172402.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172436.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172436.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172453.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172453.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172503.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172503.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172615.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172615.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172905.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172905.png
--------------------------------------------------------------------------------
/screenshot/WX20180408-172938.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/WX20180408-172938.png
--------------------------------------------------------------------------------
/screenshot/ubuntu-22B2E901F8BA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/ubuntu-22B2E901F8BA.png
--------------------------------------------------------------------------------
/screenshot/windows10-aria2desktop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wapznw/aria2desktop/eccc619013583f0ded88f8040d1f0893f64c1efd/screenshot/windows10-aria2desktop.png
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | #root {
2 | height: 100%;
3 | }
4 |
5 | .darg-move-window {
6 | /*noinspection CssUnknownProperty*/
7 | -webkit-app-region: drag
8 | }
9 |
10 | button, a, input {
11 | /*noinspection CssUnknownProperty*/
12 | -webkit-app-region: no-drag;
13 | }
14 |
15 | .device-electron-show {
16 | display: none;
17 | }
18 |
19 | .device-electron .device-electron-show {
20 | display: initial;
21 | }
22 |
23 | .server-is-remote .server-remote-hide {
24 | display: none;
25 | }
26 |
27 | .header-toolbar {
28 | display: flex;
29 | align-items: center;
30 | }
31 |
32 | .header-toolbar .resize-window {
33 | visibility: hidden;
34 | }
35 |
36 | .window-control {
37 | position: absolute;
38 | right: 5px;
39 | display: flex;
40 | align-items: center;
41 | justify-content: center;
42 | visibility: hidden;
43 | }
44 |
45 | .device-web .window-control {
46 | right: 15px;
47 | }
48 |
49 | .window-control button {
50 | border: 0;
51 | background-color: transparent;
52 | padding: 0 7px;
53 | height: 26px;
54 | line-height: 26px;
55 | cursor: pointer;
56 | outline-style: none;
57 | }
58 |
59 | .window-control button:hover,
60 | .window-control button:active,
61 | .window-control button:focus {
62 | background-color: transparent;
63 | }
64 |
65 | .device-electron.device-linux .window-control,
66 | .device-electron.device-windows .window-control,
67 | .device-web .window-control{
68 | visibility: visible;
69 | }
70 |
71 | @media all and (min-width: 1000px) {
72 | .device-web #root {
73 | display: flex;
74 | background: #cae5dc;
75 | }
76 |
77 | .device-web .App.ant-layout {
78 | max-width: 900px;
79 | height: 600px;
80 | margin: auto;
81 | border-radius: 6px;
82 | box-shadow: 0 35px 56px rgba(0, 0, 0, .3);
83 | }
84 |
85 | .device-web .header-toolbar {
86 | position: relative;
87 | }
88 |
89 | .device-web .header-toolbar .resize-window {
90 | position: absolute;
91 | right: 14px;
92 | color: #595959;
93 | visibility: visible;
94 | }
95 |
96 | .device-web.device-fullscreen .App.ant-layout {
97 | max-width: 100%;
98 | height: 100%;
99 | margin: auto;
100 | border-radius: 0;
101 | }
102 | }
103 |
104 | .App, .ant-layout {
105 | height: 100%;
106 | background: #ffffff;
107 | overflow: hidden;
108 | }
109 |
110 | .ant-layout-sider,
111 | .ant-menu-dark,
112 | .ant-menu-dark .ant-menu-sub {
113 | background-color: #32373f;
114 | }
115 |
116 | .userInfo {
117 | padding: 20px 0 10px 0px;
118 | color: white;
119 | display: flex;
120 | align-items: center;
121 | justify-content: center;
122 | }
123 |
124 | .device-macOs.device-electron .userInfo {
125 | padding: 40px 0 10px 20px;
126 | }
127 |
128 | .userName {
129 | line-height: 1.2;
130 | margin-left: 4px;
131 | color: white;
132 | max-width: 100px;
133 | white-space: nowrap;
134 | overflow: hidden;
135 | margin-top: 2px;
136 | }
137 |
138 | .userName .ant-dropdown-trigger {
139 | min-width: 70px;
140 | display: flex;
141 | justify-content: space-between;
142 | cursor: pointer;
143 | }
144 |
145 | .userName .ant-badge-status-text {
146 | color: white;
147 | font-size: 12px;
148 | max-width: 90px;
149 | }
150 |
151 | .userVip {
152 | background-color: #da5444;
153 | display: inline-block;
154 | padding: 0 3px;
155 | border-radius: 3px;
156 | font-style: italic;
157 | font-size: 10px;
158 | max-width: 90px;
159 | white-space: nowrap;
160 | overflow: hidden;
161 | margin-top: 2px;
162 | }
163 |
164 | .userVip.success {
165 | background-color: #52c41a;
166 | }
167 |
168 | .header-title {
169 | height: 30px;
170 | line-height: 30px;
171 | text-align: center;
172 | background-color: #e7e7e7;
173 | }
174 |
175 | .header-toolbar {
176 | background-color: #f7f7f7;
177 | height: 44px;
178 | line-height: 44px;
179 | padding: 0 0 0 20px;
180 | border-bottom: 1px #ddd solid;
181 | }
182 |
183 | .ant-list.ant-list-split {
184 | background-color: #ffffff;
185 | }
186 |
187 | .ant-list-item-content {
188 | justify-content: space-between;
189 | flex: initial;
190 | width: 260px;
191 | align-items: center;
192 | user-select: none;
193 | -webkit-user-select: none;
194 | }
195 |
196 | .ant-list-item-meta-description,
197 | .ant-layout-sider-children {
198 | user-select: none;
199 | -webkit-user-select: none;
200 | }
201 |
202 | .ant-menu.ant-menu-dark .ant-menu-item-selected,
203 | .ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected {
204 | background-color: #ffffff;
205 | color: #666666;
206 | }
207 |
208 | .ant-layout-content {
209 | overflow: auto;
210 | background-color: #f7f7f7;
211 | flex: 1;
212 | }
213 |
214 | .newTaskDialog {
215 |
216 | }
217 |
218 | .newTaskDialog .ant-modal-footer {
219 | padding: 10px 0px 0;
220 | }
221 |
222 | .newTaskDialog .ant-modal-close-x {
223 | width: 40px;
224 | height: 40px;
225 | line-height: 40px;
226 | font-size: 16px;
227 | }
228 |
229 | .newTaskDialog .ant-modal-body {
230 | padding: 10px;
231 | background-color: #f7f7f7;
232 | }
233 |
234 | .newTaskDialog .ant-modal-body textarea {
235 | resize: none;
236 | }
237 |
238 | .newTaskDialog .ant-modal-header {
239 | padding: 10px 12px;
240 | }
241 |
242 | .newTaskDialog .ant-modal-title {
243 | font-size: 14px;
244 | line-height: 18px;
245 | }
246 |
247 | @keyframes App-logo-spin {
248 | from {
249 | transform: rotate(0deg);
250 | }
251 | to {
252 | transform: rotate(360deg);
253 | }
254 | }
255 |
256 | /* 下载详情card */
257 | .download-item-details-card .ant-card-wider-padding .ant-card-body,
258 | .download-item-details-card .ant-card-body {
259 | padding: 0;
260 | }
261 |
262 | .download-item-details-card .ant-card-head {
263 | min-height: 35px;
264 | padding: 0 10px;
265 | user-select: none;
266 | -webkit-user-select: none;
267 | }
268 |
269 | .download-item-details-card .ant-tabs-large .ant-tabs-tab {
270 | padding: 6px;
271 | }
272 |
273 | .download-item-details-card .ant-card-grid {
274 | overflow: hidden;
275 | word-break: break-word;
276 | white-space: nowrap;
277 | text-overflow: ellipsis;
278 | }
279 |
280 | .download-item-details-card .ant-card-grid:hover {
281 | box-shadow: none;
282 | }
283 |
284 | /* 设置界面 */
285 | .Setting .ant-list-item-content {
286 | width: auto;
287 | }
288 |
289 | .Setting .ant-card-body {
290 | padding: 1px 0px;
291 | }
292 |
293 | .Setting .ant-card-head {
294 | padding: 0;
295 | min-height: initial;
296 | }
297 |
298 | .Setting .ant-list-item {
299 | padding: 5px;
300 | }
301 |
302 | .Setting .ant-card-head-title {
303 | padding: 0;
304 | }
305 |
306 | .Setting .ant-card-extra {
307 | padding: 0;
308 | }
309 |
310 | .SettingModal .ant-modal-close-x {
311 | width: 40px;
312 | height: 40px;
313 | line-height: 40px;
314 | font-size: 16px;
315 | }
316 |
317 | .SettingModal .ant-modal-body {
318 | padding: 10px;
319 | background-color: #f7f7f7;
320 | }
321 |
322 | .SettingModal .ant-modal-header {
323 | padding: 10px 12px;
324 | }
325 |
326 | .SettingModal .ant-modal-title {
327 | font-size: 14px;
328 | line-height: 18px;
329 | }
330 |
331 | .SettingModal .ant-modal-body {
332 | padding: 5px 24px;
333 | }
334 |
335 | .SettingModal .ant-form-item {
336 | margin-bottom: 0;
337 | }
338 |
339 | .Setting .ant-btn-group > .ant-btn {
340 | line-height: 1;
341 | }
342 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React, {Component} from 'react';
2 | import {Layout, message, notification} from 'antd';
3 | import Aria2Client from './aria2client'
4 | import device from './device'
5 |
6 | import LeftSider from './components/LeftSider'
7 | import DownloadView from './components/DownloadView'
8 | import SettingView from './components/SettingView'
9 |
10 | import './App.css';
11 | import {eventBus, getStorage, setStorage} from "./utils";
12 | import {getDownloadSaveDir, isRemoteServer, setDownloadSaveDir} from "./aria2utils";
13 |
14 | const {ipcRenderer} = window.require('electron')
15 |
16 | const defaultServer = {
17 | id: 1,
18 | title: '本地默认',
19 | host: '127.0.0.1',
20 | port: 6800,
21 | secure: false,
22 | secret: window.location.hash.split('#')[1]
23 | };
24 | setStorage('ARIA2_LOCAL_SERVER', defaultServer);
25 | let conf = getStorage('ARIA2_SERVER');
26 | if (conf) {
27 | if (conf.id === 1) {
28 | conf = defaultServer;
29 | setStorage('ARIA2_SERVER', defaultServer)
30 | }
31 | } else {
32 | conf = defaultServer
33 | }
34 |
35 | const checkAria2Status = function () {
36 | const status = ipcRenderer.sendSync('get-aria2-status')
37 | if (status && status.error) {
38 | const r = /failed to bind TCP port\s+([\d]+)/
39 | const m = status.message.match(r)
40 | if (m && m[1]) {
41 | notification.error({
42 | message: 'Aria2启动失败',
43 | description: m[0]
44 | })
45 | }
46 | } else if (status) {
47 | const r = /listening on TCP port\s+(\d+)/
48 | const m = status.message.match(r)
49 | if (m && m[1]) {
50 | notification.success({
51 | message: 'Aria2启动成功',
52 | description: m[0]
53 | })
54 | }
55 | }
56 | }
57 |
58 | class App extends Component {
59 |
60 | state = {
61 | actives: [],
62 | waitings: [],
63 | stopped: [],
64 | menu: 'active',
65 | online: false,
66 | isRemoteServer: isRemoteServer()
67 | };
68 |
69 | constructor(props){
70 | super(props);
71 |
72 | if (device.electron) {
73 | let enableAria2 = getStorage('enableAria2')
74 | if (enableAria2 || enableAria2 === null){
75 | ipcRenderer.sendSync('start-aria2-cli')
76 | }
77 | checkAria2Status()
78 | }
79 |
80 | this.aria2 = new Aria2Client({
81 | ...conf,
82 | onRefresh: (data) => {
83 | this.setState({
84 | ...data
85 | })
86 | }
87 | });
88 |
89 | this.aria2.onConnect = async () => {
90 | this.aria2.getGlobalOption().then(config => {
91 | if (!getDownloadSaveDir()){
92 | setDownloadSaveDir(config.dir);
93 | }
94 | eventBus.emit('aria2_connect', config);
95 | this.setState({online: true});
96 | }).catch(e => {
97 | message.error(`连接服务器失败: ${e.message}`);
98 | this.setState({online: false})
99 | })
100 | };
101 | this.aria2.onClose = () => {
102 | this.setState({online: false})
103 | }
104 | }
105 |
106 | componentWillMount(){
107 | setTimeout(() => {
108 | try {
109 | this.aria2.connect().catch(() => {
110 | const cfg = this.aria2.config
111 | message.error(`无法连接到${cfg.host}:${cfg.port}`)
112 | })
113 | } catch (e) {
114 | console.log(e)
115 | }
116 | }, 1000)
117 | eventBus.on('server_change', (item) => {
118 | let cfg = getStorage('ARIA2_SERVER')
119 | console.log(cfg, item)
120 | if (cfg && cfg.id && cfg.id === item.id) {
121 | setStorage('ARIA2_SERVER', item);
122 | this.connectToServer(item)
123 | }
124 | })
125 | }
126 |
127 | onMenuClick(item){
128 | this.setState({
129 | menu: item
130 | })
131 | }
132 |
133 | async connectToServer(server){
134 | const hide = message.loading(`正在连接到${server.host}:${server.port}...`, 0);
135 | this.setState({
136 | actives: [],
137 | waitings: [],
138 | stopped: [],
139 | isRemoteServer: isRemoteServer()
140 | });
141 | try {
142 | await this.aria2.close();
143 | this.aria2.setOptions(server);
144 | await this.aria2.connect()
145 | hide();
146 | } catch (e) {
147 | console.log(e)
148 | hide();
149 | if (e && e.type === 'error') {
150 | message.error(`无法连接到${server.host}:${server.port}`)
151 | }
152 | }
153 | }
154 |
155 | render() {
156 | let data;
157 | if (this.state.menu === 'active') {
158 | data = [...this.state.actives, ...this.state.waitings];
159 | } else if (this.state.menu === 'complete') {
160 | data = this.state.stopped.filter(item => item.status === 'complete')
161 | } else if (this.state.menu === 'remove'){
162 | data = this.state.stopped.filter(item => item.status !== 'complete')
163 | }
164 | return (
165 |
166 | await this.connectToServer(c)}
170 | onMenuClick={(item) => this.onMenuClick(item)}/>
171 | {this.state.menu && this.state.menu !== 'setting' ?
172 | :
173 | }
174 |
175 | );
176 | }
177 | }
178 |
179 | export default App;
180 |
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './App';
4 |
5 | it('renders without crashing', () => {
6 | const div = document.createElement('div');
7 | ReactDOM.render(, div);
8 | ReactDOM.unmountComponentAtNode(div);
9 | });
10 |
--------------------------------------------------------------------------------
/src/aria2client.js:
--------------------------------------------------------------------------------
1 | import {
2 | formatResult,
3 | getTitle
4 | } from './aria2utils'
5 |
6 | const Aria2 = window.Aria2;
7 |
8 | export default class Aria2Client {
9 | config = {
10 | host: '127.0.0.1',
11 | port: 6800,
12 | secure: false,
13 | secret: 'xxxx',
14 | path: '/jsonrpc',
15 | onRefresh: () => {}
16 | };
17 | _timer = null;
18 | waitings = [];
19 | actives = [];
20 | stopped = [];
21 |
22 | constructor(config) {
23 | if (config) {
24 | this.config = {
25 | ...this.config,
26 | ...config
27 | };
28 | }
29 | this.aria2 = new Aria2(this.config);
30 | this.initAria2(this.aria2);
31 |
32 | Aria2.methods.forEach((name, i) => {
33 | if (i > 3){
34 | this[name] = (...args) => {
35 | return this.aria2[name](args)
36 | }
37 | }
38 | })
39 | }
40 |
41 | initAria2(aria2){
42 | aria2.onclose = () => {
43 | if (this._timer != null) clearInterval(this._timer);
44 | setTimeout(()=> {
45 | try {
46 | if (this.aria2.socket.readyState === 3){
47 | this.connect()
48 | }
49 | } catch (e) {
50 |
51 | }
52 | }, 10000);
53 | if ('onClose' in this) {
54 | this.onClose()
55 | }
56 | };
57 | aria2.onopen = async () => {
58 | if ('onConnect' in this) {
59 | this.onConnect()
60 | }
61 | if ((await this.refreshTasks()).length) {
62 | this.startRefresh()
63 | }
64 | };
65 | aria2.onDownloadStart = /*aria2.onDownloadPause = aria2.onDownloadStop =*/ ({gid}) => {
66 | this.startRefresh()
67 | };
68 | aria2.onBtDownloadComplete = aria2.onDownloadComplete = ({gid}) => {
69 | aria2.getFiles(gid).then(res => {
70 | if(res && res.length){
71 | new Notification('下载完成', {
72 | body: getTitle({files: res, dir: ''})
73 | })
74 | }
75 | })
76 | };
77 | }
78 |
79 | setOptions(opts){
80 | opts && Object.keys(opts).forEach(key => {
81 | this.aria2[key] = opts[key];
82 | })
83 | }
84 |
85 | connect() {
86 | return this.aria2.open()
87 | }
88 |
89 | close(){
90 | return this.aria2.close();
91 | }
92 |
93 | addUri(...args){
94 | return this.aria2.addUri(...args).then(() => {
95 | this.refreshTasks()
96 | })
97 | }
98 |
99 | addTorrent(...args){
100 | return this.aria2.addTorrent(...args).then(() => {
101 | this.refreshTasks()
102 | })
103 | }
104 |
105 | addMetalink(...args){
106 | this.aria2.addMetalink(...args).then(() => {
107 | this.refreshTasks()
108 | })
109 | }
110 |
111 | changeStatus(status, gid) {
112 | const aria2 = this.aria2;
113 | return new Promise((resolve, reject) => {
114 | if (status in aria2) {
115 | const p = gid ? aria2[status](gid) : aria2[status]();
116 | p.then(() => {
117 | return this.refreshTasks()
118 | }).then(resolve).catch(e => {
119 | reject(e)
120 | });
121 | }
122 | })
123 | }
124 |
125 | startRefresh(delay = 1000) {
126 | if (this._timer) return;
127 | this._timer = setInterval(async () => {
128 | const actives = await this.refreshTasks();
129 | if (!actives.length) {
130 | clearInterval(this._timer);
131 | this._timer = null
132 | }
133 | }, delay)
134 | }
135 |
136 | refreshTasks() {
137 | const aria2 = this.aria2;
138 | return new Promise((resolve, reject) => {
139 | Promise.all([
140 | aria2.tellActive(),
141 | aria2.tellWaiting(0, 100),
142 | aria2.tellStopped(0, 100)
143 | ]).then(([actives, waitings, stopped]) => {
144 | this.actives = formatResult(actives);
145 | this.waitings = formatResult(waitings);
146 | this.stopped = formatResult(stopped);
147 | this.config.onRefresh({
148 | actives: this.actives,
149 | waitings: this.waitings,
150 | stopped: this.stopped
151 | });
152 | resolve(actives)
153 | }).catch(reject)
154 | })
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/src/aria2utils.js:
--------------------------------------------------------------------------------
1 | import url from 'url'
2 | import {getStorage, setStorage} from "./utils";
3 |
4 | export function getTitle(result) {
5 | const dir = result.dir;
6 | let title = "Unknown";
7 | if (result.bittorrent && result.bittorrent.info && result.bittorrent.info.name) {
8 | title = result.bittorrent.info.name;
9 | } else if (result.files[0].path && result.files[0].path.replace(new RegExp("^" + dir.replace(/\\/g, "/").replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&') + "/?"), "").split("/").length) {
10 | title = result.files[0].path.replace(new RegExp("^" + dir.replace(/\\/g, "/").replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&') + "/?"), "").split("/");
11 | if (result.bittorrent)
12 | title = title[0];
13 | else
14 | title = title[title.length - 1];
15 | } else if (result.files.length && result.files[0].uris.length && result.files[0].uris[0].uri) {
16 | title = url.parse(result.files[0].uris[0].uri).path;
17 | if (title.includes('/')) {
18 | title = title.substr(title.lastIndexOf('/') + 1)
19 | }
20 | }
21 |
22 | if (result.files.length > 1) {
23 | let cnt = 0;
24 | for (let i = 0; i < result.files.length; i++) {
25 | if (result.files[i].selected === "true")
26 | cnt += 1;
27 | }
28 | if (cnt > 1)
29 | title += " (" + cnt + " files..)"
30 | }
31 | return title;
32 | }
33 |
34 | export function intval(s, radix = 10) {
35 | return parseInt(s, radix) || 0
36 | }
37 |
38 | export function formatResult(results) {
39 | results && results.forEach(result => {
40 | const totalLength = intval(result.totalLength);
41 | const completedLength = intval(result.completedLength);
42 | const downloadSpeed = intval(result.downloadSpeed);
43 | result.title = getTitle(result);
44 | result.progress = totalLength === 0 ? 0 : parseFloat((completedLength * 1.0 / totalLength * 100).toFixed(2));
45 | result.eta = !downloadSpeed ? '' : formatTime(totalLength && totalLength - completedLength > 0 ? (totalLength - completedLength) / (result.downloadSpeed||1) : 0);
46 | result.downloadSpeed = intval(result.downloadSpeed);
47 | result.uploadSpeed = intval(result.uploadSpeed);
48 | result.uploadLength = intval(result.uploadLength);
49 | result.completedLength = intval(result.completedLength);
50 | result.numSeeders = intval(result.numSeeders);
51 | result.connections = intval(result.connections);
52 | });
53 | return results;
54 | }
55 |
56 | export function bytesToSize(bytes) {
57 | bytes = Number(bytes);
58 | if (bytes === 0 || !bytes || isNaN(bytes)) return '0 B';
59 | const k = 1024;
60 | const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
61 | const i = Math.floor(Math.log(bytes) / Math.log(k));
62 | return (bytes / Math.pow(k, i)).toPrecision(3) + ' ' + sizes[i];
63 | }
64 |
65 | export const statusText = {
66 | 'paused': '暂停',
67 | 'waiting': '等待中',
68 | 'active': '下载中',
69 | 'complete': '已完成',
70 | 'error': '下载出错'
71 | };
72 |
73 | export function getStatusText(status) {
74 | return statusText[status] || status
75 | }
76 |
77 | /*
78 | * 将秒数格式化时间
79 | * @param {Number} seconds: 整数类型的秒数
80 | * @return {String} time: 格式化之后的时间
81 | */
82 | function formatTime(seconds) {
83 | seconds = Math.floor(seconds);
84 | let min = Math.floor(seconds / 60),
85 | second = seconds % 60,
86 | hour, newMin;
87 |
88 | if (min > 60) {
89 | hour = Math.floor(min / 60);
90 | newMin = min % 60;
91 | }
92 |
93 | if (second < 10) { second = '0' + second;}
94 | if (min < 10) { min = '0' + min;}
95 |
96 | return hour? (hour + ':' + newMin + ':' + second) : (min + ':' + second);
97 | }
98 |
99 | export function getFileExt(file) {
100 | if (!file || file.indexOf('.') === -1) return '';
101 | return file.substr(file.lastIndexOf('.') + 1)
102 | }
103 |
104 | export function getCurrentConfig() {
105 | return getStorage('ARIA2_SERVER') || {}
106 | }
107 |
108 | export function getDownloadSaveDir() {
109 | return getStorage(`ARIA2_DOWNLOAD_DIR${getCurrentConfig().id}`)
110 | }
111 |
112 | export function setDownloadSaveDir(dir) {
113 | return setStorage(`ARIA2_DOWNLOAD_DIR${getCurrentConfig().id}`, dir)
114 | }
115 |
116 | export function isRemoteServer() {
117 | const conf = getCurrentConfig();
118 | return conf && conf.id && conf.id !== 1
119 | }
120 |
--------------------------------------------------------------------------------
/src/components/DownloadItem.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {Avatar, List, Progress} from 'antd'
3 | import {bytesToSize, getFileExt} from '../aria2utils'
4 |
5 | export default class DownloadItem extends React.Component{
6 |
7 | render(){
8 | const styles = {
9 | paddingLeft: 10,
10 | paddingRight: 10,
11 | backgroundColor: this.props.selected ? '#d9ecfe' : ''
12 | };
13 |
14 | const item = this.props.item;
15 | return (
16 | this.props.onClick()}>
17 | {getFileExt(item.title)}}
19 | title={{item.title}}
20 | description={bytesToSize(item.totalLength)}
21 | />
22 |