summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorweearc2019-01-20 01:43:13 +0800
committerweearc2019-01-20 01:43:13 +0800
commit2cc50eb87f605aaeb365ed8ffb28ca4b2ffab7ff (patch)
tree4b2d74751594df38f2d161fc64fab0ea4e843e52
parentfe4483a2cad36fb177d1a03e38042c16298aa695 (diff)
downloadaur-2cc50eb87f605aaeb365ed8ffb28ca4b2ffab7ff.tar.gz
simplify package.josn and changes basic aria2 configture
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
-rwxr-xr-xaria2.conf113
-rw-r--r--package.json132
4 files changed, 260 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0c1bb6b534e..e4228e4fac5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = motrix
pkgdesc = elegent downloading tool frontend for aria2c,using vue
pkgver = git20190120
- pkgrel = 2
+ pkgrel = 4
url = https://github.com/agalwood/Motrix
arch = x86_64
license = MIT
@@ -10,6 +10,10 @@ pkgbase = motrix
depends = bash
depends = aria2
source = Motrix.desktop
+ source = aria2.conf
+ source = package.json
+ md5sums = SKIP
+ md5sums = SKIP
md5sums = SKIP
pkgname = motrix
diff --git a/PKGBUILD b/PKGBUILD
index 0c98bb24062..d75a2cdf07c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=motrix
_pkgname=Motrix
pkgver=git20190120
-pkgrel=2
+pkgrel=4
epoch=
pkgdesc="elegent downloading tool frontend for aria2c,using vue"
arch=("x86_64")
@@ -22,9 +22,13 @@ backup=()
options=()
install=
changelog=
-source=("Motrix.desktop")
+source=("Motrix.desktop"
+ "aria2.conf"
+ "package.json")
noextract=()
-md5sums=(SKIP)
+md5sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
validpgpkeys=()
prepare() {
@@ -32,6 +36,7 @@ prepare() {
npm config set registry 'https://registry.npm.taobao.org'
export ELECTRON_MIRROR='https://npm.taobao.org/mirrors/electron/'
export SASS_BINARY_SITE='https://npm.taobao.org/mirrors/node-sass'
+ rm $_pkgname/package.json && mv ${srcdir}/package.json $_pkgname/.
}
@@ -50,5 +55,7 @@ package() {
echo -e "#!/bin/bash \n /opt/motrix/motrix" > ${pkgdir}/usr/bin/motrix
chmod a+x ${pkgdir}/usr/bin/motrix
install -Dm 644 ${srcdir}/Motrix.desktop ${pkgdir}/usr/share/applications
+# rm ${pkgdir}/opt/motrix/resources/engine/aria2.conf
+ install -Dm 644 ${srcdir}/aria2.conf ${pkgdir}/opt/motrix/resources/engine/aria2.conf
rm -rf ${srcdir}
}
diff --git a/aria2.conf b/aria2.conf
new file mode 100755
index 00000000000..4a28e499cea
--- /dev/null
+++ b/aria2.conf
@@ -0,0 +1,113 @@
+dir=~/downloads
+# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
+disk-cache=32M
+# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
+# 预分配所需时间: none < falloc ? trunc < prealloc
+# falloc和trunc则需要文件系统和内核支持
+# NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项
+file-allocation=none
+# 断点续传
+continue=true
+
+## 下载连接相关 ##
+
+# 最大同时下载任务数, 运行时可修改, 默认:5
+#max-concurrent-downloads=5
+# 同一服务器连接数, 添加时可指定, 默认:1
+#max-connection-per-server=5
+# 最小文件分片大小, 添加时可指定, 取值范围1M -1024M, 默认:20M
+# 假定size=10M, 文件为20MiB 则使用两个来源下载; 文件为15MiB 则使用一个来源下载
+min-split-size=10M
+# 单个任务最大线程数, 添加时可指定, 默认:5
+split=5
+# 整体下载速度限制, 运行时可修改, 默认:0
+#max-overall-download-limit=0
+# 单个任务下载速度限制, 默认:0
+#max-download-limit=0
+# 整体上传速度限制, 运行时可修改, 默认:0
+#max-overall-upload-limit=0
+# 单个任务上传速度限制, 默认:0
+#max-upload-limit=0
+# 禁用IPv6, 默认:false
+disable-ipv6=true
+# 连接超时时间, 默认:60
+timeout=60
+# 最大重试次数, 设置为0表示不限制重试次数, 默认:5
+max-tries=3
+# 设置重试等待的秒数, 默认:0
+retry-wait=0
+
+## 进度保存相关 ##
+
+# 从会话文件中读取下载任务
+input-file=/var/cache/aria2.session
+# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
+save-session=/var/cache/aria2.session
+# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
+save-session-interval=0
+
+## RPC相关设置 ##
+
+# 启用RPC, 默认:false
+enable-rpc=true
+# 允许所有来源, 默认:false
+rpc-allow-origin-all=
+# 允许非外部访问, 默认:false
+rpc-listen-all=true
+# 事件轮询方式, 取值:[epoll, kqueue, port, poll, select], 不同系统默认值不同
+#event-poll=select
+# RPC监听端口, 端口被占用时可以修改, 默认:6800
+#rpc-listen-port=6800
+# 设置的RPC授权令牌, v1.18.4新增功能, 取代 --rpc-user 和 --rpc-passwd 选项
+#rpc-secret=<TOKEN>
+# 设置的RPC访问用户名, 此选项新版已废弃, 建议改用 --rpc-secret 选项
+#rpc-user=<USER>
+# 设置的RPC访问密码, 此选项新版已废弃, 建议改用 --rpc-secret 选项
+#rpc-passwd=<PASSWD>
+# 是否启用 RPC 服务的 SSL/TLS 加密,
+# 启用加密后 RPC 服务需要使用 https 或者 wss 协议连接
+#rpc-secure=true
+# 在 RPC 服务中启用 SSL/TLS 加密时的证书文件,
+# 使用 PEM 格式时,您必须通过 --rpc-private-key 指定私钥
+#rpc-certificate=/path/to/certificate.pem
+# 在 RPC 服务中启用 SSL/TLS 加密时的私钥文件
+#rpc-private-key=/path/to/certificate.key
+
+## BT/PT下载相关 ##
+
+# 当下载的是一个种子(以.torrent结尾)时, 自动开始BT任务, 默认:true
+follow-torrent=true
+# BT监听端口, 当端口被屏蔽时使用, 默认:6881-6999
+listen-port=51413
+# 单个种子最大连接数, 默认:55
+#bt-max-peers=55
+# 打开DHT功能, PT需要禁用, 默认:true
+enable-dht=false
+# 打开IPv6 DHT功能, PT需要禁用
+#enable-dht6=false
+# DHT网络监听端口, 默认:6881-6999
+dht-listen-port=6881-6999
+# 本地节点查找, PT需要禁用, 默认:false
+#bt-enable-lpd=false
+# 种子交换, PT需要禁用, 默认:true
+enable-peer-exchange=false
+# 每个种子限速, 对少种的PT很有用, 默认:50K
+bt-request-peer-speed-limit=50K
+# 客户端伪装, PT需要
+peer-id-prefix=-TR2770-
+user-agent=Transmission/2.77
+user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
+# 当种子的分享率达到这个数时, 自动停止做种, 0为一直做种, 默认:1.0
+seed-ratio=0
+# 强制保存会话, 即使任务已经完成, 默认:false
+# 较新的版本开启后会在任务完成后依然保留.aria2文件
+force-save=true
+# BT校验相关, 默认:true
+#bt-hash-check-seed=true
+# 继续之前的BT任务时, 无需再次校验, 默认:false
+bt-seed-unverified=true
+# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
+bt-save-metadata=true
+# bt-tracker数据来自https://github.com/ngosang/trackerslist/blob/master/trackers_best.txt
+
+bt-tracker=udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce,udp://9.rarbg.to:2710/announce,udp://exodus.desync.com:6969/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker1.itzmx.com:8080/announce,udp://explodie.org:6969/announce,http://tracker.tfile.me:80/announce.php,http://tracker.tfile.me:80/announce,http://tracker.tfile.co:80/announce,http://peersteers.org:80/announce,udp://tracker.tiny-vps.com:6969/announce,udp://ipv4.tracker.harry.lu:80/announce,udp://denis.stalker.upeer.me:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.port443.xyz:6969/announce,udp://tracker.cyberia.is:6969/announce,udp://thetracker.org:80/announce,udp://retracker.lanta-net.ru:2710/announce
diff --git a/package.json b/package.json
new file mode 100644
index 00000000000..64aadfc1ba4
--- /dev/null
+++ b/package.json
@@ -0,0 +1,132 @@
+{
+ "name": "Motrix",
+ "version": "1.0.10",
+ "description": "A full-featured download manager",
+ "homepage": "https://motrix.app",
+ "author": {
+ "name": "AGALWOOD",
+ "email": "agalwood.net@gmail.com"
+ },
+ "copyright": "Copyright© AGALWOOD",
+ "license": "MIT",
+ "main": "./dist/electron/main.js",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:agalwood/Motrix.git"
+ },
+ "scripts": {
+ "release": "npm run build --publish onTagOrDraft",
+ "build": "node .electron-vue/build.js && electron-builder",
+ "build:dir": "node .electron-vue/build.js && electron-builder --dir",
+ "build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
+ "build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
+ "dev": "node .electron-vue/dev-runner.js",
+ "dev:renderer": "webpack-dev-server --hot --colors --config .electron-vue/webpack.renderer.config.js --port 9080 --content-base app/dist",
+ "lint": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter src",
+ "lint:fix": "eslint --ext .js,.vue -f ./node_modules/eslint-friendly-formatter --fix src",
+ "pack": "npm run pack:main && npm run pack:renderer",
+ "pack:main": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.main.config.js",
+ "pack:renderer": "cross-env NODE_ENV=production webpack --mode production --progress --colors --config .electron-vue/webpack.renderer.config.js",
+ "postinstall": "npm run lint:fix"
+ },
+ "build": {
+ "productName": "Motrix",
+ "appId": "net.agalwood.Motrix",
+ "asar": true,
+ "directories": {
+ "output": "release"
+ },
+ "files": [
+ "dist/electron/**/*"
+ ],
+ "linux": {
+ "target": "dir"
+ },
+ "publish": [
+ {
+ "provider": "generic",
+ "url": "https://motrix.app/release/"
+ },
+ {
+ "provider": "github"
+ }
+ ]
+ },
+ "dependencies": {
+ "aria2": "^4.0.3",
+ "axios": "^0.18.0",
+ "clipboard-polyfill": "^2.7.0",
+ "electron-debug": "^2.0.0",
+ "electron-is": "^3.0.0",
+ "electron-log": "^2.2.17",
+ "electron-updater": "^4.0.7",
+ "element-ui": "^2.4.11",
+ "forever-monitor": "^1.7.1",
+ "lodash": "^4.17.11",
+ "normalize.css": "^8.0.1",
+ "parse-torrent": "^6.1.2",
+ "svg-innerhtml": "^1.1.0",
+ "vue": "^2.5.17",
+ "vue-electron": "^1.0.6",
+ "vue-router": "^3.0.2",
+ "vuex": "^3.0.1",
+ "vuex-router-sync": "^5.0.0"
+ },
+ "devDependencies": {
+ "@vue/cli-plugin-babel": "^3.2.2",
+ "@vue/cli-plugin-eslint": "^3.2.2",
+ "@vue/cli-service": "^3.2.2",
+ "@vue/eslint-config-standard": "^4.0.0",
+ "ajv": "^6.6.2",
+ "babel-core": "^6.26.3",
+ "babel-eslint": "^10.0.1",
+ "babel-loader": "^7.1.4",
+ "babel-plugin-component": "^1.1.1",
+ "babel-plugin-transform-runtime": "^6.23.0",
+ "babel-preset-env": "^1.7.0",
+ "babel-preset-stage-0": "^6.24.1",
+ "babel-register": "^6.26.0",
+ "babili-webpack-plugin": "^0.1.2",
+ "cfonts": "^2.2.3",
+ "chalk": "^2.4.1",
+ "copy-webpack-plugin": "^4.6.0",
+ "cross-env": "^5.1.6",
+ "css-loader": "^1.0.1",
+ "del": "^3.0.0",
+ "devtron": "^1.4.0",
+ "electron": "^4.0.0",
+ "electron-builder": "^20.38.4",
+ "electron-devtools-installer": "^2.2.4",
+ "electron-notarize": "^0.0.5",
+ "electron-osx-sign": "^0.4.11",
+ "electron-store": "^2.0.0",
+ "eslint": "^5.11.1",
+ "eslint-config-standard": "^12.0.0",
+ "eslint-friendly-formatter": "^4.0.1",
+ "eslint-loader": "^2.1.1",
+ "eslint-plugin-html": "^4.0.6",
+ "eslint-plugin-import": "^2.12.0",
+ "eslint-plugin-node": "^7.0.1",
+ "eslint-plugin-promise": "^4.0.1",
+ "eslint-plugin-standard": "^4.0.0",
+ "file-loader": "^2.0.0",
+ "html-webpack-plugin": "^3.2.0",
+ "mini-css-extract-plugin": "0.5.0",
+ "multispinner": "^0.2.1",
+ "node-loader": "^0.6.0",
+ "node-sass": "^4.10.0",
+ "optimize-css-assets-webpack-plugin": "^5.0.1",
+ "sass-loader": "^7.1.0",
+ "style-loader": "^0.23.1",
+ "url-loader": "^1.1.2",
+ "vue-html-loader": "^1.2.4",
+ "vue-loader": "^15.4.2",
+ "vue-style-loader": "^4.1.2",
+ "vue-template-compiler": "^2.5.17",
+ "webpack": "^4.28.3",
+ "webpack-cli": "^3.1.2",
+ "webpack-dev-server": "^3.1.14",
+ "webpack-hot-middleware": "^2.24.3",
+ "webpack-merge": "^4.1.4"
+ }
+}