1
0
Fork 0

feat:重构迅雷适配#1849

This commit is contained in:
okxlin 2024-07-22 01:10:06 +08:00
parent a2870e65bc
commit bb5d62c56a
7 changed files with 281 additions and 128 deletions

View File

@ -1,7 +1,15 @@
CONTAINER_NAME="xunlei" CONTAINER_NAME="xunlei"
PANEL_APP_PORT_HTTP="40163"
DATA_PATH="./data/data" DATA_PATH="./data/data"
MOUNT_PATH="./data/downloads" DOWNLOAD_PATH="./data/downloads"
HOSTNAME="mynas" HOSTNAME="mynas"
HTTP_USER="user" PANEL_APP_PORT_HTTP=40163
HTTP_PWD="xunlei_password" PRIVILEGED_MODE="true"
XL_DASHBOARD_IP="0.0.0.0"
XL_DASHBOARD_PASSWORD="xunlei"
XL_DASHBOARD_USERNAME="user"
XL_DEBUG="false"
XL_DIR_DATA="/xunlei/data"
XL_DIR_DOWNLOAD="/xunlei/downloads"
XL_GID=1000
XL_PREVENT_UPDATE="true"
XL_UID=1000

View File

@ -1,47 +1,112 @@
additionalProperties: additionalProperties:
formFields: formFields:
- default: 40163 - default: "40163"
edit: true edit: true
envKey: PANEL_APP_PORT_HTTP envKey: PANEL_APP_PORT_HTTP
labelEn: Port labelEn: Port
labelZh: 端口 labelZh: 端口
required: true required: true
rule: paramPort rule: paramPort
type: number type: number
- default: ./data/data - default: "./data/data"
edit: true edit: true
envKey: DATA_PATH envKey: DATA_PATH
labelEn: Data folder path labelEn: Data Path
labelZh: 数据文件夹路径 labelZh: 数据路径
required: true required: true
type: text type: text
- default: ./data/downloads - default: "./data/downloads"
edit: true edit: true
envKey: DOWNLOAD_PATH envKey: DOWNLOAD_PATH
labelEn: Download folder path labelEn: Download Path
labelZh: 下载文件夹路径 labelZh: 下载路径
required: true required: true
type: text type: text
- default: mynas - default: "0.0.0.0"
edit: true edit: true
envKey: HOSTNAME envKey: XL_DASHBOARD_IP
labelEn: hostname labelEn: Dashboard IP
labelZh: 主机名 labelZh: 控制台 IP
required: true required: true
type: text type: text
- default: user - default: "user"
edit: true edit: true
envKey: HTTP_USER envKey: XL_DASHBOARD_USERNAME
labelEn: http auth user labelEn: Dashboard Username
labelZh: HTTP 用户 labelZh: 控制台用户名
required: true required: false
type: text type: text
- default: xunlei - default: "xunlei"
edit: true edit: true
envKey: HTTP_PWD envKey: XL_DASHBOARD_PASSWORD
labelEn: http auth password labelEn: Dashboard Password
labelZh: HTTP 密码 labelZh: 控制台密码
random: true required: false
required: true rule: paramComplexity
rule: paramComplexity type: password
type: password - default: "/xunlei/downloads"
disabled: true
envKey: XL_DIR_DOWNLOAD
labelEn: Download Directory (in container)
labelZh: 下载目录 (容器内)
required: true
type: text
- default: "/xunlei/data"
disabled: true
envKey: XL_DIR_DATA
labelEn: Data Directory (in container)
labelZh: 数据目录 (容器内)
required: true
type: text
- default: "1000"
edit: true
envKey: XL_UID
labelEn: User ID
labelZh: 用户 ID
required: true
type: number
- default: "1000"
edit: true
envKey: XL_GID
labelEn: Group ID
labelZh: 用户组 ID
required: true
type: number
- default: "true"
edit: true
envKey: XL_PREVENT_UPDATE
labelEn: Prevent Update
labelZh: 阻止更新
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: XL_DEBUG
labelEn: Debug Mode
labelZh: 调试模式
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "mynas"
edit: true
envKey: HOSTNAME
labelEn: Hostname
labelZh: 主机名
required: false
type: text
- default: "true"
disabled: true
envKey: PRIVILEGED_MODE
labelEn: Privilege mode switch
labelZh: 特权模式开关
required: true
type: text

View File

@ -1,5 +1,6 @@
services: services:
xunlei: xunlei:
image: "cnk3x/xunlei:3.20.1"
container_name: ${CONTAINER_NAME} container_name: ${CONTAINER_NAME}
restart: always restart: always
networks: networks:
@ -7,21 +8,24 @@ services:
ports: ports:
- "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}" - "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}"
volumes: volumes:
- "${DATA_PATH}:/xunlei/data" - "${DATA_PATH}:${XL_DIR_DATA}"
- "${DOWNLOAD_PATH}:/xunlei/downloads" - "${DOWNLOAD_PATH}:${XL_DIR_DOWNLOAD}"
environment: environment:
- UID=1000 - XL_DASHBOARD_PORT=${PANEL_APP_PORT_HTTP}
- GID=1000 - XL_DASHBOARD_IP=${XL_DASHBOARD_IP}
- XL_DEBUG=0 - XL_DASHBOARD_USERNAME=${XL_DASHBOARD_USERNAME}
- XL_WEB_PORT=${PANEL_APP_PORT_HTTP} - XL_DASHBOARD_PASSWORD=${XL_DASHBOARD_PASSWORD}
- XL_BA_USER=${HTTP_USER} - XL_DIR_DOWNLOAD=${XL_DIR_DOWNLOAD}
- XL_BA_PASSWORD=${HTTP_PWD} - XL_DIR_DATA=${XL_DIR_DATA}
- XL_UID=${XL_UID}
- XL_GID=${XL_GID}
- XL_PREVENT_UPDATE=${XL_PREVENT_UPDATE}
- XL_DEBUG=${XL_DEBUG}
hostname: ${HOSTNAME} hostname: ${HOSTNAME}
privileged: true privileged: ${PRIVILEGED_MODE}
image: cnk3x/xunlei:3.20.1 labels:
labels:
createdBy: "Apps" createdBy: "Apps"
networks: networks:
1panel-network: 1panel-network:
external: true external: true

View File

@ -1,8 +1,7 @@
name: 迅雷 name: 迅雷
tags: tags:
- 工具 - 实用工具
title: 提取自群晖平台的迅雷下载套件 title: 提取自群晖平台的迅雷下载套件
type: 工具
description: 提取自群晖平台的迅雷下载套件 description: 提取自群晖平台的迅雷下载套件
additionalProperties: additionalProperties:
key: xunlei key: xunlei

View File

@ -1,7 +1,15 @@
CONTAINER_NAME="xunlei" CONTAINER_NAME="xunlei"
PANEL_APP_PORT_HTTP="40163"
DATA_PATH="./data/data" DATA_PATH="./data/data"
MOUNT_PATH="./data/downloads" DOWNLOAD_PATH="./data/downloads"
HOSTNAME="mynas" HOSTNAME="mynas"
HTTP_USER="user" PANEL_APP_PORT_HTTP=40163
HTTP_PWD="xunlei_password" PRIVILEGED_MODE="true"
XL_DASHBOARD_IP="0.0.0.0"
XL_DASHBOARD_PASSWORD="xunlei"
XL_DASHBOARD_USERNAME="user"
XL_DEBUG="false"
XL_DIR_DATA="/xunlei/data"
XL_DIR_DOWNLOAD="/xunlei/downloads"
XL_GID=1000
XL_PREVENT_UPDATE="true"
XL_UID=1000

View File

@ -1,47 +1,112 @@
additionalProperties: additionalProperties:
formFields: formFields:
- default: 40163 - default: "40163"
edit: true edit: true
envKey: PANEL_APP_PORT_HTTP envKey: PANEL_APP_PORT_HTTP
labelEn: Port labelEn: Port
labelZh: 端口 labelZh: 端口
required: true required: true
rule: paramPort rule: paramPort
type: number type: number
- default: ./data/data - default: "./data/data"
edit: true edit: true
envKey: DATA_PATH envKey: DATA_PATH
labelEn: Data folder path labelEn: Data Path
labelZh: 数据文件夹路径 labelZh: 数据路径
required: true required: true
type: text type: text
- default: ./data/downloads - default: "./data/downloads"
edit: true edit: true
envKey: DOWNLOAD_PATH envKey: DOWNLOAD_PATH
labelEn: Download folder path labelEn: Download Path
labelZh: 下载文件夹路径 labelZh: 下载路径
required: true required: true
type: text type: text
- default: mynas - default: "0.0.0.0"
edit: true edit: true
envKey: HOSTNAME envKey: XL_DASHBOARD_IP
labelEn: hostname labelEn: Dashboard IP
labelZh: 主机名 labelZh: 控制台 IP
required: true required: true
type: text type: text
- default: user - default: "user"
edit: true edit: true
envKey: HTTP_USER envKey: XL_DASHBOARD_USERNAME
labelEn: http auth user labelEn: Dashboard Username
labelZh: HTTP 用户 labelZh: 控制台用户名
required: true required: false
type: text type: text
- default: xunlei - default: "xunlei"
edit: true edit: true
envKey: HTTP_PWD envKey: XL_DASHBOARD_PASSWORD
labelEn: http auth password labelEn: Dashboard Password
labelZh: HTTP 密码 labelZh: 控制台密码
random: true required: false
required: true rule: paramComplexity
rule: paramComplexity type: password
type: password - default: "/xunlei/downloads"
disabled: true
envKey: XL_DIR_DOWNLOAD
labelEn: Download Directory (in container)
labelZh: 下载目录 (容器内)
required: true
type: text
- default: "/xunlei/data"
disabled: true
envKey: XL_DIR_DATA
labelEn: Data Directory (in container)
labelZh: 数据目录 (容器内)
required: true
type: text
- default: "1000"
edit: true
envKey: XL_UID
labelEn: User ID
labelZh: 用户 ID
required: true
type: number
- default: "1000"
edit: true
envKey: XL_GID
labelEn: Group ID
labelZh: 用户组 ID
required: true
type: number
- default: "true"
edit: true
envKey: XL_PREVENT_UPDATE
labelEn: Prevent Update
labelZh: 阻止更新
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "false"
edit: true
envKey: XL_DEBUG
labelEn: Debug Mode
labelZh: 调试模式
required: true
type: select
values:
- label: "True"
value: "true"
- label: "False"
value: "false"
- default: "mynas"
edit: true
envKey: HOSTNAME
labelEn: Hostname
labelZh: 主机名
required: false
type: text
- default: "true"
disabled: true
envKey: PRIVILEGED_MODE
labelEn: Privilege mode switch
labelZh: 特权模式开关
required: true
type: text

View File

@ -1,5 +1,6 @@
services: services:
xunlei: xunlei:
image: "cnk3x/xunlei:latest"
container_name: ${CONTAINER_NAME} container_name: ${CONTAINER_NAME}
restart: always restart: always
networks: networks:
@ -7,21 +8,24 @@ services:
ports: ports:
- "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}" - "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}"
volumes: volumes:
- "${DATA_PATH}:/xunlei/data" - "${DATA_PATH}:${XL_DIR_DATA}"
- "${DOWNLOAD_PATH}:/xunlei/downloads" - "${DOWNLOAD_PATH}:${XL_DIR_DOWNLOAD}"
environment: environment:
- UID=1000 - XL_DASHBOARD_PORT=${PANEL_APP_PORT_HTTP}
- GID=1000 - XL_DASHBOARD_IP=${XL_DASHBOARD_IP}
- XL_DEBUG=0 - XL_DASHBOARD_USERNAME=${XL_DASHBOARD_USERNAME}
- XL_WEB_PORT=${PANEL_APP_PORT_HTTP} - XL_DASHBOARD_PASSWORD=${XL_DASHBOARD_PASSWORD}
- XL_BA_USER=${HTTP_USER} - XL_DIR_DOWNLOAD=${XL_DIR_DOWNLOAD}
- XL_BA_PASSWORD=${HTTP_PWD} - XL_DIR_DATA=${XL_DIR_DATA}
- XL_UID=${XL_UID}
- XL_GID=${XL_GID}
- XL_PREVENT_UPDATE=${XL_PREVENT_UPDATE}
- XL_DEBUG=${XL_DEBUG}
hostname: ${HOSTNAME} hostname: ${HOSTNAME}
privileged: true privileged: ${PRIVILEGED_MODE}
image: cnk3x/xunlei:latest labels:
labels:
createdBy: "Apps" createdBy: "Apps"
networks: networks:
1panel-network: 1panel-network:
external: true external: true