From 168fe15cedf4c77dbe0ca3e43769c1cda7970a39 Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Mon, 1 Sep 2025 15:47:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BA=94=E7=94=A8=20Aria2=20?= =?UTF-8?q?Superng6=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Meng Sen --- apps/aria2-superng6/24-11-01/data.yml | 21 +++ .../24-11-01/docker-compose.yml | 11 +- apps/aria2-superng6/25-08-29/data.yml | 147 ++++++++++++++++++ .../25-08-29/docker-compose.yml | 41 +++++ apps/aria2-superng6/25-08-29/envs/default.env | 2 + apps/aria2-superng6/25-08-29/envs/global.env | 2 + apps/aria2-superng6/25-08-29/scripts/init.sh | 17 ++ .../25-08-29/scripts/uninstall.sh | 10 ++ .../25-08-29/scripts/upgrade.sh | 17 ++ 9 files changed, 264 insertions(+), 4 deletions(-) create mode 100644 apps/aria2-superng6/25-08-29/data.yml create mode 100644 apps/aria2-superng6/25-08-29/docker-compose.yml create mode 100644 apps/aria2-superng6/25-08-29/envs/default.env create mode 100644 apps/aria2-superng6/25-08-29/envs/global.env create mode 100644 apps/aria2-superng6/25-08-29/scripts/init.sh create mode 100644 apps/aria2-superng6/25-08-29/scripts/uninstall.sh create mode 100644 apps/aria2-superng6/25-08-29/scripts/upgrade.sh diff --git a/apps/aria2-superng6/24-11-01/data.yml b/apps/aria2-superng6/24-11-01/data.yml index 08cab986d..b813c95e6 100644 --- a/apps/aria2-superng6/24-11-01/data.yml +++ b/apps/aria2-superng6/24-11-01/data.yml @@ -124,3 +124,24 @@ additionalProperties: value: "false" - label: 开启 value: "true" + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_1 + labelEn: Custom mount directory 1 + labelZh: 自定义挂载目录 1 + required: false + type: text + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_2 + labelEn: Custom mount directory 2 + labelZh: 自定义挂载目录 2 + required: false + type: text + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_3 + labelEn: Custom mount directory 3 + labelZh: 自定义挂载目录 3 + required: false + type: text diff --git a/apps/aria2-superng6/24-11-01/docker-compose.yml b/apps/aria2-superng6/24-11-01/docker-compose.yml index 873661c55..bf026e0e1 100644 --- a/apps/aria2-superng6/24-11-01/docker-compose.yml +++ b/apps/aria2-superng6/24-11-01/docker-compose.yml @@ -12,16 +12,19 @@ services: cap_add: - NET_ADMIN ports: - - ${PANEL_APP_PORT_HTTP}:8080 - - ${PANEL_APP_PORT_RPC}:6800 - - ${PANEL_APP_PORT_BTPORT}:32516 - - ${PANEL_APP_PORT_BTPORT}:32516/udp + - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP} + - ${PANEL_APP_PORT_RPC}:${PANEL_APP_PORT_RPC} + - ${PANEL_APP_PORT_BTPORT}:${PANEL_APP_PORT_BTPORT} + - ${PANEL_APP_PORT_BTPORT}:${PANEL_APP_PORT_BTPORT}/udp env_file: - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} - ${ENV_FILE:-/etc/1panel/envs/default.env} volumes: - ${ARIA2_ROOT_PATH}/downloads:/downloads - ${ARIA2_ROOT_PATH}/config:/config + - ${CUSTOM_MOUNT_DIRECTORY_1:-./default_mount_1}:${CUSTOM_MOUNT_DIRECTORY_1:-/default_mount_1} + - ${CUSTOM_MOUNT_DIRECTORY_2:-./default_mount_2}:${CUSTOM_MOUNT_DIRECTORY_2:-/default_mount_2} + - ${CUSTOM_MOUNT_DIRECTORY_3:-./default_mount_3}:${CUSTOM_MOUNT_DIRECTORY_3:-/default_mount_3} - /lib/modules:/lib/modules environment: - PUID=0 diff --git a/apps/aria2-superng6/25-08-29/data.yml b/apps/aria2-superng6/25-08-29/data.yml new file mode 100644 index 000000000..b813c95e6 --- /dev/null +++ b/apps/aria2-superng6/25-08-29/data.yml @@ -0,0 +1,147 @@ +additionalProperties: + formFields: + - default: "host" + edit: true + envKey: NETWORK_MODE + labelEn: Drive path + labelZh: 网络模式 + required: true + type: select + values: + - label: 主机网络模式 + value: "host" + - label: 桥接网络模式 + value: "bridge" + - label: 无网络模式 + value: "none" + - label: 1panel-network + value: "1panel-network" + - default: "/home/aria2" + edit: true + envKey: ARIA2_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: 8080 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: 6800 + edit: true + envKey: PANEL_APP_PORT_RPC + labelZh: RPC 通讯端口 + labelEn: RPC communication port + required: true + rule: paramPort + type: number + - default: 32516 + edit: true + envKey: PANEL_APP_PORT_BTPORT + labelZh: DHT 和 BT 通讯端口 + labelEn: DHT and BT communication port + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: SECRET + labelZh: 鉴权密钥 + labelEn: Authentication key + required: true + type: password + - default: "1024M" + edit: true + envKey: CACHE + labelZh: 写入缓存大小 + labelEn: Write cache size + required: true + type: text + - default: "https://cdn.jsdelivr.net/gh/XIU2/TrackersListCollection@master/best_aria2.txt" + edit: true + envKey: CTU + labelZh: 自定义 Trackes 地址 + labelEn: Custom Trackes address + required: true + type: text + - default: "falloc" + edit: true + envKey: FA + labelZh: 下载预分配模式 + labelEn: Download pre-allocation mode + required: true + type: select + values: + - label: 无 + value: "none" + - label: 预分配 + value: "falloc" + - label: 分片 + value: "trunc" + - label: 预分配 + 分片 + value: "prealloc" + - default: "2h" + edit: true + envKey: CRA2B + labelZh: 重启Aria2B时间 + labelEn: Restart Aria2B time + required: true + type: select + values: + - label: 禁止重启 + value: "false" + - label: 每1小时 + value: "1h" + - label: 每2小时 + value: "2h" + - label: 每3小时 + value: "3h" + - label: 每4小时 + value: "4h" + - label: 每5小时 + value: "5h" + - label: 每6小时 + value: "6h" + - label: 每8小时 + value: "8h" + - label: 每10小时 + value: "10h" + - label: 每12小时 + value: "12h" + - default: "true" + edit: true + envKey: QUIET + labelZh: 静默下载 + labelEn: Silent download + required: true + type: select + values: + - label: 禁用 + value: "false" + - label: 开启 + value: "true" + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_1 + labelEn: Custom mount directory 1 + labelZh: 自定义挂载目录 1 + required: false + type: text + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_2 + labelEn: Custom mount directory 2 + labelZh: 自定义挂载目录 2 + required: false + type: text + - default: "" + edit: true + envKey: CUSTOM_MOUNT_DIRECTORY_3 + labelEn: Custom mount directory 3 + labelZh: 自定义挂载目录 3 + required: false + type: text diff --git a/apps/aria2-superng6/25-08-29/docker-compose.yml b/apps/aria2-superng6/25-08-29/docker-compose.yml new file mode 100644 index 000000000..ddf52e6a7 --- /dev/null +++ b/apps/aria2-superng6/25-08-29/docker-compose.yml @@ -0,0 +1,41 @@ +networks: + 1panel-network: + external: true +services: + aria2-superng6: + image: superng6/aria2:25-08-29 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + network_mode: ${NETWORK_MODE} + cap_add: + - NET_ADMIN + ports: + - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP} + - ${PANEL_APP_PORT_RPC}:${PANEL_APP_PORT_RPC} + - ${PANEL_APP_PORT_BTPORT}:${PANEL_APP_PORT_BTPORT} + - ${PANEL_APP_PORT_BTPORT}:${PANEL_APP_PORT_BTPORT}/udp + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${ARIA2_ROOT_PATH}/downloads:/downloads + - ${ARIA2_ROOT_PATH}/config:/config + - ${CUSTOM_MOUNT_DIRECTORY_1:-./default_mount_1}:${CUSTOM_MOUNT_DIRECTORY_1:-/default_mount_1} + - ${CUSTOM_MOUNT_DIRECTORY_2:-./default_mount_2}:${CUSTOM_MOUNT_DIRECTORY_2:-/default_mount_2} + - ${CUSTOM_MOUNT_DIRECTORY_3:-./default_mount_3}:${CUSTOM_MOUNT_DIRECTORY_3:-/default_mount_3} + - /lib/modules:/lib/modules + environment: + - PUID=0 + - PGID=0 + - UMASK=022 + - WEBUI=true + - WEBUI_PORT=${PANEL_APP_PORT_HTTP} + - BTPORT=${PANEL_APP_PORT_BTPORT} + - PORT=${PANEL_APP_PORT_RPC} + - UT=true + - RUT=true + - SMD=true + - CRA2B=2h + - QUIET=true diff --git a/apps/aria2-superng6/25-08-29/envs/default.env b/apps/aria2-superng6/25-08-29/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/aria2-superng6/25-08-29/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/aria2-superng6/25-08-29/envs/global.env b/apps/aria2-superng6/25-08-29/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/aria2-superng6/25-08-29/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/aria2-superng6/25-08-29/scripts/init.sh b/apps/aria2-superng6/25-08-29/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/aria2-superng6/25-08-29/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/aria2-superng6/25-08-29/scripts/uninstall.sh b/apps/aria2-superng6/25-08-29/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/aria2-superng6/25-08-29/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/aria2-superng6/25-08-29/scripts/upgrade.sh b/apps/aria2-superng6/25-08-29/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/aria2-superng6/25-08-29/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi