diff --git a/apps/transmission/4.0.6/data.yml b/apps/transmission/4.0.6/data.yml new file mode 100644 index 0000000..55fa12a --- /dev/null +++ b/apps/transmission/4.0.6/data.yml @@ -0,0 +1,97 @@ +additionalProperties: + formFields: + - default: "host" + edit: true + envKey: NETWORK_MODE + labelZh: 网络模式 + labelEn: Network Mode + required: true + type: select + values: + - label: 主机网络模式 + value: "host" + - label: 桥接网络模式 + value: "bridge" + - label: 无网络模式 + value: "none" + - label: 1panel-network + value: "1panel-network" + - default: 9091 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI Port + required: true + rule: paramPort + type: number + - default: 51413 + edit: true + envKey: PANEL_APP_PORT_TORRENTING + labelZh: Torrenting 端口 + labelEn: Torrenting Port + required: true + rule: paramPort + type: number + - default: "/home/transmission" + edit: true + envKey: TRANSMISSION_ROOT_PATH + labelZh: 数据持久化路径 + labelEn: Data persistence path + required: true + type: text + - default: "admin" + edit: true + envKey: USER + labelZh: 用户名 + labelEn: User + required: true + type: text + - default: "" + edit: true + envKey: PASS + labelZh: 密码 + labelEn: Password + required: true + type: password + - default: "" + edit: true + envKey: TRANSMISSION_WEB_HOME + labelZh: 第三方 UI 文件夹 + labelEn: Third-party UI folder + required: false + type: text + - default: "" + edit: true + envKey: WHITELIST + labelZh: IP 白名单 + labelEn: Whitelist + required: false + type: text + - default: "" + edit: true + envKey: HOST_WHITELIST + labelZh: 主机白名单 + labelEn: Host Whitelist + required: false + type: text + - 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/transmission/4.0.6/docker-compose.yml b/apps/transmission/4.0.6/docker-compose.yml new file mode 100644 index 0000000..85cce94 --- /dev/null +++ b/apps/transmission/4.0.6/docker-compose.yml @@ -0,0 +1,32 @@ +networks: + 1panel-network: + external: true + +services: + transmission: + image: linuxserver/transmission:4.0.6 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + network_mode: ${NETWORK_MODE} + ports: + - ${PANEL_APP_PORT_HTTP}:9091 + - ${PANEL_APP_PORT_TORRENTING} + - ${PANEL_APP_PORT_TORRENTING}/udp + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + volumes: + - ${TRANSMISSION_ROOT_PATH}/themes:/themes + - ${TRANSMISSION_ROOT_PATH}/config:/config + - ${TRANSMISSION_ROOT_PATH}/downloads:/downloads + - ${TRANSMISSION_ROOT_PATH}/watch:/watch + - ${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} + environment: + - PUID=1000 + - PGID=1000 + - PEERPORT= ${PANEL_APP_PORT_TORRENTING} + - TZ=Asia/Shanghai diff --git a/apps/transmission/4.0.6/envs/default.env b/apps/transmission/4.0.6/envs/default.env new file mode 100644 index 0000000..cd05f46 --- /dev/null +++ b/apps/transmission/4.0.6/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/transmission/4.0.6/envs/global.env b/apps/transmission/4.0.6/envs/global.env new file mode 100644 index 0000000..e10989f --- /dev/null +++ b/apps/transmission/4.0.6/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/transmission/4.0.6/scripts/init.sh b/apps/transmission/4.0.6/scripts/init.sh new file mode 100644 index 0000000..b2e1da9 --- /dev/null +++ b/apps/transmission/4.0.6/scripts/init.sh @@ -0,0 +1,53 @@ +#!/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 + + mkdir -p "$TRANSMISSION_ROOT_PATH/downloads" + mkdir -p "$TRANSMISSION_ROOT_PATH/downloads/complete" + mkdir -p "$TRANSMISSION_ROOT_PATH/downloads/incomplete" + + # setup-2 install theme + if [ ! -d "$TRANSMISSION_ROOT_PATH/themes" ]; then + mkdir -p "$TRANSMISSION_ROOT_PATH/themes" + + if command -v unzip >/dev/null 2>&1; then + unzip -o themes/flood-for-transmission.zip -d "$TRANSMISSION_ROOT_PATH/themes" + UNZIP_SUCCESS=$? + elif command -v tar >/dev/null 2>&1; then + tar -xf themes/flood-for-transmission.zip -C "$TRANSMISSION_ROOT_PATH/themes" + UNZIP_SUCCESS=$? + else + echo "Warning: Neither 'unzip' nor 'tar' is installed. Skipping theme extraction." + UNZIP_SUCCESS=1 + fi + + if [ $UNZIP_SUCCESS -eq 0 ]; then + echo "Theme successfully extracted." + + if grep -q "^TRANSMISSION_WEB_HOME=" .env; then + sed -i 's|^TRANSMISSION_WEB_HOME=.*|TRANSMISSION_WEB_HOME=/themes/flood-for-transmission|' .env + else + echo "TRANSMISSION_WEB_HOME=/themes/flood-for-transmission" >> .env + fi + else + echo "Warning: Failed to extract the theme archive. Proceeding without extracted theme." + fi + else + echo "Themes directory already exists. Skipping extraction." + fi + + chown -R 1000:1000 "$TRANSMISSION_ROOT_PATH" + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/transmission/4.0.6/scripts/uninstall.sh b/apps/transmission/4.0.6/scripts/uninstall.sh new file mode 100644 index 0000000..c86c4fb --- /dev/null +++ b/apps/transmission/4.0.6/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/transmission/4.0.6/scripts/upgrade.sh b/apps/transmission/4.0.6/scripts/upgrade.sh new file mode 100644 index 0000000..07fb8c3 --- /dev/null +++ b/apps/transmission/4.0.6/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 diff --git a/apps/transmission/4.0.6/themes/flood-for-transmission.zip b/apps/transmission/4.0.6/themes/flood-for-transmission.zip new file mode 100644 index 0000000..0b5af67 Binary files /dev/null and b/apps/transmission/4.0.6/themes/flood-for-transmission.zip differ diff --git a/apps/transmission/README.md b/apps/transmission/README.md index 5ca5616..6207958 100644 --- a/apps/transmission/README.md +++ b/apps/transmission/README.md @@ -2,6 +2,11 @@ Transmission 是一款开源、高性能的BT/PT下载工具,支持Web界面和多平台。 +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/Transmission.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + + ## 功能特性 - 高性能BT/PT下载,支持种子和磁力链接 diff --git a/apps/transmission/README_en.md b/apps/transmission/README_en.md index cadc746..af59dab 100644 --- a/apps/transmission/README_en.md +++ b/apps/transmission/README_en.md @@ -2,6 +2,10 @@ Transmission is an open-source, high-performance BT/PT downloader with web interface support. +![](https://cdn.jsdelivr.net/gh/xiaoY233/PicList@main/public/assets/Transmission.png) + +![](https://img.shields.io/badge/Copyright-arch3rPro-ff9800?style=flat&logo=github&logoColor=white) + ## Features - High-performance BT/PT downloading, supports torrents and magnet links diff --git a/apps/transmission/latest/.env.sample b/apps/transmission/latest/.env.sample new file mode 100644 index 0000000..9fbfb4c --- /dev/null +++ b/apps/transmission/latest/.env.sample @@ -0,0 +1,8 @@ +CONTAINER_NAME="transmission" +DOWNLOAD_PATH="./data/downloads" +PANEL_APP_PORT_HTTP="40154" +PEER_PORT_VALUE="40152" +WATCH_PATH="./data/watch" +WEBUI_USER="" +WEBUI_PWD="" + diff --git a/apps/transmission/latest/data.yml b/apps/transmission/latest/data.yml index a063c73..2a02d49 100644 --- a/apps/transmission/latest/data.yml +++ b/apps/transmission/latest/data.yml @@ -1,19 +1,48 @@ additionalProperties: - formFields: - - default: 9091 - edit: true - envKey: PANEL_APP_PORT_HTTP - labelEn: Web UI Port - labelZh: Web界面端口 - required: true - rule: paramPort - type: number - label: - en: Web UI Port - ja: Web UI ポート - ms: Port UI Web - pt-br: Porta da interface web - ru: Веб-порт интерфейса - ko: 웹 UI 포트 - zh-Hant: Web UI 埠 - zh: Web界面端口 \ No newline at end of file + formFields: + - default: 40154 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: WebUI Port + labelZh: 网页端口 + required: true + rule: paramPort + type: number + - default: 40152 + edit: true + envKey: PEER_PORT_VALUE + labelEn: Peer Port + labelZh: BT端口 + required: true + rule: paramPort + type: number + - default: ./data/watch + edit: true + envKey: WATCH_PATH + labelEn: Watch folder for torrent files + labelZh: 监视种子文件的文件夹 + required: true + type: text + - default: ./data/downloads + edit: true + envKey: DOWNLOAD_PATH + labelEn: Download folder path + labelZh: 下载文件夹路径 + required: true + type: text + - default: "" + edit: true + envKey: WEBUI_USER + labelEn: Webui user + labelZh: 网页用户 + required: false + type: text + - default: "" + edit: true + envKey: WEBUI_PWD + labelEn: Webui password + labelZh: 网页密码 + random: false + required: false + rule: paramComplexity + type: password diff --git a/apps/transmission/latest/docker-compose.yml b/apps/transmission/latest/docker-compose.yml index 5f4a070..874edb2 100644 --- a/apps/transmission/latest/docker-compose.yml +++ b/apps/transmission/latest/docker-compose.yml @@ -1,24 +1,31 @@ services: transmission: container_name: ${CONTAINER_NAME} - image: lscr.io/linuxserver/transmission:latest restart: always networks: - 1panel-network ports: - "${PANEL_APP_PORT_HTTP}:9091" - - "51413:51413" - - "51413:51413/udp" + - "${PEER_PORT_VALUE}:${PEER_PORT_VALUE}" + - "${PEER_PORT_VALUE}:${PEER_PORT_VALUE}/udp" + volumes: + - "./data/config:/config" + - "${DOWNLOAD_PATH}:/downloads" + - "${WATCH_PATH}:/watch" environment: - - TZ=Asia/Shanghai - PUID=1000 - PGID=1000 - volumes: - - ./config:/config - - ./downloads:/downloads - - ./watch:/watch - labels: + - TZ=Asia/Shanghai + - TRANSMISSION_WEB_HOME= #optional + - USER=${WEBUI_USER} + - PASS=${WEBUI_PWD} + - WHITELIST= #optional + - PEERPORT=${PEER_PORT_VALUE} + - HOST_WHITELIST= #optional + image: linuxserver/transmission:latest + labels: createdBy: "Apps" -networks: - 1panel-network: - external: true \ No newline at end of file + +networks: + 1panel-network: + external: true