mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-11 16:01:35 +00:00
解决BT无法全速下载问题:DHT 缓存目录配置
没有测试过,我本地直接创建了DHT目录,代码直接参照你的代码写的,应该没有问题
This commit is contained in:
@@ -31,6 +31,14 @@ set_config() {
|
||||
|
||||
[ ! -d "$path" ] && mkdir -p $path
|
||||
|
||||
# DHT 缓存目录配置
|
||||
if [ ! -d "${path}/.aria2" ]; then
|
||||
mkdir -p "${path}/.aria2"
|
||||
# IPV6默认没有开,可以不用配置
|
||||
sed -i "s#.*dht-file-path.*#dht-file-path=${path}/.aria2/dht.dat#" ${mbroot}/apps/${appname}/config/${appname}.conf
|
||||
sed -i "s#.*dht-file-path6.*#dht-file-path6=${path}/.aria2/dht6.dat#" ${mbroot}/apps/${appname}/config/${appname}.conf
|
||||
fi
|
||||
|
||||
# 自动更新bt-tracker
|
||||
list=`curl -s https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt|awk NF|sed ":a;N;s/\n/,/g;ta"`
|
||||
if [ ! -z "${list}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user