moxbox init

This commit is contained in:
monlor
2020-03-05 00:08:40 +08:00
commit 76dbe98978
856 changed files with 170708 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
#用户名
#rpc-user=user
#密码
#rpc-passwd=passwd
#设置加密的密钥
#rpc-secret=secret
#允许rpc
enable-rpc=true
#允许所有来源, web界面跨域权限需要
rpc-allow-origin-all=true
#是否启用https加密启用之后要设置公钥,私钥的文件路径
#rpc-secure=true
#启用加密设置公钥
#rpc-certificate=/home/name/.config/aria2/example.crt
#启用加密设置私钥
#rpc-private-key=/home/name/.config/aria2/example.key
#允许外部访问false的话只监听本地端口
rpc-listen-all=true
#RPC端口, 仅当默认端口被占用时修改
rpc-listen-port=6800
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#断点续传
continue=true
#同服务器连接数
max-connection-per-server=5
#最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要
min-split-size=10M
#单文件最大线程数, 路由建议值: 5
split=10
#下载速度限制
max-overall-download-limit=0
#单文件速度限制
max-download-limit=0
#上传速度限制
max-overall-upload-limit=0
#单文件速度限制
max-upload-limit=0
#断开速度过慢的连接
#lowest-speed-limit=0
#验证用需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
dir=/extdisks/sda1/下载
#IPv4 DHT routing table file to PATH(IPV6默认没有打开的)
#dht-file-path=/extdisks/sda1/下载/.aria2/dht.dat
#dht-file-path6=/extdisks/sda1/下载/.aria2/dht6.dat
#bt-tracker
#bt-tracker=
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
#enable-mmap=true
#文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长
#所需时间 none < falloc ? trunc << prealloc, falloc和trunc需要文件系统和内核支持
file-allocation=prealloc
#不进行证书校验
check-certificate=false
#保存aria2下载记录
input-file=/etc/aria2.session
save-session=/etc/aria2.session
save-session-interval=60
log-level=warn

View File

@@ -0,0 +1,7 @@
service="Aria2"
appname="aria2"
needver="0.0.1"
supports="linux_arm,linux_mips,linux_x86_64"
appinfo="Linux下一款高效的下载工具"
newinfo="支持x86_64设备"
version="0.0.5"

View File

@@ -0,0 +1,33 @@
#------------------【Aria2】--------------------
aria2() {
eval `mbdb export aria2`
source /etc/mixbox/bin/base
echo "********* $service ***********"
echo "[Linux下一款高效的下载工具]"
readsh "启动${appname}服务[1/0] " "enable" "1"
if [ "$enable" == '1' ]; then
read -p "修改${appname}端口号(`mbdb get ${appname}.main.port || echo 6800`)[1/0] " res
if [ "$res" == '1' ]; then
read -p "请输入${appname}端口号(默认6800)" res
mbdb set $appname.main.port="$res"
fi
token=$(mbdb get ${appname}.main.token)
path=$(mbdb get ${appname}.main.path)
[ -z $token ] && token="空"
[ -z $path ] && path="$mbdisk/下载"
read -p "修改${appname}配置($token, $path)[1/0] " res
if [ "$res" == '1' ]; then
read -p "请输入${appname}密钥(回车表示不设置)" res
[ ! -z "$res" ] && mbdb set $appname.main.token="$res" || mbdb set $appname.main.token=""
read -p "请输入${appname}下载路径(回车默认$mbdisk/下载)" res
[ ! -z "$res" ] && mbdb set $appname.main.path="$res" || mbdb set $appname.main.path="$mbdisk/下载"
fi
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
else
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
fi
}
#------------------【Aria2】--------------------