fix: aria2指定dns,指定最大并发下载数

This commit is contained in:
2022-12-08 17:51:18 +08:00
parent 9d93966124
commit df7b49dbe2
2 changed files with 8 additions and 6 deletions

View File

@@ -110,6 +110,7 @@ void DownloadController::startDownload(const QString &url)
QString downloadDir = "/tmp/spark-store/";
QString aria2ConnectionPerServer = "--max-connection-per-server=1";
QString aria2ConnectionMax = "--max-concurrent-downloads=16";
QString aria2DNSCommand = "--async-dns-server=119.29.29.29,223.5.5.5";
if (useMetalink){
command.append(metaUrl.toUtf8());
@@ -132,6 +133,7 @@ void DownloadController::startDownload(const QString &url)
command.append(aria2SizePerThreads.toUtf8());
command.append(aria2ConnectionPerServer.toUtf8());
command.append(aria2ConnectionMax.toUtf8());
command.append(aria2DNSCommand.toUtf8());
if (useMetalink){
command.append(aria2NoSeeds.toUtf8());
}