Merge remote-tracking branch 'origin/custom' into custom

This commit is contained in:
Meng Sen
2025-04-27 11:51:28 +08:00
94 changed files with 499 additions and 15 deletions

View File

@@ -0,0 +1,154 @@
additionalProperties:
formFields:
- default: "/home/rustdesk-api"
edit: true
envKey: RUSTDESK_API_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 21114
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: "http://127.0.0.1"
edit: true
envKey: RUSTDESK_SERVER_URL
labelZh: RustDesk 服务地址
labelEn: RustDesk server address
required: true
type: text
- default: "RustDesk API Admin"
edit: true
envKey: RUSTDESK_API_ADMIN_TITLE
labelZh: 后台页面标题
labelEn: Admin page title
required: true
type: text
- default: ""
edit: true
envKey: RUSTDESK_API_RUSTDESK_KEY
labelZh: RustDesk API 密钥
labelEn: RustDesk API key
required: true
type: password
- default: "168h"
edit: true
envKey: RUSTDESK_API_APP_TOKEN_EXPIRE
labelZh: 登录有效期
labelEn: Login validity period
required: true
type: text
- default: "1"
edit: true
envKey: RUSTDESK_API_APP_WEB_CLIENT
labelZh: 启用 Web Client
labelEn: Enable Web Client
required: true
type: select
values:
- label: 启用
value: "1"
- label: 禁用
value: "0"
- default: "1"
edit: true
envKey: RUSTDESK_API_APP_SHOW_SWAGGER
labelZh: 开启 Swagger 文档
labelEn: Enable Swagger docs
required: true
type: select
values:
- label: 启用
value: "1"
- label: 禁用
value: "0"
- default: "false"
edit: true
envKey: RUSTDESK_API_APP_REGISTER
labelZh: 启用注册
labelEn: Enable register
required: true
type: select
values:
- label: 启用
value: "true"
- label: 禁用
value: "false"
- default: "false"
edit: true
envKey: RUSTDESK_API_APP_DISABLE_PWD_LOGIN
labelZh: 登录策略
labelEn: Login strategy
required: true
type: select
values:
- label: 禁用密码登录
value: "true"
- label: 允许密码登录
value: "false"
- default: "false"
edit: true
envKey: RUSTDESK_API_PROXY_ENABLE
labelZh: 启用代理
labelEn: Enable proxy
required: true
type: select
values:
- label: 启用
value: "true"
- label: 禁用
value: "false"
- default: ""
edit: true
envKey: RUSTDESK_API_PROXY_HOST
labelZh: 代理地址
labelEn: Proxy address
required: false
type: text
- default: "sqlite"
edit: true
envKey: RUSTDESK_API_GORM_TYPE
labelZh: 数据库类型
labelEn: Database type
required: true
type: select
values:
- label: sqlite
value: "sqlite"
- label: MySQL
value: "false"
- default: "127.0.0.1:3306"
edit: true
envKey: RUSTDESK_API_MYSQL_ADDR
labelZh: 数据库地址
labelEn: Database Host
required: false
type: text
- default: "rustdesk"
edit: true
envKey: RUSTDESK_API_MYSQL_DBNAME
labelZh: 数据库 名称
labelEn: Database Name
required: false
rule: paramCommon
type: text
- default: "rustdesk"
edit: true
envKey: RUSTDESK_API_MYSQL_USERNAME
labelZh: 数据库 用户名
labelEn: Database Username
required: false
type: text
- default: ""
edit: true
envKey: RUSTDESK_API_MYSQL_PASSWORD
labelZh: 数据库 密码
labelEn: Database Password
required: false
rule: paramComplexity
type: password

View File

@@ -4,7 +4,7 @@ networks:
services:
rustdesk-api:
image: lejianwen/rustdesk-api:v2.6.16
image: lejianwen/rustdesk-api:v2.6.19
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"

View File

@@ -11,7 +11,7 @@ services:
- PORT=7789
- CONFIG=/config
- TZ=Asia/Shanghai
image: wushuo894/ani-rss:v1.2.27
image: wushuo894/ani-rss:v1.2.28
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- verificationCodeTimeout=10
- appname=casdoor
- authState=casdoor
image: casbin/casdoor:v1.897.0
image: casbin/casdoor:v1.898.0
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- database__client=mysql
- mail__options__service=Email
- mail__options__secure=true
image: ghost:5.118.0
image: ghost:5.118.1
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- N8N_PROTOCOL=http
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_SECURE_COOKIE=false
image: n8nio/n8n:1.90.1
image: n8nio/n8n:1.90.2
labels:
createdBy: Apps
networks:

View File

@@ -17,7 +17,7 @@ services:
PHOTOPRISM_PASSWORD_LENGTH: 8
PHOTOPRISM_UID: 0
PHOTOPRISM_UMASK: 18
image: photoprism/photoprism:250321
image: photoprism/photoprism:250425
labels:
createdBy: Apps
networks:

View File

@@ -57,7 +57,7 @@ services:
- -f
- http://localhost:1200/healthz?key=${ACCESS_KEY}
timeout: 10s
image: diygod/rsshub:2025-04-24
image: diygod/rsshub:2025-04-25
labels:
createdBy: Apps
networks:

View File

@@ -0,0 +1,51 @@
# 数据持久化路径 [必填]
RUSTDESK_API_ROOT_PATH=/home/rustdesk-api
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=21114
# RustDesk 服务地址 [必填]
RUSTDESK_SERVER_URL=http://127.0.0.1
# 后台页面标题 [必填]
RUSTDESK_API_ADMIN_TITLE=RustDesk API Admin
# RustDesk API 密钥 [必填]
RUSTDESK_API_RUSTDESK_KEY=
# 登录有效期 [必填]
RUSTDESK_API_APP_TOKEN_EXPIRE=168h
# 启用 Web Client [必填]
RUSTDESK_API_APP_WEB_CLIENT=1
# 开启 Swagger 文档 [必填]
RUSTDESK_API_APP_SHOW_SWAGGER=1
# 启用注册 [必填]
RUSTDESK_API_APP_REGISTER=false
# 登录策略 [必填]
RUSTDESK_API_APP_DISABLE_PWD_LOGIN=false
# 启用代理 [必填]
RUSTDESK_API_PROXY_ENABLE=false
# 代理地址
RUSTDESK_API_PROXY_HOST=
# 数据库类型 [必填]
RUSTDESK_API_GORM_TYPE=sqlite
# 数据库地址
RUSTDESK_API_MYSQL_ADDR=127.0.0.1:3306
# 数据库 名称
RUSTDESK_API_MYSQL_DBNAME=rustdesk
# 数据库 用户名
RUSTDESK_API_MYSQL_USERNAME=rustdesk
# 数据库 密码
RUSTDESK_API_MYSQL_PASSWORD=

View File

@@ -0,0 +1,5 @@
#!/command/with-contenv sh
cd /data || exit
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbr $PARAMS

View File

@@ -0,0 +1,6 @@
#!/command/with-contenv sh
sleep 2
cd /data
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbs -r $RELAY $PARAMS

View File

@@ -0,0 +1,52 @@
networks:
1panel-network:
external: true
services:
rustdesk-api:
container_name: rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RUSTDESK_API_RUSTDESK_ID_SERVER=${RUSTDESK_SERVER_URL}:21116
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=${RUSTDESK_SERVER_URL}:21117
- RUSTDESK_API_RUSTDESK_API_SERVER=${RUSTDESK_SERVER_URL}:${PANEL_APP_PORT_HTTP:-21114}
image: lejianwen/rustdesk-api:v2.6.19
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:21114
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
rustdesk-server-s6:
container_name: server-rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RELAY=${RUSTDESK_SERVER_URL}:21117
- ENCRYPTED_ONLY=1
image: rustdesk/rustdesk-server-s6:latest
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21117:21117
- 21118:21118
- 21119:21119
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
- ${HBBR_RUN_FILE:-./conf/hbbr/run}:/etc/s6-overlay/s6-rc.d/hbbr/run
- ${HBBS_RUN_FILE:-./conf/hbbs/run}:/etc/s6-overlay/s6-rc.d/hbbs/run

View File

@@ -0,0 +1,19 @@
#!/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 "HBBR_RUN_FILE=${CURRENT_DIR}/conf/hbbr/run" >> .env
echo "HBBS_RUN_FILE=${CURRENT_DIR}/conf/hbbs/run" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -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

View File

@@ -0,0 +1,34 @@
# RustDesk API
RustDesk 是一款远程访问和远程控制软件
![RustDesk API](https://file.lifebus.top/imgs/rustdesk-api_cover.png)
![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue)
## 简介
本项目使用 Go 实现了 RustDesk 的 API并包含了 Web Admin 和 Web 客户端。RustDesk 是一个远程桌面软件,提供了自托管的解决方案。
## 安装说明
### 端口
RustDesk 服务器自托管所需的端口很大程度上取决于您的环境以及您希望使用 RustDesk 做什么。
核心端口:
| 类型 | 范围 |
|-----|-------------|
| TCP | 21114-21119 |
| UDP | 21116 |
其中 21115-21117 是 RustDesk 工作所需的最低端口,它们处理信号和中继端口以及 NAT 遍历。
TCP 端口 21118 和 21119 是 RustDesk Web 客户端的 WebSocket 端口,您需要一个反向代理才能使其支持 HTTPS。
对于没有 SSL 代理的专业用户,您需要打开 TCP 端口 21114 才能使 API 工作,或者使用 SSL 代理打开 TCP 端口 443 。
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)

View File

@@ -0,0 +1,14 @@
additionalProperties:
key: rustdesk-api
name: RustDesk API
tags:
- WebSite
- Local
shortDescZh: RustDesk 的 API 管理平台
shortDescEn: RustDesk API management platform
type: website
crossVersionUpdate: true
limit: 0
website: https://rustdesk.com/
github: https://github.com/lejianwen/rustdesk-api/
document: https://github.com/lejianwen/rustdesk-api/

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -16,7 +16,7 @@ services:
- WEBLATE_ALLOWED_HOSTS=*
- POSTGRES_DATABASE=weblate
- CLIENT_MAX_BODY_SIZE=200M
image: weblate/weblate:5.11.0.0
image: weblate/weblate:5.11.1.0
labels:
createdBy: Apps
networks:

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

View File

@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -11,7 +11,7 @@ services:
- PORT=7789
- CONFIG=/config
- TZ=Asia/Shanghai
image: wushuo894/ani-rss:v1.2.27
image: wushuo894/ani-rss:v1.2.28
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- verificationCodeTimeout=10
- appname=casdoor
- authState=casdoor
image: casbin/casdoor:v1.897.0
image: casbin/casdoor:v1.898.0
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- database__client=mysql
- mail__options__service=Email
- mail__options__secure=true
image: ghost:5.118.0
image: ghost:5.118.1
labels:
createdBy: Apps
networks:

View File

@@ -14,7 +14,7 @@ services:
- N8N_PROTOCOL=http
- N8N_DIAGNOSTICS_ENABLED=false
- N8N_SECURE_COOKIE=false
image: n8nio/n8n:1.90.1
image: n8nio/n8n:1.90.2
labels:
createdBy: Apps
networks:

View File

@@ -17,7 +17,7 @@ services:
PHOTOPRISM_PASSWORD_LENGTH: 8
PHOTOPRISM_UID: 0
PHOTOPRISM_UMASK: 18
image: photoprism/photoprism:250321
image: photoprism/photoprism:250425
labels:
createdBy: Apps
networks:

View File

@@ -57,7 +57,7 @@ services:
- -f
- http://localhost:1200/healthz?key=${ACCESS_KEY}
timeout: 10s
image: diygod/rsshub:2025-04-24
image: diygod/rsshub:2025-04-25
labels:
createdBy: Apps
networks:

51
dockge/rustdesk-api/.env Normal file
View File

@@ -0,0 +1,51 @@
# 数据持久化路径 [必填]
RUSTDESK_API_ROOT_PATH=/home/rustdesk-api
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=21114
# RustDesk 服务地址 [必填]
RUSTDESK_SERVER_URL=http://127.0.0.1
# 后台页面标题 [必填]
RUSTDESK_API_ADMIN_TITLE=RustDesk API Admin
# RustDesk API 密钥 [必填]
RUSTDESK_API_RUSTDESK_KEY=
# 登录有效期 [必填]
RUSTDESK_API_APP_TOKEN_EXPIRE=168h
# 启用 Web Client [必填]
RUSTDESK_API_APP_WEB_CLIENT=1
# 开启 Swagger 文档 [必填]
RUSTDESK_API_APP_SHOW_SWAGGER=1
# 启用注册 [必填]
RUSTDESK_API_APP_REGISTER=false
# 登录策略 [必填]
RUSTDESK_API_APP_DISABLE_PWD_LOGIN=false
# 启用代理 [必填]
RUSTDESK_API_PROXY_ENABLE=false
# 代理地址
RUSTDESK_API_PROXY_HOST=
# 数据库类型 [必填]
RUSTDESK_API_GORM_TYPE=sqlite
# 数据库地址
RUSTDESK_API_MYSQL_ADDR=127.0.0.1:3306
# 数据库 名称
RUSTDESK_API_MYSQL_DBNAME=rustdesk
# 数据库 用户名
RUSTDESK_API_MYSQL_USERNAME=rustdesk
# 数据库 密码
RUSTDESK_API_MYSQL_PASSWORD=

View File

@@ -0,0 +1,5 @@
#!/command/with-contenv sh
cd /data || exit
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbr $PARAMS

View File

@@ -0,0 +1,6 @@
#!/command/with-contenv sh
sleep 2
cd /data
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbs -r $RELAY $PARAMS

View File

@@ -0,0 +1,52 @@
networks:
1panel-network:
external: true
services:
rustdesk-api:
container_name: rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RUSTDESK_API_RUSTDESK_ID_SERVER=${RUSTDESK_SERVER_URL}:21116
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=${RUSTDESK_SERVER_URL}:21117
- RUSTDESK_API_RUSTDESK_API_SERVER=${RUSTDESK_SERVER_URL}:${PANEL_APP_PORT_HTTP:-21114}
image: lejianwen/rustdesk-api:v2.6.19
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:21114
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
rustdesk-server-s6:
container_name: server-rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RELAY=${RUSTDESK_SERVER_URL}:21117
- ENCRYPTED_ONLY=1
image: rustdesk/rustdesk-server-s6:latest
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21117:21117
- 21118:21118
- 21119:21119
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
- ${HBBR_RUN_FILE:-./conf/hbbr/run}:/etc/s6-overlay/s6-rc.d/hbbr/run
- ${HBBS_RUN_FILE:-./conf/hbbs/run}:/etc/s6-overlay/s6-rc.d/hbbs/run

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

View File

@@ -16,7 +16,7 @@ services:
- WEBLATE_ALLOWED_HOSTS=*
- POSTGRES_DATABASE=weblate
- CLIENT_MAX_BODY_SIZE=200M
image: weblate/weblate:5.11.0.0
image: weblate/weblate:5.11.1.0
labels:
createdBy: Apps
networks: