abcfy2 / aria2-static-build

aria2 static build, support cross compile
57 stars 15 forks source link
aria2

aria2-static-build

Build and Release

aria2 static build using musl and support many platforms.

Download

You can download from Continuous Build (Weekly build from aria2 master branch with latest dependencies).

Or download from latest release build (Build from aria2 latest release version).

NOTE: If you were executed in Android environment (maybe x86_64, arm, or aarch64), please follow the official aria2 Android README: https://github.com/aria2/aria2/blob/master/README.android

Here is a sample:

cat /etc/security/cacerts/* | ./aria2c --ca-certificate=/proc/self/fd/0 --async-dns-server=1.1.1.1 https://github.com/

Please note getprop net.dns1 does not work since Android 8, so you have to set a valid DNS manually.

https certificates NOTE (Linux Only)

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.

Reference for different distribution certificates locations: https://gitlab.com/probono/platformissues/blob/master/README.md#certificates

Build locally yourself

Requirements:

docker run --rm -v `pwd`:/build abcfy2/musl-cross-toolchain-ubuntu:${CROSS_HOST} /build/build.sh

All avaliable CROSS_HOST can be found in Tags page.

NOTE: Currently I only tested these tags:

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 -v `pwd`:/build -e USE_ZLIB_NG=0 -e USE_LIBRESSL=1 abcfy2/muslcc-toolchain-ubuntu:${CROSS_HOST} /build/build.sh

Optional environment variables: