Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dependences
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ZLIB='https://www.zlib.net/zlib-1.2.11.tar.gz'
EXPAT='https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.bz2'
C_ARES='https://c-ares.haxx.se/download/c-ares-1.17.2.tar.gz'
ZLIB='https://www.zlib.net/zlib-1.3.1.tar.gz'
EXPAT='https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.bz2'
C_ARES='https://github.com/c-ares/c-ares/releases/download/v1.34.4/c-ares-1.34.4.tar.gz'
OPENSSL='https://www.openssl.org/source/openssl-1.1.1k.tar.gz'
SQLITE3='https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz'
LIBSSH2='https://www.libssh2.org/download/libssh2-1.9.0.tar.gz'
JEMALLOC='https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2'
LIBSSH2='https://www.libssh2.org/download/libssh2-1.11.1.tar.gz'
JEMALLOC='https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2'
123 changes: 0 additions & 123 deletions patch/0004-option-add-option-to-disable-want-digest-header.patch

This file was deleted.

31 changes: 31 additions & 0 deletions patch/0004-option-set-no-want-digest-header-default-to-true.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 72cdac25880ee1d9d154c6e9fa87b90259de3c0f Mon Sep 17 00:00:00 2001
From: Mintimate <mintimate215@gmail.com>
Date: Mon, 17 Mar 2025 00:00:00 +0800
Subject: [PATCH] option: set no-want-digest-header default to true

Adapted by Mintimate <mintimate215@gmail.com> on 2026-03-17.

Aria2 upstream has added the --no-want-digest-header option
(default: false, i.e. Want-Digest header IS sent by default).
This patch changes the default to true so that the Want-Digest
HTTP header is NOT sent by default, avoiding potential issues
with servers that don't support or mishandle this header.
---
src/OptionHandlerFactory.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 000426b..7e30774 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -1205,7 +1205,7 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
}
{
OptionHandler* op(new BooleanOptionHandler(
- PREF_NO_WANT_DIGEST_HEADER, TEXT_NO_WANT_DIGEST_HEADER, A2_V_FALSE,
+ PREF_NO_WANT_DIGEST_HEADER, TEXT_NO_WANT_DIGEST_HEADER, A2_V_TRUE,
OptionHandler::OPT_ARG));
op->addTag(TAG_HTTP);
op->setInitialOption(true);
--
2.39.5
8 changes: 6 additions & 2 deletions snippet/aria2-code
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#
# Copyright (c) 2020 P3TERX <https://p3terx.com>
# Modified by Mintimate <https://www.mintimate.cn>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Aria2-Pro-Core
# File name: snippet/aria2-code
# Modify: Remove Patch Step.
#

ARIA2_GIT_CODE() {
Expand All @@ -30,11 +32,13 @@ ARIA2_RELEASE_CODE() {
}

ARIA2_PATCH() {
git apply $SCRIPT_DIR/patch/*.patch
git apply $SCRIPT_DIR/patch/0001-options-unlock-connection-per-server-limit.patch
git apply $SCRIPT_DIR/patch/0002-download-retry-on-slow-speed-and-reset.patch
git apply $SCRIPT_DIR/patch/0003-option-add-option-to-retry-on-http-4xx.patch
git apply $SCRIPT_DIR/patch/0004-option-set-no-want-digest-header-default-to-true.patch
}

ARIA2_CODE_GET() {
#ARIA2_RELEASE_CODE
ARIA2_GIT_CODE
ARIA2_PATCH
}
24 changes: 15 additions & 9 deletions snippet/cross-build
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#
# Copyright (c) 2020 P3TERX <https://p3terx.com>
# Modified by Mintimate <https://www.mintimate.cn>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Aria2-Pro-Core
# File name: snippet/cross-build
# Modify: Limit the number of threads's Maximum.
#

MAX_JOBS=8 # 设置最大线程数
CPU_CORES=$(nproc) # 获取系统核心数
JOBS=$(( CPU_CORES > MAX_JOBS ? MAX_JOBS : CPU_CORES )) # 取较小值

ZLIB_BUILD() {
mkdir -p $BUILD_DIR/zlib && cd $BUILD_DIR/zlib
curl -Ls -o - "$ZLIB" | tar zxvf - --strip-components=1
./configure \
--prefix=$PREFIX \
--static
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -30,7 +36,7 @@ EXPAT_BUILD() {
--without-examples \
--without-tests \
--without-docbook
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -44,7 +50,7 @@ C_ARES_BUILD() {
--enable-static \
--disable-shared \
--disable-tests
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -55,7 +61,7 @@ OPENSSL_BUILD() {
--prefix=$PREFIX \
$OPENSSL_ARCH \
no-tests
make -j$(nproc)
make -j${JOBS}
make install_sw
}

Expand All @@ -69,7 +75,7 @@ SQLITE3_BUILD() {
--enable-static \
--disable-shared \
--disable-dynamic-extensions
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -82,7 +88,7 @@ LIBSSH2_BUILD() {
--enable-static \
--disable-shared \
--disable-examples-build
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -97,7 +103,7 @@ JEMALLOC_BUILD() {
--disable-shared \
--disable-stats \
--enable-prof
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -118,9 +124,9 @@ ARIA2_BUILD() {
--without-libgmp \
--with-libssh2 \
--with-sqlite3 \
--without-jemalloc \
--with-jemalloc \
--with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' \
ARIA2_STATIC=yes \
--disable-shared
make -j$(nproc)
make -j${JOBS}
}
24 changes: 15 additions & 9 deletions snippet/target-build
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#
# Copyright (c) 2020 P3TERX <https://p3terx.com>
# Modified by Mintimate <https://www.mintimate.cn>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Aria2-Pro-Core
# File name: snippet/target-build
# Modify: Limit the number of threads's Maximum.
#

MAX_JOBS=8 # 设置最大线程数
CPU_CORES=$(nproc) # 获取系统核心数
JOBS=$(( CPU_CORES > MAX_JOBS ? MAX_JOBS : CPU_CORES )) # 取较小值

ZLIB_BUILD() {
mkdir -p $BUILD_DIR/zlib && cd $BUILD_DIR/zlib
curl -Ls -o - "$ZLIB" | tar zxvf - --strip-components=1
./configure \
--prefix=$PREFIX \
--static
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -28,7 +34,7 @@ EXPAT_BUILD() {
--without-examples \
--without-tests \
--without-docbook
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -40,7 +46,7 @@ C_ARES_BUILD() {
--enable-static \
--disable-shared \
--disable-tests
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -51,7 +57,7 @@ OPENSSL_BUILD() {
--prefix=$PREFIX \
$OPENSSL_ARCH \
no-tests
make -j$(nproc)
make -j${JOBS}
make install_sw
}

Expand All @@ -63,7 +69,7 @@ SQLITE3_BUILD() {
--enable-static \
--disable-shared \
--disable-dynamic-extensions
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -75,7 +81,7 @@ LIBSSH2_BUILD() {
--enable-static \
--disable-shared \
--disable-examples-build
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -88,7 +94,7 @@ JEMALLOC_BUILD() {
--disable-shared \
--disable-stats \
--enable-prof
make -j$(nproc)
make -j${JOBS}
make install
}

Expand All @@ -107,9 +113,9 @@ ARIA2_BUILD() {
--without-libgmp \
--with-libssh2 \
--with-sqlite3 \
--without-jemalloc \
--with-jemalloc \
--with-ca-bundle='/etc/ssl/certs/ca-certificates.crt' \
ARIA2_STATIC=yes \
--disable-shared
make -j$(nproc)
make -j${JOBS}
}