forked from uup-dump/contrib
Disable async DNS in aria2c
This commit is contained in:
parent
d290c13e7c
commit
860e3aa9bb
32
get.php
32
get.php
@ -31,7 +31,7 @@ function createUupConvertPackage(
|
|||||||
|
|
||||||
:DOWNLOAD_APPS
|
:DOWNLOAD_APPS
|
||||||
echo Retrieving aria2 script for Microsoft Store Apps...
|
echo Retrieving aria2 script for Microsoft Store Apps...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$app"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$app"
|
||||||
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ if NOT [%DETECTED_ERROR%] == [] (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading Microsoft Store Apps...
|
echo Downloading Microsoft Store Apps...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
||||||
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_APPS
|
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_APPS
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ powershell -NoProfile -ExecutionPolicy Unrestricted .\\files\\get_aria2.ps1 || (
|
|||||||
echo.
|
echo.
|
||||||
|
|
||||||
echo Downloading the UUP converter...
|
echo Downloading the UUP converter...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j2 -c -R -d"files" -i"files\\converter_windows"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j2 -c -R -d"files" -i"files\\converter_windows"
|
||||||
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_CONVERTER_ERROR & exit /b 1
|
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_CONVERTER_ERROR & exit /b 1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ echo.
|
|||||||
$downloadapp
|
$downloadapp
|
||||||
:DOWNLOAD_UUPS
|
:DOWNLOAD_UUPS
|
||||||
echo Retrieving aria2 script for the UUP set...
|
echo Retrieving aria2 script for the UUP set...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url"
|
||||||
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ if NOT [%DETECTED_ERROR%] == [] (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading the UUP set...
|
echo Downloading the UUP set...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"%destDir%" -i"%aria2Script%"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"%destDir%" -i"%aria2Script%"
|
||||||
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_UUPS & exit /b 1
|
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_UUPS & exit /b 1
|
||||||
|
|
||||||
if EXIST convert-UUP.cmd goto :START_CONVERT
|
if EXIST convert-UUP.cmd goto :START_CONVERT
|
||||||
@ -222,7 +222,7 @@ destDir="UUPs"
|
|||||||
tempScript="aria2_script.\$RANDOM.txt"
|
tempScript="aria2_script.\$RANDOM.txt"
|
||||||
|
|
||||||
echo "Downloading converters..."
|
echo "Downloading converters..."
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j2 --allow-overwrite=true --auto-file-renaming=false -d"files" -i"files/converter_multi"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j2 --allow-overwrite=true --auto-file-renaming=false -d"files" -i"files/converter_multi"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "We have encountered an error while downloading files."
|
echo "We have encountered an error while downloading files."
|
||||||
exit 1
|
exit 1
|
||||||
@ -230,7 +230,7 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Retrieving aria2 script for the UUP set..."
|
echo "Retrieving aria2 script for the UUP set..."
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to retrieve aria2 script"
|
echo "Failed to retrieve aria2 script"
|
||||||
exit 1
|
exit 1
|
||||||
@ -245,7 +245,7 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Downloading the UUP set..."
|
echo "Downloading the UUP set..."
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"\$destDir" -i"\$tempScript"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"\$destDir" -i"\$tempScript"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "We have encountered an error while downloading files."
|
echo "We have encountered an error while downloading files."
|
||||||
exit 1
|
exit 1
|
||||||
@ -369,20 +369,20 @@ function createAria2Package($url, $archiveName, $app = null) {
|
|||||||
$time = gmdate("Y-m-d H:i:s T", time());
|
$time = gmdate("Y-m-d H:i:s T", time());
|
||||||
|
|
||||||
$ariacmd = <<<TEXT
|
$ariacmd = <<<TEXT
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"%destDir%" -i"%aria2Script%"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"%destDir%" -i"%aria2Script%"
|
||||||
TEXT;
|
TEXT;
|
||||||
|
|
||||||
$ariabash = <<<TEXT
|
$ariabash = <<<TEXT
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"\$destDir" -i"\$tempScript"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j5 -c -R -d"\$destDir" -i"\$tempScript"
|
||||||
TEXT;
|
TEXT;
|
||||||
|
|
||||||
if(strpos($archiveName, "_app")) {
|
if(strpos($archiveName, "_app")) {
|
||||||
$ariacmd = <<<TEXT
|
$ariacmd = <<<TEXT
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
||||||
TEXT;
|
TEXT;
|
||||||
|
|
||||||
$ariabash = <<<TEXT
|
$ariabash = <<<TEXT
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"\$destDir" -i"\$tempScript"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"\$destDir" -i"\$tempScript"
|
||||||
TEXT;
|
TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,7 +392,7 @@ TEXT;
|
|||||||
|
|
||||||
:DOWNLOAD_APPS
|
:DOWNLOAD_APPS
|
||||||
echo Retrieving aria2 script for Microsoft Store Apps...
|
echo Retrieving aria2 script for Microsoft Store Apps...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$app"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$app"
|
||||||
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ if NOT [%DETECTED_ERROR%] == [] (
|
|||||||
)
|
)
|
||||||
|
|
||||||
echo Downloading Microsoft Store Apps...
|
echo Downloading Microsoft Store Apps...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -x16 -s16 -j25 -c -R -d"%destDir%" -i"%aria2Script%"
|
||||||
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_APPS
|
if %ERRORLEVEL% GTR 0 goto :DOWNLOAD_APPS
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ echo.
|
|||||||
$downloadapp
|
$downloadapp
|
||||||
:DOWNLOAD_UUPS
|
:DOWNLOAD_UUPS
|
||||||
echo Retrieving aria2 script for the UUP set...
|
echo Retrieving aria2 script for the UUP set...
|
||||||
"%aria2%" --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url"
|
"%aria2%" --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"%aria2Script%" --allow-overwrite=true --auto-file-renaming=false "$url"
|
||||||
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
if %ERRORLEVEL% GTR 0 call :DOWNLOAD_ERROR & exit /b 1
|
||||||
echo.
|
echo.
|
||||||
|
|
||||||
@ -505,7 +505,7 @@ destDir="UUPs"
|
|||||||
tempScript="aria2_script.\$RANDOM.txt"
|
tempScript="aria2_script.\$RANDOM.txt"
|
||||||
|
|
||||||
echo "Retrieving aria2 script for the UUP set..."
|
echo "Retrieving aria2 script for the UUP set..."
|
||||||
aria2c --no-conf --console-log-level=warn --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url"
|
aria2c --no-conf --async-dns=false --console-log-level=warn --log-level=info --log="aria2_download.log" -o"\$tempScript" --allow-overwrite=true --auto-file-renaming=false "$url"
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Failed to retrieve aria2 script"
|
echo "Failed to retrieve aria2 script"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user