rustdesk github action custom server

发布时间:2024-10-20 03:01

Applicable to 1.38+ up to version 25-3-15

api server:https://github.com/lejianwen/rustdesk-api

composer:

 networks:
   rustdesk-net:
     external: false
 services:
   rustdesk:
     ports:
       - 127.0.0.1:21114:21114  #需要添加响应的nginx反代
       - 0.0.0.0:21115:21115
       - 0.0.0.0:21116:21116
       - 0.0.0.0:21117:21117
       - 0.0.0.0:21116:21116/udp
     image: lejianwen/rustdesk-server-s6:latest
     environment:
       - RELAY=xxx:21117
       - ENCRYPTED_ONLY=1
       - MUST_LOGIN=N
       - TZ=Asia/Shanghai
       - RUSTDESK_API_RUSTDESK_ID_SERVER=xxx:21116
       - RUSTDESK_API_RUSTDESK_RELAY_SERVER=xxx:21117
       - RUSTDESK_API_RUSTDESK_API_SERVER=https://xxx
       - RUSTDESK_API_KEY_FILE=/root/rustdesk/data/id_ed25519.pub
       - RUSTDESK_API_JWT_KEY=xxx
       - RUSTDESK_API_RUSTDESK_PERSONAL=1
       - CLIENT_PASSWORD=xxx
     volumes:
       - /root/rustdesk/data/server:/data
       - /root/rustdesk/data/api:/app/data
     networks:
       - rustdesk-net
     restart: unless-stopped



参考:https://github.com/lejianwen/rustdesk-api/issues/154

修改:
fork: https://github.com/rustdesk/hbb_common.git
根据`https://github.com/IamTaoChen/hbb_common.git`的修改记录,修改自己的hbb_common仓库,

然后fork https://github.com/rustdesk/rustdesk.git

变量: 存储库设置->secrets and variables->Actions->Repository secrets 对应路径: {项目路径}/settings/secrets/actions

API_SERVER=https://xxx
RENDEZVOUS_SERVER=xxx
RS_PUB_KEY=xxx
DEFAULT_PASSWORD=xxx

修改以下文件:(不修改hbb仓库,直接在rustdesk仓库中直接修改config.rs也可以)

update hbb submodule

git submodule set-url libs/hbb_common https://github.com/jessejii/hbb_common.git
git submodule sync
git submodule update --init --recursive
cd libs/hbb_common
git fetch
git checkout main

CI config

支持仓库设置变量

.github/workflows/flutter-build.yml -> 42

DEFAULT_PASSWORD: "${{ secrets.DEFAULT_PASSWORD }}"
RENDEZVOUS_SERVER: "${{ secrets.RENDEZVOUS_SERVER }}"
RS_PUB_KEY: "${{ secrets.RS_PUB_KEY }}"
API_SERVER: "${{ secrets.API_SERVER }}"

UI

去掉升级提示
flutter/lib/desktop/pages/desktop_home_page.dart -> 426

  Widget buildHelpCards(String updateUrl) {
    // if (!bind.isCustomClient() &&
    //     updateUrl.isNotEmpty &&
    //     !isCardClosed &&
    //     bind.mainUriPrefixSync().contains('rustdesk')) {
    //   return buildInstallCard(
    //       "Status",
    //       "There is a newer version of ${bind.mainGetAppNameSync()} ${bind.mainGetNewVersion()} available.",
    //       "Click to download", () async {
    //     final Uri url = Uri.parse('https://rustdesk.com/download');
    //     await launchUrl(url);
    //   }, closeButton: true);
    // }
C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config

C:\Users\Administrator\AppData\Roaming\RustDesk\config

C:\ProgramData\RustDesk\config