aria2 static build using musl and support many platforms.
You can download from latest release build (Build from aria2 latest release version).
-
aria2c.exe is generated by build.sh, and aria2c1.exe by build1.sh.The main difference is their dependencies: aria2c.exe uses zlib and libexpat with the latest release tarballs, while aria2c1.exe uses zlib-ng and libxml2 with the latest source code, and the dependencies used to compile aria2c1.exe are automatically fetched to the latest versions.
-
Both aria2c.exe and aria2c1.exe are enhanced versions. "Piece-length" can be set to 1K, and "max-connection-per-server" can be set to 1024.
-
The optimal Aria2 configuration can be found at: https://raw.githubusercontent.com/P3TERX/aria2.conf/master/aria2.conf
SSL certificates location may vary from different distributions. E.g: Ubuntu uses /etc/ssl/certs/ca-certificates.crt
, but CentOS uses /etc/pki/tls/certs/ca-bundle.crt
.
It's impossible to detect certificates location in all distributions. See issue: openssl/openssl#7481. But luckily most distributions may contains a symbol link /etc/ssl/cert.pem
which point to the actual file path.
So I set compile options --openssldir=/etc/ssl/
for openssl/libressl. Which works for most distributions.
If your environment contains file /etc/ssl/openssl.cnf
or /etc/ssl/cert.pem
, you were luckly and you can use my build out-of-box.
But if your environment does not contain any of the files, you have to do one of the following settings to make https request could work.
- add
--ca-certificate=/path/to/your/certificate
toaria2c
or setca-certificate=/path/to/your/certificate
in~/.aria2/aria2.conf
. E.g:./aria2c --ca-certificate=/etc/pki/tls/certs/ca-bundle.crt https://github.com/
- Or add
SSL_CERT_FILE=/path/to/your/certificate
environment variable before you runaria2c
. E.g:export SSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt; ./aria2c https://github.com/
orSSL_CERT_FILE=/etc/pki/tls/certs/ca-bundle.crt ./aria2c https://github.com/
Reference for different distribution certificates locations: https://gitlab.com/probono/platformissues/blob/master/README.md#certificates
Requirements:
- docker
docker run --rm -v "%cd%:/app" rzhy/ubuntu1:x86_64-w64-mingw32 /bin/bash -c "cd /app && ./build.sh"
All avaliable CROSS_HOST
can be found in Tags page.
NOTE: Currently I only tested these tags:
- x86_64-w64-mingw32
If you want to build for other platform, you may have to modify build.sh
to suitable for your platform.
Cached build dependencies (downloads/
), build_info.md
and aria2c
will be found in current directory.
You can set more optional environment variables in docker
command like:
docker run --rm -e USE_ZLIB_NG=1 -e USE_LIBRESSL=1 -e USE_CHINA_MIRROR=0 -v "%cd%:/app" rzhy/ubuntu:x86_64-w64-mingw32 /bin/bash -c "cd /app && ./build.sh"
Optional environment variables:
ARIA2_VER
: build specific version of aria2, e.g:1.37.0
. Default:master
.USE_CHINA_MIRROR
: set to1
will use China mirrors, if you were located in China, please set to1
. Default:0
.USE_ZLIB_NG
: use zlib-ng instead of zlib. Default:1
USE_LIBRESSL
: use LibreSSL instead of OpenSSL. Default:0
. NOTE, ifCROSS_HOST=x86_64-w64-mingw32
will not use openssl or libressl because aria2 and all dependencies will use WinTLS instead.