From e4c85764f956a197e559b44fde035e67e7ed0c8d Mon Sep 17 00:00:00 2001 From: Guoiaoang <9270265+guoiaoang@users.noreply.github.com> Date: Sat, 19 Apr 2025 09:48:05 +0800 Subject: [PATCH 01/43] fix translation errors (#545) --- README-ZH.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README-ZH.md b/README-ZH.md index 4f8c07b..b2739b9 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -337,7 +337,7 @@ Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hf |-----------------------|---------------|--------------------------------------------------| | ALWAYS_USE_RELAY | hbbs | 如果设定为 **"Y"**,将关闭直接点对点连接功能 | | DB_URL | hbbs | 数据库配置 | -| DOWNGRADE_START_CHECK | hbbr | 降级检查之前的延迟是啊尽(以秒为单位) | +| DOWNGRADE_START_CHECK | hbbr | 降级检查之前的延迟时间(以秒为单位) | | DOWNGRADE_THRESHOLD | hbbr | 降级检查的阈值(bit/ms) | | KEY | hbbs/hbbr | 如果设置了此参数,将强制使用指定密钥对,如果设为 **"_"**,则强制使用任意密钥 | | LIMIT_SPEED | hbbr | 速度限制(以Mb/s为单位) | @@ -345,4 +345,4 @@ Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hf | RELAY_SERVERS | hbbs | 运行hbbr的机器的IP地址/DNS名称(用逗号分隔) | | RUST_LOG | all | 设置 debug level (error\|warn\|info\|debug\|trace) | | SINGLE_BANDWIDTH | hbbr | 单个连接的最大带宽(以Mb/s为单位) | -| TOTAL_BANDWIDTH | hbbr | 最大总带宽(以Mb/s为单位) | \ No newline at end of file +| TOTAL_BANDWIDTH | hbbr | 最大总带宽(以Mb/s为单位) | From 235a3c326ceb665e941edb50ab79faa1208f7507 Mon Sep 17 00:00:00 2001 From: bato3 <11570+bato3@users.noreply.github.com> Date: Tue, 29 Apr 2025 14:40:55 +0200 Subject: [PATCH 02/43] In cargo it is named "rustdesk-utils" (#551) --- src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 29d8c37..9323294 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -10,7 +10,7 @@ use std::{ fn print_help() { println!( "Usage: - rustdesk-util [command]\n + rustdesk-utils [command]\n Available Commands: genkeypair Generate a new keypair validatekeypair [public key] [secret key] Validate an existing keypair From 2417c7ddd092e63a86a203b0897ce4a63f46378a Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sun, 11 May 2025 20:54:24 +0800 Subject: [PATCH 03/43] Update build.yaml --- .github/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cfab435..1de0971 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -307,7 +307,7 @@ jobs: # manifest for :1.2.3 tag # this has to run only if invoked by a new tag - name: Create and push manifest (:ve.rs.ion) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 if: github.event_name != 'workflow_dispatch' with: base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }} @@ -316,7 +316,7 @@ jobs: # manifest for :1 tag (major release) - name: Create and push manifest (:major) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 with: base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }} extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-i386 @@ -324,7 +324,7 @@ jobs: # manifest for :latest tag - name: Create and push manifest (:latest) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 with: base-image: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }} extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-i386 @@ -428,7 +428,7 @@ jobs: # manifest for :1.2.3 tag # this has to run only if invoked by a new tag - name: Create and push manifest (:ve.rs.ion) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 if: github.event_name != 'workflow_dispatch' with: base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }} @@ -437,7 +437,7 @@ jobs: # manifest for :1 tag (major release) - name: Create and push manifest (:major) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 with: base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }} extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-armv7 @@ -445,7 +445,7 @@ jobs: # manifest for :latest tag - name: Create and push manifest (:latest) - uses: Noelware/docker-manifest-action@master + uses: Noelware/docker-manifest-action@0.4.3 with: base-image: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }} extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-armv7 From 1e8447883790a2adb4ff8b7dc87a269d4b34cb40 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 16 Jun 2025 00:20:09 +0800 Subject: [PATCH 04/43] simplify doc --- README-DE.md | 345 -------------------------------------------------- README-NL.md | 345 -------------------------------------------------- README-TW.md | 347 --------------------------------------------------- README.md | 323 +---------------------------------------------- 4 files changed, 2 insertions(+), 1358 deletions(-) delete mode 100644 README-DE.md delete mode 100644 README-NL.md delete mode 100644 README-TW.md diff --git a/README-DE.md b/README-DE.md deleted file mode 100644 index 6cc2252..0000000 --- a/README-DE.md +++ /dev/null @@ -1,345 +0,0 @@ -

- Erstellen • - Docker • - S6-Overlay • - Schlüsselpaar • - Debian-Pakete • - Umgebungsvariablen
- [English] | [Nederlands] | [繁體中文] | [简体中文]
-

- -# RustDesk Server-Programm - -[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) - -[**Herunterladen**](https://github.com/rustdesk/rustdesk-server/releases) - -[**Handbuch**](https://rustdesk.com/docs/de/self-host/) - -[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) - -Hosten Sie Ihren eigenen RustDesk-Server selbst, er ist kostenlos und quelloffen. - -## Manuelles Erstellen - -```bash -cargo build --release -``` - -In target/release werden drei ausführbare Dateien erzeugt. - -- hbbs - RustDesk ID/Rendezvous-Server -- hbbr - RustDesk Relay-Server -- rustdesk-utils - RustDesk CLI-Utilities - -[Hier](https://github.com/rustdesk/rustdesk-server/releases) finden Sie aktualisierte Binärdateien. - -Wenn Sie Ihren eigenen Server entwickeln wollen, könnte [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) ein besserer und einfacherer Start für Sie sein als dieses Repository. - -## Docker-Image - -Docker-Images werden automatisch generiert und bei jedem Github-Release veröffentlicht. Wir haben 2 Arten von Images. - -### Klassisches Image - -Diese Images sind mit `Ubuntu 20.04` gebaut, mit dem Zusatz der wichtigen Binärdateien (`hbbr` und `hbbs`). Sie sind auf [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) mit diesen Tags verfügbar: - -| Architektur | Image:Tag | -| --- | --- | -| amd64 | `rustdesk/rustdesk-server:latest` | -| arm64v8 | `rustdesk/rustdesk-server:latest-arm64v8` | - -Sie können diese Images direkt mit `docker run` mit diesen Befehlen starten: - -```bash -docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -Oder ohne `--net=host`, aber die P2P-Direktverbindung kann dann nicht funktionieren. - -Bei Systemen, die SELinux verwenden, muss `/root` durch `/root:z` ersetzt werden, damit die Container korrekt laufen. Alternativ kann die SELinux-Containertrennung durch Hinzufügen der Option `--security-opt label=disable` vollständig deaktiviert werden. - -```bash -docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -Der Parameter `relay-server-ip` ist die IP-Adresse (oder der DNS-Name) des Servers, auf dem diese Container laufen. Der **optionale** Parameter `port` muss verwendet werden, wenn Sie einen anderen Port als **21117** für `hbbr` verwenden. - -Sie können auch Docker Compose verwenden, wobei diese Konfiguration als Vorlage dient: - -```yaml -version: '3' - -networks: - rustdesk-net: - external: false - -services: - hbbs: - container_name: hbbs - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21118:21118 - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 - volumes: - - ./data:/root - networks: - - rustdesk-net - depends_on: - - hbbr - restart: unless-stopped - - hbbr: - container_name: hbbr - ports: - - 21117:21117 - - 21119:21119 - image: rustdesk/rustdesk-server:latest - command: hbbr - volumes: - - ./data:/root - networks: - - rustdesk-net - restart: unless-stopped -``` - -Bearbeiten Sie Zeile 16 so, dass sie auf Ihren Relay-Server verweist (den, der am Port 21117 lauscht). Sie können auch die Zeilen für die Volumes (Zeile 18 und 33) bearbeiten, wenn Sie dies wünschen. - -(Die Anerkennung für Docker Compose geht an @lukebarone und @QuiGonLeong.) - -## S6-Overlay-basierte Images - -Diese Images sind mit `busybox:stable` gebaut, mit dem Zusatz Binärdateien (sowohl hbbr als auch hbbs) und [S6-overlay](https://github.com/just-containers/s6-overlay). Sie sind auf [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-s6/) mit diesen Tags verfügbar: - -| Architektur | Version | Image:Tag | -| --- | --- | --- | -| multiarch | neueste | `rustdesk/rustdesk-server-s6:latest` | -| amd64 | neueste | `rustdesk/rustdesk-server-s6:latest-amd64` | -| i386 | neueste | `rustdesk/rustdesk-server-s6:latest-i386` | -| arm64v8 | neueste | `rustdesk/rustdesk-server-s6:latest-arm64v8` | -| armv7 | neueste | `rustdesk/rustdesk-server-s6:latest-armv7` | -| multiarch | 2 | `rustdesk/rustdesk-server-s6:2` | -| amd64 | 2 | `rustdesk/rustdesk-server-s6:2-amd64` | -| i386 | 2 | `rustdesk/rustdesk-server-s6:2-i386` | -| arm64v8 | 2 | `rustdesk/rustdesk-server-s6:2-arm64v8` | -| armv7 | 2 | `rustdesk/rustdesk-server-s6:2-armv7` | -| multiarch | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0` | -| amd64 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-amd64` | -| i386 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-i386` | -| arm64v8 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-arm64v8` | -| armv7 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-armv7` | - -Es wird dringend empfohlen, das Image `multiarch` entweder mit dem Tag `major version` oder `latest` zu verwenden. - -Das S6-Overlay fungiert als Supervisor und hält beide Prozesse am Laufen, sodass bei diesem Image keine zwei separaten Container benötigt werden. - -Sie können diese Images direkt mit `docker run` mit diesem Befehl starten: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -oder ohne `--net=host`, aber die P2P-Direktverbindung kann dann nicht funktionieren. - -```bash -docker run --name rustdesk-server \ - -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ - -p 21117:21117 -p 21118:21118 -p 21119:21119 \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -Oder Sie können eine Docker Compose-Datei verwenden: - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - volumes: - - ./data:/data - restart: unless-stopped -``` - -Für dieses Container-Image können Sie diese Umgebungsvariablen verwenden, **zusätzlich** zu den im Abschnitt **Umgebungsvariablen** angegebenen Variablen: - -| Variable | optional | Beschreibung | -| --- | --- | --- | -| RELAY | nein | IP-Adresse/DNS-Name des Rechners, auf dem dieser Container läuft | -| ENCRYPTED_ONLY | ja | Wenn auf **1** gesetzt, wird eine unverschlüsselte Verbindung nicht akzeptiert | -| KEY_PUB | ja | Öffentlicher Teil des Schlüsselpaares | -| KEY_PRIV | ja | Privater Teil des Schlüsselpaares | - -### Verwaltung von Geheimnissen in S6-Overlay-basierten Images - -Sie können das Schlüsselpaar natürlich in einem Docker-Volume aufbewahren, aber empfehlenswert ist, die Schlüssel nicht in das Dateisystem zu schreiben. - -Beim Start des Containers wird das Vorhandensein des Schlüsselpaares geprüft (`/data/id_ed25519.pub` und `/data/id_ed25519`). Wenn einer dieser Schlüssel nicht existiert, wird er aus den Umgebungsvariablen oder den Docker-Geheimnissen neu erstellt. -Dann wird die Gültigkeit des Schlüsselpaares überprüft: Wenn öffentlicher und privater Schlüssel nicht übereinstimmen, wird der Container angehalten. -Wenn Sie keine Schlüssel angeben, erzeugt `hbbs` einen für Sie und legt ihn am Standardspeicherort ab. - -#### Umgebungsvariablen zum Speichern des Schlüsselpaars verwenden - -Sie können Docker-Umgebungsvariablen verwenden, um die Schlüssel zu speichern. Folgen Sie einfach diesen Beispielen: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - -e "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" \ - -e "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" \ - -v "$PWD/db:/db" -d rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - - "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" - - "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" - volumes: - - ./db:/db - restart: unless-stopped -``` - -#### Docker-Geheimnisse zum Speichern des Schlüsselpaars verwenden - -Sie können alternativ auch Docker-Geheimnisse verwenden, um die Schlüssel zu speichern. -Dies ist nützlich, wenn Sie **Docker Compose** oder **Docker Swarm** verwenden. -Folgen Sie einfach diesem Beispiel: - -```bash -cat secrets/id_ed25519.pub | docker secret create key_pub - -cat secrets/id_ed25519 | docker secret create key_priv - -docker service create --name rustdesk-server \ - --secret key_priv --secret key_pub \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - --mount "type=bind,source=$PWD/db,destination=/db" \ - rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - volumes: - - ./db:/db - restart: unless-stopped - secrets: - - key_pub - - key_priv - -secrets: - key_pub: - file: secrets/id_ed25519.pub - key_priv: - file: secrets/id_ed25519 -``` - -## Ein Schlüsselpaar erstellen - -Für die Verschlüsselung wird ein Schlüsselpaar benötigt, das Sie bereitstellen können, aber Sie benötigen eine Möglichkeit, es zu erstellen. - -Mit diesem Befehl können Sie ein Schlüsselpaar erzeugen: - -```bash -/usr/bin/rustdesk-utils genkeypair -``` - -Wenn Sie das Paket `rustdesk-utils` nicht auf Ihrem System installiert haben (oder dies nicht wollen), können Sie den gleichen Befehl mit Docker aufrufen: - -```bash -docker run --rm --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest genkeypair -``` - -Die Ausgabe sieht dann etwa so aus: - -```text -Public Key: 8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA= -Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA== -``` - -## Debian-Pakete - -Für jede Binärdatei stehen separate Debian-Pakete zur Verfügung, die Sie in [Releases](https://github.com/rustdesk/rustdesk-server/releases) finden können. -Diese Pakete sind für die folgenden Distributionen gedacht: - -- Ubuntu 22.04 LTS -- Ubuntu 20.04 LTS -- Ubuntu 18.04 LTS -- Debian 11 Bullseye -- Debian 10 Buster - -## Umgebungsvariablen - -hbbs und hbbr können mit diesen Umgebungsvariablen konfiguriert werden. -Sie können die Variablen wie üblich angeben oder eine `.env`-Datei verwenden. - -| Variable | Binärdatei | Beschreibung | -| --- | --- | --- | -| ALWAYS_USE_RELAY | hbbs | Wenn auf **Y** gesetzt, wird eine direkte Verbindung nicht zugelassen. | -| DB_URL | hbbs | Pfad für die Datenbankdatei | -| DOWNGRADE_START_CHECK | hbbr | Verzögerung (in Sekunden) vor der Downgrade-Prüfung | -| DOWNGRADE_THRESHOLD | hbbr | Schwellenwert der Downgrade-Prüfung (Bit/ms)) | -| KEY | hbbs/hbbr | Wenn gesetzt, wird die Verwendung eines bestimmten Schlüssels erzwungen. Wenn auf **_** gesetzt, wird die Verwendung eines beliebigen Schlüssels erzwungen. | -| LIMIT_SPEED | hbbr | Höchstgeschwindigkeit (in Mb/s) | -| PORT | hbbs/hbbr | Lauschender Port (21116 für hbbs - 21117 für hbbr) | -| RELAY_SERVERS | hbbs | IP-Adresse/DNS-Name der Rechner, auf denen hbbr läuft (durch Komma getrennt) | -| RUST_LOG | all | Debug-Level einstellen (error\|warn\|info\|debug\|trace) | -| SINGLE_BANDWIDTH | hbbr | Maximale Bandbreite für eine einzelne Verbindung (in Mb/s) | -| TOTAL_BANDWIDTH | hbbr | Maximale Gesamtbandbreite (in Mb/s) | diff --git a/README-NL.md b/README-NL.md deleted file mode 100644 index c37064e..0000000 --- a/README-NL.md +++ /dev/null @@ -1,345 +0,0 @@ -

- Opbouwen • - Docker • - S6-Overlay • - Key paar • - Debian pakketten • - ENV variabelen
- [English] | [Deutsch] | [繁體中文] | [简体中文]
-

- -# RustDesk Server Programa - -[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) - -[**Download**](https://github.com/rustdesk/rustdesk-server/releases) - -[**Handleiding**](https://rustdesk.com/docs/nl/self-host/) - -[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) - -Zelf uw eigen RustDesk server hosten, het is gratis en open source. - -## Hoe handmatig opbouwen - -```bash -cargo build --release -``` - -In target/release worden drie uitvoerbare bestanden gegenereerd. - -- hbbs - RustDesk ID/Rendezvous server -- hbbr - RustDesk relay server -- rustdesk-utils - RustDesk CLI hulpprogramma's - -U kunt bijgewerkte binaries vinden op [releases](https://github.com/rustdesk/rustdesk-server/releases) pagina. - -Als u uw eigen server wilt ontwikkelen, is [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) misschien een betere en eenvoudigere start voor u dan deze repo. - -## Docker bestanden (images) - -Docker bestanden (images) worden automatisch gegenereerd en gepubliceerd bij elke github release. We hebben 2 soorten bestanden (images). - -### Klassiek bestand (image) - -Deze bestanden (images) zijn gebouwd voor `ubuntu-20.04` met als enige toevoeging de belangrijkste binaries (`hbbr` en `hbbs`). Ze zijn beschikbaar op [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) met deze tags: - -| architectuur | image:tag | -| --- | --- | -| amd64 | `rustdesk/rustdesk-server:latest` | -| arm64v8 | `rustdesk/rustdesk-server:latest-arm64v8` | - -U kunt deze bestanden (images) direct starten via `docker run` met deze commando's: - -```bash -docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -of zonder `--net=host`, maar een directe P2P verbinding zal niet werken. - -Voor systemen die SELinux gebruiken is het vervangen van `/root` door `/root:z` nodig om de containers correct te laten draaien. Als alternatief kan SELinux containerscheiding volledig worden uitgeschakeld door de optie `--security-opt label=disable` toe te voegen. - -```bash -docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -De `relay-server-ip` parameter is het IP adres (of dns naam) van de server waarop deze containers draaien. De **optionele** `port` parameter moet gebruikt worden als je een andere poort dan **21117** gebruikt voor `hbbr`. - -U kunt ook docker-compose gebruiken, met deze configuratie als sjabloon: - -```yaml -version: '3' - -networks: - rustdesk-net: - external: false - -services: - hbbs: - container_name: hbbs - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21118:21118 - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 - volumes: - - ./data:/root - networks: - - rustdesk-net - depends_on: - - hbbr - restart: unless-stopped - - hbbr: - container_name: hbbr - ports: - - 21117:21117 - - 21119:21119 - image: rustdesk/rustdesk-server:latest - command: hbbr - volumes: - - ./data:/root - networks: - - rustdesk-net - restart: unless-stopped -``` - -Bewerk regel 16 om te verwijzen naar uw relais-server (degene die luistert op poort 21117). U kunt ook de inhoudsregels (L18 en L33) bewerken indien nodig. - -(docker-compose erkenning gaat naar @lukebarone en @QuiGonLeong) - -## S6-overlay gebaseerde bestanden - -Deze bestanden (images) zijn gebouwd tegen `busybox:stable` met toevoeging van de binaries (zowel hbbr als hbbs) en [S6-overlay](https://github.com/just-containers/s6-overlay). Ze zijn beschikbaar op [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-s6/) met deze tags: - -| architectuur | versie | image:tag | -| --- | --- | --- | -| multiarch | latest | `rustdesk/rustdesk-server-s6:latest` | -| amd64 | latest | `rustdesk/rustdesk-server-s6:latest-amd64` | -| i386 | latest | `rustdesk/rustdesk-server-s6:latest-i386` | -| arm64v8 | latest | `rustdesk/rustdesk-server-s6:latest-arm64v8` | -| armv7 | latest | `rustdesk/rustdesk-server-s6:latest-armv7` | -| multiarch | 2 | `rustdesk/rustdesk-server-s6:2` | -| amd64 | 2 | `rustdesk/rustdesk-server-s6:2-amd64` | -| i386 | 2 | `rustdesk/rustdesk-server-s6:2-i386` | -| arm64v8 | 2 | `rustdesk/rustdesk-server-s6:2-arm64v8` | -| armv7 | 2 | `rustdesk/rustdesk-server-s6:2-armv7` | -| multiarch | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0` | -| amd64 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-amd64` | -| i386 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-i386` | -| arm64v8 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-arm64v8` | -| armv7 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-armv7` | - -Je wordt sterk aangeraden om het `multiarch` bestand (image) te gebruiken met de `major version` of `latest` tag. - -De S6-overlay fungeert als supervisor en houdt beide processen draaiende, dus met dit bestand (image) is het niet nodig om twee aparte draaiende containers te hebben. - -U kunt deze bestanden (images) direct starten via `docker run` met dit commando: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -of zonder `--net=host`, maar een directe P2P verbinding zal niet werken. - -```bash -docker run --name rustdesk-server \ - -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ - -p 21117:21117 -p 21118:21118 -p 21119:21119 \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -Of u kunt een docker-compose bestand gebruiken: - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - volumes: - - ./data:/data - restart: unless-stopped -``` - -Voor dit container bestand (image) kunt u deze omgevingsvariabelen gebruiken, **naast** de variabelen in de volgende **ENV-variabelen** sectie: - -| variabele | optioneel | beschrijving | -| --- | --- | --- | -| RELAY | no | het IP-adres/DNS-naam van de machine waarop deze container draait | -| ENCRYPTED_ONLY | yes | indien ingesteld op **"1"** wordt een niet-versleutelde verbinding niet geaccepteerd | -| KEY_PUB | yes | het openbare deel van het key paar | -| KEY_PRIV | yes | het private deel van het key paar | - -### Geheim beheer in S6-overlay gebaseerde bestanden (images) - -U kunt uiteraard het key paar bewaren in een docker volume, maar de optimale werkwijzen vertellen u om de keys niet op het bestandssysteem te schrijven; dus bieden we een paar opties. - -Bij het opstarten van de container wordt de aanwezigheid van het key paar gecontroleerd (`/data/id_ed25519.pub` en `/data/id_ed25519`) en als een van deze keys niet bestaat, wordt deze opnieuw aangemaakt vanuit ENV variabelen of docker secrets. -Vervolgens wordt de geldigheid van het key paar gecontroleerd: indien publieke en private keys niet overeenkomen, stopt de container. -Als je geen keys opgeeft, zal `hbbs` er een voor je genereren en op de standaard locatie plaatsen. - -#### Gebruik ENV om het key paar op te slaan - -U kunt docker omgevingsvariabelen gebruiken om de keys op te slaan. Volg gewoon deze voorbeelden: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - -e "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" \ - -e "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" \ - -v "$PWD/db:/db" -d rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - - "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" - - "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" - volumes: - - ./db:/db - restart: unless-stopped -``` - -#### Gebruik Docker secrets om het key paar op te slaan - -U kunt ook docker secrets gebruiken om de keys op te slaan. -Dit is handig als je **docker-compose** of **docker swarm** gebruikt. -Volg deze voorbeelden: - -```bash -cat secrets/id_ed25519.pub | docker secret create key_pub - -cat secrets/id_ed25519 | docker secret create key_priv - -docker service create --name rustdesk-server \ - --secret key_priv --secret key_pub \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - --mount "type=bind,source=$PWD/db,destination=/db" \ - rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - volumes: - - ./db:/db - restart: unless-stopped - secrets: - - key_pub - - key_priv - -secrets: - key_pub: - file: secrets/id_ed25519.pub - key_priv: - file: secrets/id_ed25519 -``` - -## Hoe maak je een key paar - -Een key paar is nodig voor encryptie; u kunt het verstrekken, zoals eerder uitgelegd, maar u heeft een manier nodig om er een te maken. - -U kunt dit commando gebruiken om een key paar te genereren: - -```bash -/usr/bin/rustdesk-utils genkeypair -``` - -Als u het pakket `rustdesk-utils` niet op uw systeem hebt staan (of wilt), kunt u hetzelfde commando met docker uitvoeren: - -```bash -docker run --rm --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest genkeypair -``` - -De uitvoer ziet er ongeveer zo uit: - -```text -Public Key: 8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA= -Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA== -``` - -## .deb pakketten - -Voor elke binary zijn aparte .deb-pakketten beschikbaar, u kunt ze vinden in de [releases](https://github.com/rustdesk/rustdesk-server/releases). -Deze pakketten zijn bedoeld voor de volgende distributies: - -- Ubuntu 22.04 LTS -- Ubuntu 20.04 LTS -- Ubuntu 18.04 LTS -- Debian 11 bullseye -- Debian 10 buster - -## ENV variabelen - -hbbs en hbbr kunnen worden geconfigureerd met deze ENV-variabelen. -U kunt de variabelen zoals gebruikelijk opgeven of een `.env` bestand gebruiken. - -| variabele | binary | beschrijving | -| --- | --- | --- | -| ALWAYS_USE_RELAY | hbbs | indien ingesteld op **"Y"** wordt directe peer-verbinding niet toegestaan | -| DB_URL | hbbs | path voor database bestand | -| DOWNGRADE_START_CHECK | hbbr | vertraging (in seconden) voor downgrade-controle | -| DOWNGRADE_THRESHOLD | hbbr | drempel van downgrade controle (bit/ms) | -| KEY | hbbs/hbbr | indien ingesteld forceert dit het gebruik van een specifieke toets, indien ingesteld op **"_"** forceert dit het gebruik van een willekeurige toets | -| LIMIT_SPEED | hbbr | snelheidslimiet (in Mb/s) | -| PORT | hbbs/hbbr | luister-poort (21116 voor hbbs - 21117 voor hbbr) | -| RELAY_SERVERS | hbbs | IP-adres/DNS-naam van de machines waarop hbbr draait (gescheiden door komma) | -| RUST_LOG | all | debug-niveau instellen (error\|warn\|info\|debug\|trace) | -| SINGLE_BANDWIDTH | hbbr | maximale bandbreedte voor een enkele verbinding (in Mb/s) | -| TOTAL_BANDWIDTH | hbbr | maximale totale bandbreedte (in Mb/s) | diff --git a/README-TW.md b/README-TW.md deleted file mode 100644 index da07954..0000000 --- a/README-TW.md +++ /dev/null @@ -1,347 +0,0 @@ -

- 自行建置 • - Docker • - S6-overlay • - 金鑰對 • - Debian • - 環境參數
- [English] | [Deutsch] | [Nederlands] | [简体中文]
-

- -# RustDesk Server Program - -[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) - -[**下載**](https://github.com/rustdesk/rustdesk-server/releases) - -[**說明文件**](https://rustdesk.com/docs/zh-tw/self-host/) - -[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) - -自行建置屬於您自己的 RustDesk 伺服器,它是免費的且開源。 - -## 如何自行建置 - -```bash -cargo build --release -``` - -在 target/release 中會產生三個可執行檔。 - -- hbbs - RustDesk ID/會合伺服器 -- hbbr - RustDesk 中繼伺服器 -- rustdesk-utils - RustDesk 命令行工具 - -您可以在 [releases](https://github.com/rustdesk/rustdesk-server/releases) 頁面上找到更新的執行檔。 - -如果您需要額外功能,[RustDesk 專業版伺服器](https://rustdesk.com/pricing.html) 或許更適合您。 - -如果您想開發自己的伺服器,[rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) 可能是一個比這個倉庫更好、更簡單的開始。 - -## Docker 映像檔 - -Docker 映像檔會在每次 GitHub 發布時自動生成並發布。我們有兩種映像檔。 - -### Classic 映像檔 - -這些映像檔是基於 `ubuntu-20.04` 建置的,僅添加了兩個主要的執行檔(`hbbr` 和 `hbbs`)。它們可在 [Docker Hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) 上取得,帶有以下tags: - -| 架構 | image:tag | -| ------- | ----------------------------------------- | -| amd64 | `rustdesk/rustdesk-server:latest` | -| arm64v8 | `rustdesk/rustdesk-server:latest-arm64v8` | - -您可以使用以下指令,直接透過 ``docker run`` 來啟動這些映像檔: - -```bash -docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -或刪去 `--net=host`, 但 P2P 直接連線會無法運作。 - -對於使用 SELinux 的系統,需要將 ``/root`` 替換為 ``/root:z``,以便容器正確運行。或者,也可以通過添加選項 ``--security-opt label=disable`` 完全禁用 SELinux 容器隔離。 - -```bash -docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -`relay-server-ip` 參數是執行這些容器的伺服器的 IP 地址(或 DNS 名稱)。如果您為 `hbbr` 使用的端口不是 **21117**,則必須使用 **可選** 的 `port` 參數。 - -您也可以使用 docker-compose 使用這個設定做為範例: - -```yaml -version: '3' - -networks: - rustdesk-net: - external: false - -services: - hbbs: - container_name: hbbs - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21118:21118 - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 - volumes: - - ./data:/root - networks: - - rustdesk-net - depends_on: - - hbbr - restart: unless-stopped - - hbbr: - container_name: hbbr - ports: - - 21117:21117 - - 21119:21119 - image: rustdesk/rustdesk-server:latest - command: hbbr - volumes: - - ./data:/root - networks: - - rustdesk-net - restart: unless-stopped -``` - -請編輯第 16 行,將其指向您的中繼伺服器 (監聽端口 21117 那一個)。 如果需要的話,您也可以編輯 volume (第 18 和 33 行)。 - -(感謝 @lukebarone 和 @QuiGonLeong 協助提供 docker-compose 的設定範例) - -## 基於 S6-overlay 的映象檔 - -這些映象檔是針對 `busybox:stable` 建置的,並添加了執行檔(hbbr 和 hbbs)以及 [S6-overlay](https://github.com/just-containers/s6-overlay)。 它們在以及這些 tags 在 [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-s6/) 可用: - -| 架構 | version | image:tag | -| --------- | ------- | -------------------------------------------- | -| multiarch | latest | `rustdesk/rustdesk-server-s6:latest` | -| amd64 | latest | `rustdesk/rustdesk-server-s6:latest-amd64` | -| i386 | latest | `rustdesk/rustdesk-server-s6:latest-i386` | -| arm64v8 | latest | `rustdesk/rustdesk-server-s6:latest-arm64v8` | -| armv7 | latest | `rustdesk/rustdesk-server-s6:latest-armv7` | -| multiarch | 2 | `rustdesk/rustdesk-server-s6:2` | -| amd64 | 2 | `rustdesk/rustdesk-server-s6:2-amd64` | -| i386 | 2 | `rustdesk/rustdesk-server-s6:2-i386` | -| arm64v8 | 2 | `rustdesk/rustdesk-server-s6:2-arm64v8` | -| armv7 | 2 | `rustdesk/rustdesk-server-s6:2-armv7` | -| multiarch | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0` | -| amd64 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-amd64` | -| i386 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-i386` | -| arm64v8 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-arm64v8` | -| armv7 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-armv7` | - -強烈建議您使用 `multiarch` 映象檔 可以選擇使用 `major version` 或 `latest` tags。 - -S6-overlay 在此充當監督程序,保持兩個進程運行,因此使用此映象檔,您無需運行兩個獨立的容器。 - -您可以直接使用以下命令使用 `docker run` 來啟動這個映象檔: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -或刪去 `--net=host`, 但 P2P 直接連線會無法運作。 - -```bash -docker run --name rustdesk-server \ - -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ - -p 21117:21117 -p 21118:21118 -p 21119:21119 \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -或是您可以使用 docker-compose 文件: - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - volumes: - - ./data:/data - restart: unless-stopped -``` - -對於此容器映象檔,您可以使用這些環境變數,**除了**以下**環境變數**部分指定的那些。 - -| 環境變數 | 是否可選 | 敘述 | -| -------------- | -------- | ------------------------------------------ | -| RELAY | 否 | 運行此容器的機器的 IP 地址/ DNS 名稱 | -| ENCRYPTED_ONLY | 是 | 如果設置為 **"1"**,將不接受未加密的連接。 | -| KEY_PUB | 是 | 金鑰對中的公鑰(Public Key) | -| KEY_PRIV | 是 | 金鑰對中的私鑰(Private Key) | - -### 在基於 S6-overlay 的 Secret 管理 - -您可以將金鑰對保存在 Docker volume 中,但最佳實踐建議不要將金鑰寫入文件系統;因此,我們提供了一些選項。 - -在容器啟動時,會檢查金鑰對的是否存在(`/data/id_ed25519.pub` 和 `/data/id_ed25519`),如果其中一個金鑰不存在,則會從環境變數或 Docker Secret 重新生成它。 -然後檢查金鑰對的有效性:如果公鑰和私鑰不匹配,容器將停止運行。 -如果您未提供金鑰,`hbbs` 將為您產生一個,並將其放置在默認位置。 - -#### 使用 ENV 存儲金鑰對 - -您可以使用 Docker 環境變數來儲存金鑰。只需按照以下範例操作: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - -e "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" \ - -e "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" \ - -v "$PWD/db:/db" -d rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - - "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" - - "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" - volumes: - - ./db:/db - restart: unless-stopped -``` - -#### 使用 Docker Secret 來儲存金鑰對 - -您還可以使用 Docker Secret來儲存金鑰。 -如果您使用 **docker-compose** 或 **docker swarm**,這很有用。 -只需按照以下示例操作: - -```bash -cat secrets/id_ed25519.pub | docker secret create key_pub - -cat secrets/id_ed25519 | docker secret create key_priv - -docker service create --name rustdesk-server \ - --secret key_priv --secret key_pub \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - --mount "type=bind,source=$PWD/db,destination=/db" \ - rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - volumes: - - ./db:/db - restart: unless-stopped - secrets: - - key_pub - - key_priv - -secrets: - key_pub: - file: secrets/id_ed25519.pub - key_priv: - file: secrets/id_ed25519 -``` - -## 如何建立金鑰對 - -加密需要一對金鑰;您可以按照前面所述提供它,但需要一種生成金鑰對的方法。 - -您可以使用以下命令生成一對金鑰: - -```bash -/usr/bin/rustdesk-utils genkeypair -``` - -如果您沒有(或不想)在系統上安裝 `rustdesk-utils` 套件,您可以使用 Docker執行相同的命令: - -```bash -docker run --rm --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest genkeypair -``` - -輸出將類似於以下內容: - -```text -Public Key: 8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA= -Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA== -``` - -## .deb 套件 - -每個執行檔都有單獨的 .deb 套件可供使用,您可以在 [releases](https://github.com/rustdesk/rustdesk-server/releases) 中找到它們。 -這些套件適用於以下發行版: - -- Ubuntu 22.04 LTS -- Ubuntu 20.04 LTS -- Ubuntu 18.04 LTS -- Debian 11 bullseye -- Debian 10 buster - -## ENV 環境參數 - -可以使用這些 ENV 參數來配置 hbbs 和 hbbr。 -您可以像往常一樣指定參數,或者使用 .env 文件。 - -| 參數 | 執行檔 | 敘述 | -| --------------------- | --------- | -------------------------------------------------------------------- | -| ALWAYS_USE_RELAY | hbbs | 如果設為 **"Y"**,禁止直接點對點連接 | -| DB_URL | hbbs | 資料庫的路徑 | -| DOWNGRADE_START_CHECK | hbbr | 降級檢查之前的延遲時間(以秒為單位) | -| DOWNGRADE_THRESHOLD | hbbr | 降級檢查的閾值(bit/ms) | -| KEY | hbbs/hbbr | 如果設置了,將強制使用特定金鑰,如果設為 **"_"**,則強制使用任何金鑰 | -| LIMIT_SPEED | hbbr | 速度限制(以Mb/s為單位) | -| PORT | hbbs/hbbr | 監聽端口(hbbs為21116,hbbr為21117) | -| RELAY_SERVERS | hbbs | 運行hbbr的機器的IP地址/DNS名稱(用逗號分隔) | -| RUST_LOG | all | 設定 debug level (error\|warn\|info\|debug\|trace) | -| SINGLE_BANDWIDTH | hbbr | 單個連接的最大頻寬(以Mb/s為單位) | -| TOTAL_BANDWIDTH | hbbr | 最大總頻寬(以Mb/s為單位) | \ No newline at end of file diff --git a/README.md b/README.md index fdfa7b8..17087f1 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,3 @@ -

- Manually • - Docker • - S6-overlay • - Keypair • - Debian • - Variables
- [Deutsch] | [Nederlands] | [繁體中文] | [简体中文]
-

- # RustDesk Server Program [![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) @@ -38,317 +28,8 @@ If you want extra features, [RustDesk Server Pro](https://rustdesk.com/pricing.h If you want to develop your own server, [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) might be a better and simpler start for you than this repo. -## Docker images +## Installation -Docker images are automatically generated and published to [Docker Hub](https://hub.docker.com/r/rustdesk) and [GitHub Container Registry](https://github.com/rustdesk?tab=packages&repo_name=rustdesk-server) on every GitHub release. We have 2 kind of images. +Please follow this [doc](https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/) -### Classic image -These images are built from scratch with two main binaries (`hbbs` and `hbbr`). They're available on [Docker Hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) and [GitHub Container Registry](https://github.com/rustdesk/rustdesk-server/pkgs/container/rustdesk-server) with these architectures: - -* amd64 -* arm64v8 -* armv7 - -You could use `latest` tag or major version tag `1` with supported architectures: - -| Version | image:tag | -| ------------- | --------------------------------- | -| latest | `rustdesk/rustdesk-server:latest` | -| Major version | `rustdesk/rustdesk-server:1` | - - -You can start these images directly with `docker run` with these commands: - -```bash -docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -or without `--net=host`, but P2P direct connection can not work. - -For systems using SELinux, replacing `/root` by `/root:z` is required for the containers to run correctly. Alternatively, SELinux container separation can be disabled completely adding the option `--security-opt label=disable`. - -```bash -docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -The `relay-server-ip` parameter is the IP address (or dns name) of the server running these containers. The **optional** `port` parameter has to be used if you use a port different than **21117** for `hbbr`. - -You can also use docker-compose, using this configuration as a template: - -```yaml -version: '3' - -networks: - rustdesk-net: - external: false - -services: - hbbs: - container_name: hbbs - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21118:21118 - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 - volumes: - - ./data:/root - networks: - - rustdesk-net - depends_on: - - hbbr - restart: unless-stopped - - hbbr: - container_name: hbbr - ports: - - 21117:21117 - - 21119:21119 - image: rustdesk/rustdesk-server:latest - command: hbbr - volumes: - - ./data:/root - networks: - - rustdesk-net - restart: unless-stopped -``` - -Edit line 16 to point to your relay server (the one listening on port 21117). You can also edit the volume lines (line 18 and line 33) if you need. - -(docker-compose credit goes to @lukebarone and @QuiGonLeong) - -> [!NOTE] -> The rustdesk/rustdesk-server:latest in China may be replaced with the latest version number on Docker Hub, such as `rustdesk-server:1.1.10-3`. Otherwise, the old version may be pulled due to image acceleration. - -> [!NOTE] -> If you are experiencing issues pulling from Docker Hub, try pulling from the [GitHub Container Registry](https://github.com/rustdesk/rustdesk-server/pkgs/container/rustdesk-server) instead. - -## S6-overlay based images - -These images are build against `busybox:stable` with the addition of the binaries (both `hbbs` and `hbbr`) and [S6-overlay](https://github.com/just-containers/s6-overlay). They're available on [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-s6/) and [GitHub Container Registry](https://github.com/rustdesk/rustdesk-server/pkgs/container/rustdesk-server) with these architectures: - -* amd64 -* i386 -* arm64v8 -* armv7 - -You could use `latest` tag or major version tag `1` with supported architectures: - -| Version | image:tag | -| ------------- | ------------------------------------ | -| latest | `rustdesk/rustdesk-server-s6:latest` | -| Major version | `rustdesk/rustdesk-server-s6:1` | - -The S6-overlay acts as a supervisor and keeps both process running, so with this image, there's no need to have two separate running containers. - -You can start these images directly with `docker run` with this command: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -or without `--net=host`, but P2P direct connection cannot work. - -```bash -docker run --name rustdesk-server \ - -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ - -p 21117:21117 -p 21118:21118 -p 21119:21119 \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -Or you can use a docker-compose file: - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - volumes: - - ./data:/data - restart: unless-stopped -``` - -For this container image, you can use these environment variables, **in addition** to the ones specified in the following **ENV variables** section: - -| variable | optional | description | -| --- | --- | --- | -| RELAY | no | the IP address/DNS name of the machine running this container | -| ENCRYPTED_ONLY | yes | if set to **"1"** unencrypted connection will not be accepted | -| KEY_PUB | yes | public part of the key pair | -| KEY_PRIV | yes | private part of the key pair | - -### Secret management in S6-overlay based images - -You can obviously keep the key pair in a docker volume, but the best practices tells you to not write the keys on the filesystem; so we provide a couple of options. - -On container startup, the presence of the keypair is checked (`/data/id_ed25519.pub` and `/data/id_ed25519`) and if one of these keys doesn't exist, it's recreated from ENV variables or docker secrets. -Then the validity of the keypair is checked: if public and private keys doesn't match, the container will stop. -If you provide no keys, `hbbs` will generate one for you, and it'll place it in the default location. - -#### Use ENV to store the key pair - -You can use docker environment variables to store the keys. Just follow this examples: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - -e "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" \ - -e "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" \ - -v "$PWD/db:/db" -d rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - - "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" - - "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" - volumes: - - ./db:/db - restart: unless-stopped -``` - -#### Use Docker secrets to store the key pair - -You can alternatively use docker secrets to store the keys. -This is useful if you're using **docker-compose** or **Docker Swarm**. -Just follow this examples: - -```bash -cat secrets/id_ed25519.pub | docker secret create key_pub - -cat secrets/id_ed25519 | docker secret create key_priv - -docker service create --name rustdesk-server \ - --secret key_priv --secret key_pub \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - --mount "type=bind,source=$PWD/db,destination=/db" \ - rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - volumes: - - ./db:/db - restart: unless-stopped - secrets: - - key_pub - - key_priv - -secrets: - key_pub: - file: secrets/id_ed25519.pub - key_priv: - file: secrets/id_ed25519 -``` - -## How to create a keypair - -A keypair is needed for encryption; you can provide it, as explained before, but you need a way to create one. - -You can use this command to generate a keypair: - -```bash -/usr/bin/rustdesk-utils genkeypair -``` - -If you don't have (or don't want) the `rustdesk-utils` package installed on your system, you can invoke the same command with docker: - -```bash -docker run --rm --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest genkeypair -``` - -The output will be something like this: - -```text -Public Key: 8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA= -Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA== -``` - -## .deb packages - -Separate .deb packages are available for each binary, you can find them in the [Releases](https://github.com/rustdesk/rustdesk-server/releases). -These packages are meant for the following distributions: - -- Ubuntu 24.04 LTS -- Ubuntu 22.04 LTS -- Ubuntu 20.04 LTS -- Ubuntu 18.04 LTS -- Debian 12 bookworm -- Debian 11 bullseye -- Debian 10 buster - -## ENV variables - -`hbbs` and `hbbr` can be configured using these ENV variables. -You can specify the variables as usual or use an `.env` file. - -| variable | binary | description | -| --- | --- | --- | -| ALWAYS_USE_RELAY | hbbs | if set to **"Y"** disallows direct peer connection | -| DB_URL | hbbs | path for database file | -| DOWNGRADE_START_CHECK | hbbr | delay (in seconds) before downgrade check | -| DOWNGRADE_THRESHOLD | hbbr | threshold of downgrade check (bit/ms) | -| KEY | hbbs/hbbr | if set force the use of a specific key, if set to **"_"** force the use of any key | -| LIMIT_SPEED | hbbr | speed limit (in Mb/s) | -| PORT | hbbs/hbbr | listening port (21116 for hbbs - 21117 for hbbr) | -| RELAY | hbbs | IP address/DNS name of the machines running hbbr (separated by comma) | -| RUST_LOG | all | set debug level (error\|warn\|info\|debug\|trace) | -| SINGLE_BANDWIDTH | hbbr | max bandwidth for a single connection (in Mb/s) | -| TOTAL_BANDWIDTH | hbbr | max total bandwidth (in Mb/s) | From f09b79c6da9302a75c8dbf86f61757d6c36e0adf Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 16 Jun 2025 00:23:50 +0800 Subject: [PATCH 05/43] README-ZH.md --- README-ZH.md | 348 --------------------------------------------------- 1 file changed, 348 deletions(-) delete mode 100644 README-ZH.md diff --git a/README-ZH.md b/README-ZH.md deleted file mode 100644 index b2739b9..0000000 --- a/README-ZH.md +++ /dev/null @@ -1,348 +0,0 @@ -

- 自行构建 • - Docker • - S6-overlay • - 密钥 • - Debian • - 环境参数
- [English] | [Deutsch] | [Nederlands] | [繁体中文]
-

- -# RustDesk Server Program - -[![build](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml/badge.svg)](https://github.com/rustdesk/rustdesk-server/actions/workflows/build.yaml) - -[**下载**](https://github.com/rustdesk/rustdesk-server/releases) - -[**说明文件**](https://rustdesk.com/docs/zh-cn/self-host/) - -[**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) - -自行搭建属于你的RustDesk服务器,所有的一切都是免费且开源的 - -## 如何自行构建 - -```bash -cargo build --release -``` - -执行后会在target/release目录下生成三个对应平台的可执行程序 - -- hbbs - RustDesk ID/会和服务器 -- hbbr - RustDesk 中继服务器 -- rustdesk-utils - RustDesk 命令行工具 - -您可以在 [releases](https://github.com/rustdesk/rustdesk-server/releases) 页面中找到最新的服务端软件。 - -如果您需要额外的功能支持,[RustDesk 专业版服务器](https://rustdesk.com/pricing.html) 获取更适合您。 - -如果您想开发自己的服务器,[rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) 应该会比直接使用这个仓库更简单快捷。 - -## Docker 镜像 - -Docker镜像会在每次 GitHub 发布新的release版本时自动构建。我们提供两种类型的镜像。 - -### Classic 传统镜像 - -这个类型的镜像是基于 `ubuntu-20.04` 进行构建,镜像仅包含两个主要的可执行程序(`hbbr` 和 `hbbs`)。它们可以通过以下tag在 [Docker Hub](https://hub.docker.com/r/rustdesk/rustdesk-server/) 上获得: - -| 架构 | image:tag | -|---------| ----------------------------------------- | -| amd64 | `rustdesk/rustdesk-server:latest` | -| arm64v8 | `rustdesk/rustdesk-server:latest-arm64v8` | - -您可以使用以下命令,直接通过 ``docker run`` 來启动这些镜像: - -```bash -docker run --name hbbs --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr --net=host -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -或不使用 `--net=host` 参数启动, 但这样 P2P 直连功能将无法工作。 - -对于使用了 SELinux 的系统,您需要将 ``/root`` 替换为 ``/root:z``,以保证容器的正常运行。或者,也可以通过添加参数 ``--security-opt label=disable`` 来完全禁用 SELinux 容器隔离。 - -```bash -docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbs -r -docker run --name hbbr -p 21117:21117 -p 21119:21119 -v "$PWD/data:/root" -d rustdesk/rustdesk-server:latest hbbr -``` - -`relay-server-ip` 参数是运行这些容器的服务器的 IP 地址(或 DNS 名称)。如果你不想使用 **21117** 作为 `hbbr` 的服务端口,可使用可选参数 `port` 进行指定。 - -您也可以使用 docker-compose 进行构建,以下为配置示例: - -```yaml -version: '3' - -networks: - rustdesk-net: - external: false - -services: - hbbs: - container_name: hbbs - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21118:21118 - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 - volumes: - - ./data:/root - networks: - - rustdesk-net - depends_on: - - hbbr - restart: unless-stopped - - hbbr: - container_name: hbbr - ports: - - 21117:21117 - - 21119:21119 - image: rustdesk/rustdesk-server:latest - command: hbbr - volumes: - - ./data:/root - networks: - - rustdesk-net - restart: unless-stopped -``` - -编辑第16行来指定你的中继服务器 (默认端口监听在 21117 的那一个)。 如果需要的话,您也可以编辑 volume 信息 (第 18 和 33 行)。 - -(感谢 @lukebarone 和 @QuiGonLeong 协助提供的 docker-compose 配置示例) - -## 基于 S6-overlay 的镜像 - -> 这些镜像是针对 `busybox:stable` 构建的,并添加了可执行程序(hbbr 和 hbbs)以及 [S6-overlay](https://github.com/just-containers/s6-overlay)。 它们可以使用以下tag在 [Docker hub](https://hub.docker.com/r/rustdesk/rustdesk-server-s6/) 上获取: - - -| 架構 | version | image:tag | -| --------- | ------- | -------------------------------------------- | -| multiarch | latest | `rustdesk/rustdesk-server-s6:latest` | -| amd64 | latest | `rustdesk/rustdesk-server-s6:latest-amd64` | -| i386 | latest | `rustdesk/rustdesk-server-s6:latest-i386` | -| arm64v8 | latest | `rustdesk/rustdesk-server-s6:latest-arm64v8` | -| armv7 | latest | `rustdesk/rustdesk-server-s6:latest-armv7` | -| multiarch | 2 | `rustdesk/rustdesk-server-s6:2` | -| amd64 | 2 | `rustdesk/rustdesk-server-s6:2-amd64` | -| i386 | 2 | `rustdesk/rustdesk-server-s6:2-i386` | -| arm64v8 | 2 | `rustdesk/rustdesk-server-s6:2-arm64v8` | -| armv7 | 2 | `rustdesk/rustdesk-server-s6:2-armv7` | -| multiarch | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0` | -| amd64 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-amd64` | -| i386 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-i386` | -| arm64v8 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-arm64v8` | -| armv7 | 2.0.0 | `rustdesk/rustdesk-server-s6:2.0.0-armv7` | - -强烈建议您使用`major version` 或 `latest` tag 的 `multiarch` 架构的镜像。 - -S6-overlay 在此处作为监控程序,用以保证两个进程的运行,因此使用此镜像,您无需运行两个容器。 - -您可以使用 `docker run` 命令直接启动镜像,如下: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -或刪去 `--net=host` 参数, 但 P2P 直连功能将无法工作。 - -```bash -docker run --name rustdesk-server \ - -p 21115:21115 -p 21116:21116 -p 21116:21116/udp \ - -p 21117:21117 -p 21118:21118 -p 21119:21119 \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -v "$PWD/data:/data" -d rustdesk/rustdesk-server-s6:latest -``` - -或着您也可以使用 docker-compose 文件: - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - volumes: - - ./data:/data - restart: unless-stopped -``` - -对于此容器镜像,除了在下面的环境变量部分指定的变量之外,您还可以使用以下`环境变量` - -| 环境变量 | 是否可选 | 描述 | -|----------------|------|--------------------------| -| RELAY | 否 | 运行此容器的宿主机的 IP 地址/ DNS 名称 | -| ENCRYPTED_ONLY | 是 | 如果设置为 **"1"**,将不接受未加密的连接。 | -| KEY_PUB | 是 | 密钥对中的公钥(Public Key) | -| KEY_PRIV | 是 | 密钥对中的私钥(Private Key) | - -### 基于 S6-overlay 镜像的密钥管理 - -您可以将密钥对保存在 Docker volume 中,但我们建议不要将密钥写入文件系統中;因此,我们提供了一些方案。 - -在容器启动时,会检查密钥对是否存在(`/data/id_ed25519.pub` 和 `/data/id_ed25519`),如果其中一個密钥不存在,则会从环境变量或 Docker Secret 中重新生成它。 -然后检查密钥对的可用性:如果公钥和私钥不匹配,容器将停止运行。 -如果您未提供密钥,`hbbs` 将会在默认位置生成一个。 - -#### 使用 ENV 存储密钥对 - -您可以使用 Docker 环境变量來存储密钥。如下: - -```bash -docker run --name rustdesk-server \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - -e "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" \ - -e "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" \ - -v "$PWD/db:/db" -d rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - - "KEY_PRIV=FR2j78IxfwJNR+HjLluQ2Nh7eEryEeIZCwiQDPVe+PaITKyShphHAsPLn7So0OqRs92nGvSRdFJnE2MSyrKTIQ==" - - "KEY_PUB=iEyskoaYRwLDy5+0qNDqkbPdpxr0kXRSZxNjEsqykyE=" - volumes: - - ./db:/db - restart: unless-stopped -``` - -#### 使用 Docker Secret 來保存密钥对 - -您还可以使用 Docker Secret 來保存密钥。 -如果您使用 **docker-compose** 或 **docker swarm**,推荐您使用。 -只需按照以下示例操作: - -```bash -cat secrets/id_ed25519.pub | docker secret create key_pub - -cat secrets/id_ed25519 | docker secret create key_priv - -docker service create --name rustdesk-server \ - --secret key_priv --secret key_pub \ - --net=host \ - -e "RELAY=rustdeskrelay.example.com" \ - -e "ENCRYPTED_ONLY=1" \ - -e "DB_URL=/db/db_v2.sqlite3" \ - --mount "type=bind,source=$PWD/db,destination=/db" \ - rustdesk/rustdesk-server-s6:latest -``` - -```yaml -version: '3' - -services: - rustdesk-server: - container_name: rustdesk-server - ports: - - 21115:21115 - - 21116:21116 - - 21116:21116/udp - - 21117:21117 - - 21118:21118 - - 21119:21119 - image: rustdesk/rustdesk-server-s6:latest - environment: - - "RELAY=rustdesk.example.com:21117" - - "ENCRYPTED_ONLY=1" - - "DB_URL=/db/db_v2.sqlite3" - volumes: - - ./db:/db - restart: unless-stopped - secrets: - - key_pub - - key_priv - -secrets: - key_pub: - file: secrets/id_ed25519.pub - key_priv: - file: secrets/id_ed25519 -``` - -## 如何生成密钥对 - -加密需要一对密钥;您可以按照前面所述提供它,但需要一个工具去生成密钥对。 - -您可以使用以下命令生成一对密钥: - -```bash -/usr/bin/rustdesk-utils genkeypair -``` - -如果您沒有(或不想)在系统上安装 `rustdesk-utils` 套件,您可以使用 Docker 执行相同的命令: - -```bash -docker run --rm --entrypoint /usr/bin/rustdesk-utils rustdesk/rustdesk-server-s6:latest genkeypair -``` - -运行后的输出内容如下: - -```text -Public Key: 8BLLhtzUBU/XKAH4mep3p+IX4DSApe7qbAwNH9nv4yA= -Secret Key: egAVd44u33ZEUIDTtksGcHeVeAwywarEdHmf99KM5ajwEsuG3NQFT9coAfiZ6nen4hfgNICl7upsDA0f2e/jIA== -``` - -## .deb 套件 - -每个可执行文件都有单独的 .deb 套件可供使用,您可以在 [releases](https://github.com/rustdesk/rustdesk-server/releases) 页面中找到它們。 -這些套件适用于以下发行版: - -- Ubuntu 22.04 LTS -- Ubuntu 20.04 LTS -- Ubuntu 18.04 LTS -- Debian 11 bullseye -- Debian 10 buster - -## ENV 环境变量 - -可以使用这些`环境变量`参数來配置 hbbs 和 hbbr。 -您可以像往常一样指定参数,或者使用 .env 文件。 - -| 参数 | 可执行文件 | 描述 | -|-----------------------|---------------|--------------------------------------------------| -| ALWAYS_USE_RELAY | hbbs | 如果设定为 **"Y"**,将关闭直接点对点连接功能 | -| DB_URL | hbbs | 数据库配置 | -| DOWNGRADE_START_CHECK | hbbr | 降级检查之前的延迟时间(以秒为单位) | -| DOWNGRADE_THRESHOLD | hbbr | 降级检查的阈值(bit/ms) | -| KEY | hbbs/hbbr | 如果设置了此参数,将强制使用指定密钥对,如果设为 **"_"**,则强制使用任意密钥 | -| LIMIT_SPEED | hbbr | 速度限制(以Mb/s为单位) | -| PORT | hbbs/hbbr | 监听端口(hbbs为21116,hbbr为21117) | -| RELAY_SERVERS | hbbs | 运行hbbr的机器的IP地址/DNS名称(用逗号分隔) | -| RUST_LOG | all | 设置 debug level (error\|warn\|info\|debug\|trace) | -| SINGLE_BANDWIDTH | hbbr | 单个连接的最大带宽(以Mb/s为单位) | -| TOTAL_BANDWIDTH | hbbr | 最大总带宽(以Mb/s为单位) | From 796a75af5cdc3c28053299a33790c2836c766257 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:46:51 +0800 Subject: [PATCH 06/43] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 17087f1..a9a08ba 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ [**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) +[**How to migrate OSS to Pro**](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/installscript/#convert-from-open-source) + Self-host your own RustDesk server, it is free and open source. ## How to build manually From 2c57e51ec528014bb6169ccb457722cb3bedbce5 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sun, 22 Jun 2025 15:03:13 +0900 Subject: [PATCH 07/43] higher default bandwidth --- src/relay_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay_server.rs b/src/relay_server.rs index bc379f4..c0f910e 100644 --- a/src/relay_server.rs +++ b/src/relay_server.rs @@ -39,9 +39,9 @@ lazy_static::lazy_static! { static DOWNGRADE_THRESHOLD_100: AtomicUsize = AtomicUsize::new(66); // 0.66 static DOWNGRADE_START_CHECK: AtomicUsize = AtomicUsize::new(1_800_000); // in ms -static LIMIT_SPEED: AtomicUsize = AtomicUsize::new(4 * 1024 * 1024); // in bit/s +static LIMIT_SPEED: AtomicUsize = AtomicUsize::new(32 * 1024 * 1024); // in bit/s static TOTAL_BANDWIDTH: AtomicUsize = AtomicUsize::new(1024 * 1024 * 1024); // in bit/s -static SINGLE_BANDWIDTH: AtomicUsize = AtomicUsize::new(16 * 1024 * 1024); // in bit/s +static SINGLE_BANDWIDTH: AtomicUsize = AtomicUsize::new(128 * 1024 * 1024); // in bit/s const BLACKLIST_FILE: &str = "blacklist.txt"; const BLOCKLIST_FILE: &str = "blocklist.txt"; From c8a5d41906cb30eacf0ae3c7462c89be0ce893f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90?= <84855512@qq.com> Date: Sun, 13 Jul 2025 07:33:30 +0800 Subject: [PATCH 08/43] chore: Update to Windows 2022 runner image (#568) --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1de0971..50aab4b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -76,7 +76,7 @@ jobs: build-win: name: Build - windows - runs-on: windows-2019 + runs-on: windows-2022 steps: From 4e8d6d08e237ac2197710a0a5089272ec9e7b688 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 3 Nov 2025 13:03:19 +0800 Subject: [PATCH 09/43] fix https://github.com/rustdesk/rustdesk-server/issues/435 --- src/relay_server.rs | 1 + src/rendezvous_server.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/relay_server.rs b/src/relay_server.rs index c0f910e..0ec190a 100644 --- a/src/relay_server.rs +++ b/src/relay_server.rs @@ -428,6 +428,7 @@ async fn make_pair_(stream: impl StreamTrait, addr: SocketAddr, key: &str, limit if let Ok(msg_in) = RendezvousMessage::parse_from_bytes(&bytes) { if let Some(rendezvous_message::Union::RequestRelay(rf)) = msg_in.union { if !key.is_empty() && rf.licence_key != key { + log::warn!("Relay authentication failed from {} - invalid key", addr); return; } if !rf.uuid.is_empty() { diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 3fd1639..ff46dbe 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -680,6 +680,7 @@ impl RendezvousServer { ) -> ResultType<(RendezvousMessage, Option)> { let mut ph = ph; if !key.is_empty() && ph.licence_key != key { + log::warn!("Authentication failed from {} for peer {} - invalid key", addr, ph.id); let mut msg_out = RendezvousMessage::new(); msg_out.set_punch_hole_response(PunchHoleResponse { failure: punch_hole_response::Failure::LICENSE_MISMATCH.into(), From 5cc309dc9f0861b856c5e809c21b9027746f8784 Mon Sep 17 00:00:00 2001 From: Geert Stappers Date: Mon, 3 Nov 2025 06:56:00 +0100 Subject: [PATCH 10/43] new file: debian/README.source (#592) Describes how to build --- debian/README.source | 62 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 debian/README.source diff --git a/debian/README.source b/debian/README.source new file mode 100644 index 0000000..f25481d --- /dev/null +++ b/debian/README.source @@ -0,0 +1,62 @@ +# +# Juli Augustus 2025 was building the downloadable Debian packages done +# by github.com CI, meaning you being depended on github.com +# for getting a .deb of the libre source code (four GNU freedoms) you have. +# +# And in those days there was no official Debian package. +# +# What follows are instructions that make it possible to do +# a succesfull +# +# debuild -uc -us +# +# in the directory target/rustdesk-server +# +# The instructions are written in bash syntax, +# +# bash debian/README.source +# +# should help you immens +# + +# Make sure the submodules are present +git submodule update --init --recursive + +rm -rf target/rustdesk-server # avoid clutter from previous iteration +mkdir -p target/rustdesk-server # FYI: target/ is ignored by git + +tar cf - \ + --exclude .git \ + Cargo.toml Cargo.lock \ + LICENSE README.md \ + db_v2.sqlite3 \ + build.rs \ + debian \ + libs rcd src \ + systemd ui \ +| ( cd target/rustdesk-server && tar x ) + +mv target/rustdesk-server/debian/Makefile target/rustdesk-server/ + +tar cjf target/rustdesk-server-orig.tar.xz \ + --strip-components=1 \ + target/rustdesk-server + +# an .orig.tar.xz tarball exists, +# work on the debian directory + +eval $( dpkg-architecture ) +sed -e "s/{{ ARCH }}/${DEB_TARGET_ARCH}/" \ + debian/control.tpl > target/rustdesk-server/debian/control + + +cd target/rustdesk-server +dpkg-checkbuilddeps || echo sudo apt install dpkg-dev +debuild -uc -us + +# +# For what it is worth: +# Early September 2025 there were +# several WARNINGS and ERRORS from Lintian +# +# l l From 386c83874ca1ea658c29ec73993d4c0cd3479482 Mon Sep 17 00:00:00 2001 From: Geert Stappers Date: Mon, 3 Nov 2025 06:57:06 +0100 Subject: [PATCH 11/43] debian/changelog more like the first two (#573) * debian/changelog more like the first two Added "Who and When" lines, added empty lines as separator. The time stamps where retrieved from the git commit log. All entries look now like: rustdesk-server (1.1.7) UNRELEASED; urgency=medium * ipv6 support -- rustdesk Wed, 11 Jan 2023 11:27:00 +0800 rustdesk-server (1.1.6) UNRELEASED; urgency=medium * Initial release -- open-trade Fri, 15 Jul 2022 12:27:27 +0200 * debian/changelog: reformat a date stamp The "wrong format" was discovered by Lintian. --- debian/changelog | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index bb8a832..06ebdbe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,36 +1,60 @@ rustdesk-server (1.1.14) UNRELEASED; urgency=medium + * Fix windows crash + -- rustdesk Sat, 25 Jan 2025 20:47:19 +0800 + rustdesk-server (1.1.13) UNRELEASED; urgency=medium + * Version check and refactor hbb_common to share with rustdesk client + -- rustdesk Tue, 21 Jan 2025 01:33:42 +0800 + rustdesk-server (1.1.12) UNRELEASED; urgency=medium + * WS real ip * Bump s6-overlay to v3.2.0.0 and fix env warnings + -- rustdesk Mon, 7 Oct 2024 16:21:36 +0800 + rustdesk-server (1.1.11-1) UNRELEASED; urgency=medium + * set reuse port to make restart friendly * revert hbbr `-k` to not ruin back-compatibility + -- rustdesk Fri, 24 May 2024 18:37:11 +0800 + rustdesk-server (1.1.11) UNRELEASED; urgency=medium + * change -k to default '-', so you need not to set -k any more + -- rustdesk Fri, 24 May 2024 18:09:12 +0800 + rustdesk-server (1.1.10-3) UNRELEASED; urgency=medium + * fix on -2 + -- rustdesk Wed, 31 Jan 2024 11:30:42 +0800 + rustdesk-server (1.1.10-2) UNRELEASED; urgency=medium * fix hangup signal exit when run with nohup * some minors + -- rustdesk Tue, 30 Jan 2024 19:23:36 +0800 + rustdesk-server (1.1.9) UNRELEASED; urgency=medium * remove unsafe + -- rustdesk Tue, 5 Dec 2023 17:22:40 +0800 + rustdesk-server (1.1.8) UNRELEASED; urgency=medium * fix test_hbbs and mask in lan + -- rustdesk Thu, 6 Jul 2023 00:50:11 +0800 + rustdesk-server (1.1.7) UNRELEASED; urgency=medium * ipv6 support From 6b72cefbc51e7ade01c4aeb2cb395dc15400b8f6 Mon Sep 17 00:00:00 2001 From: Guiorgy Date: Sat, 22 Nov 2025 11:20:15 +0400 Subject: [PATCH 12/43] define the HOME env to allow running rootless (#612) --- docker-classic/Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-classic/Dockerfile b/docker-classic/Dockerfile index 3aebe23..8260a8f 100755 --- a/docker-classic/Dockerfile +++ b/docker-classic/Dockerfile @@ -1,4 +1,5 @@ -FROM scratch -COPY hbbs /usr/bin/hbbs -COPY hbbr /usr/bin/hbbr -WORKDIR /root +FROM scratch +COPY hbbs /usr/bin/hbbs +COPY hbbr /usr/bin/hbbr +WORKDIR /root +ENV HOME=/root From 716041bac1a054e84a51a2781b706d5f8053abf4 Mon Sep 17 00:00:00 2001 From: lrin Date: Fri, 21 Nov 2025 23:24:50 -0800 Subject: [PATCH 13/43] libs: Fix hbb_common Submodule (#553) The hbb_common Submodule was accidentally deleted in https://github.com/rustdesk/rustdesk-server/commit/c650217919ce6b67bf62a3d0c092e41f0d37b18b --- libs/hbb_common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 160000 libs/hbb_common diff --git a/libs/hbb_common b/libs/hbb_common deleted file mode 100644 index baf861b..0000000 --- a/libs/hbb_common +++ /dev/null @@ -1 +0,0 @@ -83419b6549636ee39dacef7776c473f5802e08d6 \ No newline at end of file diff --git a/libs/hbb_common b/libs/hbb_common new file mode 160000 index 0000000..83419b6 --- /dev/null +++ b/libs/hbb_common @@ -0,0 +1 @@ +Subproject commit 83419b6549636ee39dacef7776c473f5802e08d6 From 7e921be539fca3e5e531fb373ce714f80079af57 Mon Sep 17 00:00:00 2001 From: Nawer Date: Tue, 6 Jan 2026 10:58:33 +0100 Subject: [PATCH 14/43] chore: Added kubernetes example file (#623) --- kubernetes/example.yaml | 87 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 kubernetes/example.yaml diff --git a/kubernetes/example.yaml b/kubernetes/example.yaml new file mode 100644 index 0000000..9cf0c3a --- /dev/null +++ b/kubernetes/example.yaml @@ -0,0 +1,87 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: rustdesk-server +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + app: rustdesk + template: + metadata: + labels: + app: rustdesk + spec: + containers: + # id Server (HBBS) + - name: hbbs + image: rustdesk/rustdesk-server:latest + env: + - name: RELAY_HOST + value: "rustdesk.yourdomain.tld" + command: ["hbbs", "-r", "$(RELAY_HOST):21117", "-k", "_"] + volumeMounts: + - mountPath: /root + name: rustdesk-data + ports: + - containerPort: 21115 + - containerPort: 21116 + protocol: TCP + - containerPort: 21116 + protocol: UDP + - containerPort: 21118 + + # Relay Server (HBBR) + - name: hbbr + image: rustdesk/rustdesk-server:latest + command: ["hbbr", "-k", "_"] + volumeMounts: + - mountPath: /root + name: rustdesk-data + ports: + - containerPort: 21117 + - containerPort: 21119 + + volumes: + - name: rustdesk-data + persistentVolumeClaim: + claimName: rustdesk-pvc +--- +apiVersion: v1 +kind: Service +metadata: + name: rustdesk-service +spec: + type: LoadBalancer # Or NodePort + selector: + app: rustdesk + ports: + - name: hbbs-tcp + port: 21115 + targetPort: 21115 + protocol: TCP + - name: hbbs-udp + port: 21116 + targetPort: 21116 + protocol: UDP + - name: hbbs-tcp-main + port: 21116 + targetPort: 21116 + protocol: TCP + - name: hbbr-tcp + port: 21117 + targetPort: 21117 + protocol: TCP +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: rustdesk-pvc +spec: + accessModes: + - ReadWriteOnce # RWM would be available only with pro version + resources: + requests: + storage: 1Gi From 5d1b4ba78ae10ecaa650a5d280963b7acba0e87c Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 6 Jan 2026 23:59:47 +0800 Subject: [PATCH 15/43] connection log query --- src/rendezvous_server.rs | 49 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index ff46dbe..efe6330 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -61,6 +61,14 @@ type RelayServers = Vec; const CHECK_RELAY_TIMEOUT: u64 = 3_000; static ALWAYS_USE_RELAY: AtomicBool = AtomicBool::new(false); +// Store punch hole requests +use once_cell::sync::Lazy; +use tokio::sync::Mutex as TokioMutex; // differentiate if needed +#[derive(Clone)] +struct PunchReqEntry { tm: Instant, from_ip: String, to_ip: String, to_id: String } +static PUNCH_REQS: Lazy>> = Lazy::new(|| TokioMutex::new(Vec::new())); +const PUNCH_REQ_DEDUPE_SEC: u64 = 60; + #[derive(Clone)] struct Inner { serial: i32, @@ -707,6 +715,23 @@ impl RendezvousServer { }); return Ok((msg_out, None)); } + + // record punch hole request (from addr -> peer id/peer_addr) + { + let from_ip = try_into_v4(addr).ip().to_string(); + let to_ip = try_into_v4(peer_addr).ip().to_string(); + let to_id_clone = id.clone(); + let mut lock = PUNCH_REQS.lock().await; + let mut dup = false; + for e in lock.iter().rev().take(30) { // only check recent tail subset for speed + if e.from_ip == from_ip && e.to_id == to_id_clone { + if e.tm.elapsed().as_secs() < PUNCH_REQ_DEDUPE_SEC { dup = true; } + break; + } + } + if !dup { lock.push(PunchReqEntry { tm: Instant::now(), from_ip, to_ip, to_id: to_id_clone }); } + } + let mut msg_out = RendezvousMessage::new(); let peer_is_lan = self.is_lan(peer_addr); let is_lan = self.is_lan(addr); @@ -917,11 +942,12 @@ impl RendezvousServer { match fds.next() { Some("h") => { res = format!( - "{}\n{}\n{}\n{}\n{}\n{}\n", + "{}\n{}\n{}\n{}\n{}\n{}\n{}\n", "relay-servers(rs) ", "reload-geo(rg)", "ip-blocker(ib) [|] [-]", "ip-changes(ic) [|] [-]", + "punch-requests(pr) [] [-]", "always-use-relay(aur)", "test-geo(tg) " ) @@ -1021,6 +1047,27 @@ impl RendezvousServer { } } } + Some("punch-requests" | "pr") => { + use std::fmt::Write as _; + let mut lock = PUNCH_REQS.lock().await; + // retain only recent (optional cleanup older than a day) + lock.retain(|e| e.tm.elapsed().as_secs() < 24*3600); + let arg = fds.next(); + if let Some("-") = arg { lock.clear(); } + else { + let mut start = arg.and_then(|x| x.parse::().ok()).unwrap_or(0); + let mut page_size = fds.next().and_then(|x| x.parse::().ok()).unwrap_or(10); + if page_size == 0 { page_size = 10; } + if start >= lock.len() { start = 0; } + for (_, e) in lock.iter().enumerate().skip(start).take(page_size) { + let age = e.tm.elapsed(); + let event_system = std::time::SystemTime::now() - age; + let event_iso = chrono::DateTime::::from(event_system) + .to_rfc3339_opts(chrono::SecondsFormat::Secs, true); + let _ = writeln!(res, "{} {} -> {}@{}", event_iso, e.from_ip, e.to_id, e.to_ip); + } + } + } Some("always-use-relay" | "aur") => { if let Some(rs) = fds.next() { if rs.to_uppercase() == "Y" { From 34946219c34a373135d3279231bbcbcbbf98802b Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 9 Jan 2026 19:12:49 +0800 Subject: [PATCH 16/43] update workflow --- .github/workflows/build.yaml | 12 ++++++------ Cargo.lock | 1 + Cargo.toml | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 50aab4b..d638947 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -26,7 +26,7 @@ jobs: build: name: Build - ${{ matrix.job.name }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -47,7 +47,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.81" + toolchain: "1.88" override: true default: true components: rustfmt @@ -88,7 +88,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.81" + toolchain: "1.88" override: true default: true components: rustfmt @@ -172,7 +172,7 @@ jobs: needs: - build - build-win - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -414,8 +414,8 @@ jobs: if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Get git tag id: vars diff --git a/Cargo.lock b/Cargo.lock index a87da66..bf7b850 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1079,6 +1079,7 @@ dependencies = [ "clap", "deadpool", "dns-lookup", + "flate2", "flexi_logger 0.22.3", "hbb_common", "headers", diff --git a/Cargo.toml b/Cargo.toml index 4ca6d74..ac0a63c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -51,6 +51,7 @@ ipnetwork = "0.20" local-ip-address = "0.5.1" dns-lookup = "1.0.8" ping = "0.4.0" +flate2 = "1.0" [target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies] # https://github.com/rustdesk/rustdesk-server-pro/issues/189, using native-tls for better tls support From 631618a6be3ef359cbc1e3db52178eb43b193c57 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Sat, 10 Jan 2026 14:47:34 +0800 Subject: [PATCH 17/43] Update build.yaml --- .github/workflows/build.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d638947..11a93fc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,8 +4,8 @@ name: build # please setup some secrets before running this workflow: # DOCKER_IMAGE should be the target image name on docker hub (e.g. "rustdesk/rustdesk-server-s6" ) # DOCKER_IMAGE_CLASSIC should be the target image name on docker hub for the old build (e.g. "rustdesk/rustdesk-server" ) -# DOCKER_USERNAME is the username you normally use to login at https://hub.docker.com/ -# DOCKER_PASSWORD is a token you should create under "account settings / security" with read/write access +# DOCKER_HUB_USERNAME is the username you normally use to login at https://hub.docker.com/ +# DOCKER_HUB_PASSWORD is a token you should create under "account settings / security" with read/write access on: workflow_dispatch: @@ -248,8 +248,8 @@ jobs: if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta @@ -293,8 +293,8 @@ jobs: if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Get git tag id: vars @@ -371,8 +371,8 @@ jobs: if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Extract metadata (tags, labels) for Docker id: meta From bb455a3eb77b68bf12cd2805c1d74b383a3eb7e5 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 10 Jan 2026 15:51:06 +0800 Subject: [PATCH 18/43] merge ghcr to build.yml --- .github/workflows/build.yaml | 28 +++ .github/workflows/ghcr.yml | 335 ----------------------------------- 2 files changed, 28 insertions(+), 335 deletions(-) delete mode 100644 .github/workflows/ghcr.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 11a93fc..bd0deb1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,6 +7,10 @@ name: build # DOCKER_HUB_USERNAME is the username you normally use to login at https://hub.docker.com/ # DOCKER_HUB_PASSWORD is a token you should create under "account settings / security" with read/write access +permissions: + contents: read + packages: write + on: workflow_dispatch: push: @@ -19,6 +23,8 @@ on: env: CARGO_TERM_COLOR: always LATEST_TAG: latest + GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/rustdesk-server-s6 + GHCR_IMAGE_CLASSIC: ghcr.io/${{ github.repository_owner }}/rustdesk-server jobs: @@ -250,6 +256,14 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + - name: Log in to GHCR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta @@ -278,6 +292,9 @@ jobs: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} ${{ secrets.DOCKER_IMAGE }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} ${{ secrets.DOCKER_IMAGE }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} labels: ${{ steps.meta.outputs.labels }} # docker build and push of multiarch images @@ -373,6 +390,14 @@ jobs: with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} + + - name: Log in to GHCR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta @@ -399,6 +424,9 @@ jobs: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} + ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} labels: ${{ steps.meta.outputs.labels }} # docker build and push of multiarch images diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml deleted file mode 100644 index f141118..0000000 --- a/.github/workflows/ghcr.yml +++ /dev/null @@ -1,335 +0,0 @@ -name: Build and publish to ghcr.io - -on: - workflow_dispatch: - push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+' - - 'v[0-9]+.[0-9]+.[0-9]+-[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+-[0-9]+' - -env: - CARGO_TERM_COLOR: always - LATEST_TAG: latest - -permissions: - contents: read - packages: write # So need to set "secrets.GITHUB_TOKEN" - -jobs: - - # Binary build - build: - name: Build - ${{ matrix.job.name }} - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - job: - - { name: "amd64", target: "x86_64-unknown-linux-musl" } - - { name: "arm64v8", target: "aarch64-unknown-linux-musl" } - - { name: "armv7", target: "armv7-unknown-linux-musleabihf" } - - { name: "i386", target: "i686-unknown-linux-musl" } - #- { name: "amd64fb", target: "x86_64-unknown-freebsd" } - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@v1 - with: - toolchain: "1.70.0" - targets: ${{ matrix.job.target }} - components: "rustfmt" - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.job.os }} - - - name: Build - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all-features --target=${{ matrix.job.target }} - use-cross: true - - - name: Exec chmod - run: chmod -v a+x target/${{ matrix.job.target }}/release/* - - - name: Publish Artifacts - uses: actions/upload-artifact@v4 - with: - name: binaries-linux-${{ matrix.job.name }} - path: | - target/${{ matrix.job.target }}/release/hbbr - target/${{ matrix.job.target }}/release/hbbs - target/${{ matrix.job.target }}/release/rustdesk-utils - if-no-files-found: error - - # Build and push single-arch Docker images to ghcr.io - create-s6-overlay-images: - name: Docker push - ${{ matrix.job.name }} - needs: build - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - job: - - { name: "amd64", docker_platform: "linux/amd64", s6_platform: "x86_64" } - - { name: "arm64v8", docker_platform: "linux/arm64", s6_platform: "aarch64" } - - { name: "armv7", docker_platform: "linux/arm/v7", s6_platform: "armhf" } - - { name: "i386", docker_platform: "linux/386", s6_platform: "i686" } - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Download binaries - uses: actions/download-artifact@v4 - with: - pattern: binaries-linux-${{ matrix.job.name }} - path: docker/rootfs/usr/bin - merge-multiple: true - - - name: Make binaries executable - run: chmod -v a+x docker/rootfs/usr/bin/* - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }}-s6 - - - name: Get git tag - id: vars - run: | - T=${GITHUB_REF#refs/*/} - M=${T%%.*} - echo "GIT_TAG=$T" >> $GITHUB_ENV - echo "MAJOR_TAG=$M" >> $GITHUB_ENV - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: "./docker" - platforms: ${{ matrix.job.docker_platform }} - push: true - provenance: false - build-args: | - S6_ARCH=${{ matrix.job.s6_platform }} - tags: | - ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }}-${{ matrix.job.name }} - ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }}-${{ matrix.job.name }} - ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} - labels: ${{ steps.meta.outputs.labels }} - - # Set up minifest and tag for pushed image - create-s6-overlay-images-manifest: - name: Manifest for s6-overlay images - needs: create-s6-overlay-images - runs-on: ubuntu-24.04 - - steps: - - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Get git tag - id: vars - run: | - T=${GITHUB_REF#refs/*/} - M=${T%%.*} - echo "GIT_TAG=$T" >> $GITHUB_ENV - echo "MAJOR_TAG=$M" >> $GITHUB_ENV - - # Create and push manifest for :ve.rs.ion tag - - name: Create and push manifest (:ve.rs.ion) - uses: Noelware/docker-manifest-action@master - if: github.event_name != 'workflow_dispatch' - with: - base-image: ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }}-amd64, - ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }}-armv7, - ghcr.io/${{ github.repository }}-s6:${{ env.GIT_TAG }}-i386 - push: true - - # Create and push manifest for :major tag - - name: Create and push manifest (:major) - uses: Noelware/docker-manifest-action@master - with: - base-image: ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }}-amd64, - ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }}-armv7, - ghcr.io/${{ github.repository }}-s6:${{ env.MAJOR_TAG }}-i386 - push: true - - # Create and push manifest for :latest tag - - name: Create and push manifest (:latest) - uses: Noelware/docker-manifest-action@master - with: - base-image: ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }}-amd64, - ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }}-armv7, - ghcr.io/${{ github.repository }}-s6:${{ env.LATEST_TAG }}-i386 - push: true - - # Build and push single-arch Docker images to ghcr.io - create-classic-images: - name: Docker push - ${{ matrix.job.name }} - needs: build - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - matrix: - job: - - { name: "amd64", docker_platform: "linux/amd64" } - - { name: "arm64v8", docker_platform: "linux/arm64" } - - { name: "armv7", docker_platform: "linux/arm/v7" } - - { name: "i386", docker_platform: "linux/386" } - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Download binaries - uses: actions/download-artifact@v4 - with: - pattern: binaries-linux-${{ matrix.job.name }} - path: docker-classic - merge-multiple: true - - - name: Make binaries executable - run: chmod -v a+x docker-classic/* - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - - - name: Get git tag - id: vars - run: | - T=${GITHUB_REF#refs/*/} - M=${T%%.*} - echo "GIT_TAG=$T" >> $GITHUB_ENV - echo "MAJOR_TAG=$M" >> $GITHUB_ENV - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: "./docker-classic" - platforms: ${{ matrix.job.docker_platform }} - push: true - provenance: false - tags: | - ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-${{ matrix.job.name }} - ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-${{ matrix.job.name }} - ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-${{ matrix.job.name }} - labels: ${{ steps.meta.outputs.labels }} - - # Set up minifest and tag for pushed image - create-classic-images-manifest: - name: Manifest for classic images - needs: create-classic-images - runs-on: ubuntu-24.04 - - steps: - - name: Log in to GitHub Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Get git tag - id: vars - run: | - T=${GITHUB_REF#refs/*/} - M=${T%%.*} - echo "GIT_TAG=$T" >> $GITHUB_ENV - echo "MAJOR_TAG=$M" >> $GITHUB_ENV - - # Create and push manifest for :ve.rs.ion tag - - name: Create and push manifest (:ve.rs.ion) - uses: Noelware/docker-manifest-action@master - if: github.event_name != 'workflow_dispatch' - with: - base-image: ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-amd64, - ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-armv7, - ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}-i386 - push: true - - # Create and push manifest for :major tag - - name: Create and push manifest (:major) - uses: Noelware/docker-manifest-action@master - with: - base-image: ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-amd64, - ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-armv7, - ghcr.io/${{ github.repository }}:${{ env.MAJOR_TAG }}-i386 - push: true - - # Create and push manifest for :latest tag - - name: Create and push manifest (:latest) - uses: Noelware/docker-manifest-action@master - with: - base-image: ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }} - extra-images: | - ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-amd64, - ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-arm64v8, - ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-armv7, - ghcr.io/${{ github.repository }}:${{ env.LATEST_TAG }}-i386 - push: true From f61b31f04ea8e1625b0ccac6649fa202c720d2f4 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 10 Jan 2026 16:07:16 +0800 Subject: [PATCH 19/43] 1.1.15 debain log --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 06ebdbe..eaca93b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +rustdesk-server (1.1.15) UNRELEASED; urgency=medium + + * Fix: 127.0.0.1 is not loopback (#515) + * Higher default bandwidth + * Define the HOME env to allow running rootless (#612) + * Add option to log (failed) authentication attempts to enable the usage of tools like fail2ban and crowdsec (#435) + * Connection log query + + -- rustdesk Sat, 10 Jan 2026 16:04:19 +0800 + rustdesk-server (1.1.14) UNRELEASED; urgency=medium * Fix windows crash From 7c2057c3603895b2257874f2407a3591a4756f01 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 10 Jan 2026 16:33:46 +0800 Subject: [PATCH 20/43] remove annoying fmt check --- .github/workflows/test.yml | 84 -------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 2d8345a..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: test - -on: - push: - branches: [ "master" ] - paths-ignore: - - '**/README.md' - pull_request: - branches: [ "master" ] - paths-ignore: - - '**/README.md' - -jobs: - check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/cargo@v1 - with: - command: check - - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt - - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/cargo@v1 - with: - command: build - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: clippy - - uses: Swatinem/rust-cache@v2 - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all -- -D warnings From 9bae9f2f39d92c4b4ba2e28e089da5071897b22e Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Mon, 12 Jan 2026 13:28:04 +0800 Subject: [PATCH 21/43] Update build.yaml --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bd0deb1..5efea9e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,8 +23,8 @@ on: env: CARGO_TERM_COLOR: always LATEST_TAG: latest - GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/rustdesk-server-s6 - GHCR_IMAGE_CLASSIC: ghcr.io/${{ github.repository_owner }}/rustdesk-server + GHCR_IMAGE: ghcr.io/rustdesk/rustdesk-server-s6 + GHCR_IMAGE_CLASSIC: ghcr.io/rustdesk/rustdesk-server jobs: @@ -262,7 +262,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: rustdesk password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker @@ -396,7 +396,7 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ github.actor }} + username: rustdesk password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker From 04efb7033cb1863891e1095cdce2c62a578f2ddf Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:54:50 +0800 Subject: [PATCH 22/43] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index a9a08ba..def4226 100644 --- a/README.md +++ b/README.md @@ -33,5 +33,3 @@ If you want to develop your own server, [rustdesk-server-demo](https://github.co ## Installation Please follow this [doc](https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/) - - From f87372ead035e53e4a6a7908181c6c6e26feb0fe Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 12 Jan 2026 14:59:12 +0800 Subject: [PATCH 23/43] GHCR manifest --- .github/workflows/build.yaml | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5efea9e..6336f14 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -321,6 +321,14 @@ jobs: echo "GIT_TAG=$T" >> $GITHUB_ENV echo "MAJOR_TAG=$M" >> $GITHUB_ENV + - name: Log in to GHCR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: rustdesk + password: ${{ secrets.GITHUB_TOKEN }} + # manifest for :1.2.3 tag # this has to run only if invoked by a new tag - name: Create and push manifest (:ve.rs.ion) @@ -347,6 +355,32 @@ jobs: extra-images: ${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-armv7,${{ secrets.DOCKER_IMAGE }}:${{ env.LATEST_TAG }}-i386 push: true + # GHCR manifests + # manifest for :1.2.3 tag + - name: Create and push GHCR manifest (:ve.rs.ion) + uses: Noelware/docker-manifest-action@0.4.3 + if: github.event_name != 'workflow_dispatch' + with: + base-image: ${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }} + extra-images: ${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }}-amd64,${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }}-arm64v8,${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }}-armv7,${{ env.GHCR_IMAGE }}:${{ env.GIT_TAG }}-i386 + push: true + + # manifest for :1 tag (major release) + - name: Create and push GHCR manifest (:major) + uses: Noelware/docker-manifest-action@0.4.3 + with: + base-image: ${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }} + extra-images: ${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }}-amd64,${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }}-arm64v8,${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }}-armv7,${{ env.GHCR_IMAGE }}:${{ env.MAJOR_TAG }}-i386 + push: true + + # manifest for :latest tag + - name: Create and push GHCR manifest (:latest) + uses: Noelware/docker-manifest-action@0.4.3 + with: + base-image: ${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }} + extra-images: ${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }}-amd64,${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }}-arm64v8,${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }}-armv7,${{ env.GHCR_IMAGE }}:${{ env.LATEST_TAG }}-i386 + push: true + # docker build and push of single-arch images docker-classic: @@ -453,6 +487,14 @@ jobs: echo "GIT_TAG=$T" >> $GITHUB_ENV echo "MAJOR_TAG=$M" >> $GITHUB_ENV + - name: Log in to GHCR + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: rustdesk + password: ${{ secrets.GITHUB_TOKEN }} + # manifest for :1.2.3 tag # this has to run only if invoked by a new tag - name: Create and push manifest (:ve.rs.ion) @@ -479,6 +521,32 @@ jobs: extra-images: ${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-amd64,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-arm64v8,${{ secrets.DOCKER_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-armv7 push: true + # GHCR manifests + # manifest for :1.2.3 tag + - name: Create and push GHCR manifest (:ve.rs.ion) + uses: Noelware/docker-manifest-action@0.4.3 + if: github.event_name != 'workflow_dispatch' + with: + base-image: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.GIT_TAG }} + extra-images: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-amd64,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-arm64v8,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.GIT_TAG }}-armv7 + push: true + + # manifest for :1 tag (major release) + - name: Create and push GHCR manifest (:major) + uses: Noelware/docker-manifest-action@0.4.3 + with: + base-image: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }} + extra-images: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-amd64,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-arm64v8,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.MAJOR_TAG }}-armv7 + push: true + + # manifest for :latest tag + - name: Create and push GHCR manifest (:latest) + uses: Noelware/docker-manifest-action@0.4.3 + with: + base-image: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }} + extra-images: ${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-amd64,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-arm64v8,${{ env.GHCR_IMAGE_CLASSIC }}:${{ env.LATEST_TAG }}-armv7 + push: true + deb-package: From d0770e6c062a6e36d38866773b8cc2b4cddd5bea Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 12 Jan 2026 15:08:01 +0800 Subject: [PATCH 24/43] high rustc --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6336f14..0b6bca8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,7 +53,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.88" + toolchain: "1.91" override: true default: true components: rustfmt @@ -94,7 +94,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.88" + toolchain: "1.91" override: true default: true components: rustfmt From 46e9ecd47de13ff7280d2d96a06283416d334f42 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 12 Jan 2026 17:28:25 +0800 Subject: [PATCH 25/43] fix pr --- src/rendezvous_server.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index efe6330..ff68441 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -1050,15 +1050,12 @@ impl RendezvousServer { Some("punch-requests" | "pr") => { use std::fmt::Write as _; let mut lock = PUNCH_REQS.lock().await; - // retain only recent (optional cleanup older than a day) - lock.retain(|e| e.tm.elapsed().as_secs() < 24*3600); let arg = fds.next(); if let Some("-") = arg { lock.clear(); } else { let mut start = arg.and_then(|x| x.parse::().ok()).unwrap_or(0); let mut page_size = fds.next().and_then(|x| x.parse::().ok()).unwrap_or(10); if page_size == 0 { page_size = 10; } - if start >= lock.len() { start = 0; } for (_, e) in lock.iter().enumerate().skip(start).take(page_size) { let age = e.tm.elapsed(); let event_system = std::time::SystemTime::now() - age; From 34cbd57e714f6b19f0961d82480891b3f3940944 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 13 Jan 2026 10:20:40 +0800 Subject: [PATCH 26/43] bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- ui/setup.nsi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf7b850..8077c21 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1068,7 +1068,7 @@ dependencies = [ [[package]] name = "hbbs" -version = "1.1.14" +version = "1.1.15" dependencies = [ "async-speed-limit", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index ac0a63c..68ee6d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hbbs" -version = "1.1.14" +version = "1.1.15" authors = ["rustdesk "] edition = "2021" build = "build.rs" diff --git a/ui/setup.nsi b/ui/setup.nsi index fe58a1c..541320d 100644 --- a/ui/setup.nsi +++ b/ui/setup.nsi @@ -15,7 +15,7 @@ !define PRODUCT_NAME "rustdesk_server" !define PRODUCT_DESCRIPTION "Installer for ${PRODUCT_NAME}" !define COPYRIGHT "Copyright © 2021" -!define VERSION "1.1.14" +!define VERSION "1.1.15" VIProductVersion "${VERSION}.0" VIAddVersionKey "ProductName" "${PRODUCT_NAME}" From bd7bc52c43351356d188ac2f29ce2ae6b9f10035 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Tue, 13 Jan 2026 10:26:46 +0800 Subject: [PATCH 27/43] Update build.yaml --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0b6bca8..791bd79 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,7 +53,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.91" + toolchain: "1.90" override: true default: true components: rustfmt @@ -94,7 +94,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.91" + toolchain: "1.90" override: true default: true components: rustfmt From 815c728837b8a091c9feeeabb423d543be3a7f8d Mon Sep 17 00:00:00 2001 From: WC3D <57880529+WC3D@users.noreply.github.com> Date: Tue, 17 Feb 2026 01:28:35 -0500 Subject: [PATCH 28/43] fix(security): update mio from 0.8.5 to 0.8.11 (#633) Co-authored-by: aikido-autofix[bot] <119856028+aikido-autofix[bot]@users.noreply.github.com> --- ui/Cargo.lock | 88 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 77 insertions(+), 11 deletions(-) diff --git a/ui/Cargo.lock b/ui/Cargo.lock index 8163dae..cb8500d 100644 --- a/ui/Cargo.lock +++ b/ui/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "adler" @@ -1507,9 +1507,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.181" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5" [[package]] name = "libloading" @@ -1635,14 +1635,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -3568,12 +3568,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.1", "windows_aarch64_msvc 0.42.1", "windows_i686_gnu 0.42.1", "windows_i686_msvc 0.42.1", "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.1", "windows_x86_64_msvc 0.42.1", ] @@ -3583,7 +3583,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", ] [[package]] @@ -3592,15 +3601,30 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.1", "windows_aarch64_msvc 0.42.1", "windows_i686_gnu 0.42.1", "windows_i686_msvc 0.42.1", "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.1", "windows_x86_64_msvc 0.42.1", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-tokens" version = "0.39.0" @@ -3613,6 +3637,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -3631,6 +3661,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -3649,6 +3685,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -3667,6 +3709,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -3685,12 +3733,24 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -3709,6 +3769,12 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "winres" version = "0.1.12" From 80d3a50566d19459e7af3a1ab09b0024c942715a Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 1 Jul 2026 12:17:57 +0800 Subject: [PATCH 29/43] https://github.com/rustdesk/rustdesk-server/issues/670 --- src/rendezvous_server.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index ff68441..d8d9be8 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -425,16 +425,8 @@ impl RendezvousServer { socket.send(&msg_out, addr).await? } Some(rendezvous_message::Union::PunchHoleRequest(ph)) => { - if self.pm.is_in_memory(&ph.id).await { - self.handle_udp_punch_hole_request(addr, ph, key).await?; - } else { - // not in memory, fetch from db with spawn in case blocking me - let mut me = self.clone(); - let key = key.to_owned(); - tokio::spawn(async move { - allow_err!(me.handle_udp_punch_hole_request(addr, ph, &key).await); - }); - } + // UDP PunchHoleRequest is intentionally unsupported. + // The supported client path sends PunchHoleRequest over TCP/WS. } Some(rendezvous_message::Union::PunchHoleSent(phs)) => { self.handle_hole_sent(phs, addr, Some(socket)).await?; From 91fb928c6e9e7e61c9c8f569057e0a71b591c25b Mon Sep 17 00:00:00 2001 From: Luc Busquin <133058544+Cybis320@users.noreply.github.com> Date: Mon, 6 Jul 2026 19:14:03 -0700 Subject: [PATCH 30/43] Fix i32 overflow: peers offline 24.9-49.7 days wrongly reported online (#676) `Duration::as_millis()` returns u128; casting it `as i32` in the online-status and punch-hole checks keeps only the low 32 bits as a signed integer. Once a peer has not registered for more than 2^31 ms (~24.855 days), the value wraps negative and passes the `elapsed < REG_TIMEOUT` test, so a long-offline peer is reported online and connection attempts are relayed to its stale socket_addr. The in-memory peer map is never evicted, so last_reg_time stays frozen until hbbs restarts, making the false-online window 24.86-49.71 days (and it repeats every ~49.71 days). Widen REG_TIMEOUT and the two elapsed casts from i32 to i64 so the comparison no longer overflows. Co-authored-by: Claude Opus 4.8 (1M context) --- src/rendezvous_server.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index d8d9be8..dff45eb 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -47,7 +47,7 @@ enum Data { RelayServers(RelayServers), } -const REG_TIMEOUT: i32 = 30_000; +const REG_TIMEOUT: i64 = 30_000; type TcpStreamSink = SplitSink, Bytes>; type WsSink = SplitSink, tungstenite::Message>; enum Sink { @@ -697,7 +697,7 @@ impl RendezvousServer { if let Some(peer) = self.pm.get(&id).await { let (elapsed, peer_addr) = { let r = peer.read().await; - (r.last_reg_time.elapsed().as_millis() as i32, r.socket_addr) + (r.last_reg_time.elapsed().as_millis() as i64, r.socket_addr) }; if elapsed >= REG_TIMEOUT { let mut msg_out = RendezvousMessage::new(); @@ -790,7 +790,7 @@ impl RendezvousServer { let mut states = BytesMut::zeroed((peers.len() + 7) / 8); for (i, peer_id) in peers.iter().enumerate() { if let Some(peer) = self.pm.get_in_memory(peer_id).await { - let elapsed = peer.read().await.last_reg_time.elapsed().as_millis() as i32; + let elapsed = peer.read().await.last_reg_time.elapsed().as_millis() as i64; // bytes index from left to right let states_idx = i / 8; let bit_idx = 7 - i % 8; From 73523b31cfd25d77dee862e6fc9f5e1fb5e485ef Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 21 Jul 2026 05:26:35 +0800 Subject: [PATCH 31/43] bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- debian/changelog | 6 ++++++ ui/setup.nsi | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8077c21..f018be6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1068,7 +1068,7 @@ dependencies = [ [[package]] name = "hbbs" -version = "1.1.15" +version = "1.1.16" dependencies = [ "async-speed-limit", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index 68ee6d6..e5162ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hbbs" -version = "1.1.15" +version = "1.1.16" authors = ["rustdesk "] edition = "2021" build = "build.rs" diff --git a/debian/changelog b/debian/changelog index eaca93b..536785c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +rustdesk-server (1.1.16) UNRELEASED; urgency=medium + + * Fix i32 overflow: peers offline 24.9–49.7 days wrongly reported online #676 + * Fix critical issue in mio via minor version upgrade from 0.8.5 to 0.8.11 in ui + * Fix unauthenticated UDP punch-hole request enables reflection/amplification abuse + rustdesk-server (1.1.15) UNRELEASED; urgency=medium * Fix: 127.0.0.1 is not loopback (#515) diff --git a/ui/setup.nsi b/ui/setup.nsi index 541320d..4622ee9 100644 --- a/ui/setup.nsi +++ b/ui/setup.nsi @@ -15,7 +15,7 @@ !define PRODUCT_NAME "rustdesk_server" !define PRODUCT_DESCRIPTION "Installer for ${PRODUCT_NAME}" !define COPYRIGHT "Copyright © 2021" -!define VERSION "1.1.15" +!define VERSION "1.1.16" VIProductVersion "${VERSION}.0" VIAddVersionKey "ProductName" "${PRODUCT_NAME}" From 60645b0f70649570cf611b09a33a02403644863c Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Tue, 21 Jul 2026 06:05:22 +0800 Subject: [PATCH 32/43] Update build.yaml --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 791bd79..6df1538 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,7 +53,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.90" + toolchain: "stable" override: true default: true components: rustfmt @@ -94,7 +94,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: "1.90" + toolchain: "stable" override: true default: true components: rustfmt From ea72cf2b72abd91f7be77c82f6343a967703e1e7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 06:14:29 +0800 Subject: [PATCH 33/43] Git submodule: Bump libs/hbb_common from `83419b6` to `5438d20` (#682) Bumps [libs/hbb_common](https://github.com/rustdesk/hbb_common) from `83419b6` to `5438d20`. - [Release notes](https://github.com/rustdesk/hbb_common/releases) - [Commits](https://github.com/rustdesk/hbb_common/compare/83419b6549636ee39dacef7776c473f5802e08d6...5438d2022513573094c860e4035b4fb32a8e7787) --- updated-dependencies: - dependency-name: libs/hbb_common dependency-version: 5438d2022513573094c860e4035b4fb32a8e7787 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libs/hbb_common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hbb_common b/libs/hbb_common index 83419b6..5438d20 160000 --- a/libs/hbb_common +++ b/libs/hbb_common @@ -1 +1 @@ -Subproject commit 83419b6549636ee39dacef7776c473f5802e08d6 +Subproject commit 5438d2022513573094c860e4035b4fb32a8e7787 From 70dcfdeb95ccd848ff5dc64df69ff2da4131c5a8 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 21 Jul 2026 07:12:57 +0800 Subject: [PATCH 34/43] https://github.com/rustdesk/rustdesk-server/issues/634 --- Cargo.lock | 2576 ++++++++++++++++++++++++++++++++++---- src/relay_server.rs | 9 + src/rendezvous_server.rs | 9 + 3 files changed, 2338 insertions(+), 256 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f018be6..c0195a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,13 +17,48 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + [[package]] name = "ahash" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -61,18 +96,116 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + [[package]] name = "anyhow" version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +[[package]] +name = "arc-swap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" +dependencies = [ + "rustversion", +] + [[package]] name = "arrayvec" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +[[package]] +name = "asn1-rs" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom 7.1.1", + "num-traits", + "rusticata-macros", + "thiserror 1.0.31", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + [[package]] name = "async-compression" version = "0.4.18" @@ -86,6 +219,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-recursion" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + [[package]] name = "async-speed-limit" version = "0.3.1" @@ -104,7 +248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "syn 1.0.93", ] @@ -117,6 +261,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -146,7 +296,7 @@ dependencies = [ "bytes", "futures-util", "headers", - "http", + "http 0.2.7", "http-body", "hyper", "itoa", @@ -175,7 +325,7 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 0.2.7", "http-body", "mime", ] @@ -195,6 +345,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.0" @@ -213,6 +369,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + [[package]] name = "bcrypt" version = "0.13.0" @@ -221,10 +383,19 @@ checksum = "a7e7c93a3fb23b2fdde989b2c9ec4dd153063ec81f408507f84c090cd91c6641" dependencies = [ "base64 0.13.0", "blowfish", - "getrandom", + "getrandom 0.2.15", "zeroize", ] +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.59.2" @@ -234,14 +405,14 @@ dependencies = [ "bitflags 1.3.2", "cexpr", "clang-sys", - "clap", + "clap 2.34.0", "env_logger 0.9.0", "lazy_static", "lazycell", "log", "peeking_take_while", "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "regex", "rustc-hash", "shlex", @@ -256,9 +427,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.7.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "block-buffer" @@ -269,6 +440,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + [[package]] name = "blowfish" version = "0.9.1" @@ -293,13 +473,47 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.9.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" dependencies = [ "serde", ] +[[package]] +name = "calloop" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" +dependencies = [ + "bitflags 2.13.1", + "polling", + "rustix", + "slab", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + [[package]] name = "cc" version = "1.2.9" @@ -311,6 +525,18 @@ dependencies = [ "shlex", ] +[[package]] +name = "ccm" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae3c82e4355234767756212c570e29833699ab63e6ffd161887314cc5b43847" +dependencies = [ + "aead", + "cipher", + "ctr", + "subtle", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -332,6 +558,30 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chacha20" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7fc89c7c5b9e7a02dfe45cd2367bae382f9ed31c61ca8debe5f827c420a2f08" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "chacha20poly1305" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" +dependencies = [ + "aead", + "chacha20", + "cipher", + "poly1305", + "zeroize", +] + [[package]] name = "chrono" version = "0.4.39" @@ -354,6 +604,7 @@ checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" dependencies = [ "crypto-common", "inout", + "zeroize", ] [[package]] @@ -376,12 +627,45 @@ dependencies = [ "ansi_term", "atty", "bitflags 1.3.2", - "strsim", + "strsim 0.8.0", "textwrap", "unicode-width", "vec_map", ] +[[package]] +name = "clap" +version = "4.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fb99565819980999fb7b4a1796046a5c949e6d4ff132cf5fadf5a641e20d776" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + [[package]] name = "combine" version = "4.6.7" @@ -392,6 +676,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "config" version = "0.11.0" @@ -410,10 +703,16 @@ source = "git+https://github.com/rustdesk-org/confy#83db9ec19a2f97e9718aef69e4fc dependencies = [ "directories-next", "serde", - "thiserror", + "thiserror 1.0.31", "toml 0.5.9", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "core-foundation" version = "0.9.4" @@ -424,6 +723,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -432,27 +741,27 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" dependencies = [ "crc-catalog", ] [[package]] name = "crc-catalog" -version = "2.1.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" +checksum = "217698eaf96b4a3f0bc4f3662aaa55bdf913cd54d7204591faa790070c6d0853" [[package]] name = "crc32fast" @@ -508,7 +817,7 @@ dependencies = [ "cfg-if", "crossbeam-utils", "lazy_static", - "memoffset", + "memoffset 0.6.5", "scopeguard", ] @@ -524,24 +833,80 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "cfg-if", - "lazy_static", + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", ] [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ "generic-array", + "rand_core 0.6.4", "typenum", ] +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "curve25519-dalek" +version = "4.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "fiat-crypto", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + +[[package]] +name = "data-encoding" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + [[package]] name = "deadpool" version = "0.8.2" @@ -566,13 +931,80 @@ dependencies = [ ] [[package]] -name = "digest" -version = "0.10.3" +name = "defmt" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8" +dependencies = [ + "defmt-parser", + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror 2.0.19", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "der-parser" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cd0a5c643689626bec213c4d8bd4d96acc8ffdb4ad4bb6bc16abf27d5f4b553" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom 7.1.1", + "num-bigint", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "quickcheck", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", + "subtle", ] [[package]] @@ -606,6 +1038,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "displaydoc" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + [[package]] name = "dlopen" version = "0.1.8" @@ -653,13 +1096,69 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dtls" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f531dd7c181beaf3cebab3716afa4d0d41ab888be85232583f56bbaf07ca208a" +dependencies = [ + "aes", + "aes-gcm", + "async-trait", + "bincode", + "byteorder", + "cbc", + "ccm", + "chacha20poly1305", + "der-parser", + "hmac", + "log", + "p256", + "p384", + "portable-atomic", + "rand 0.9.5", + "rand_core 0.6.4", + "rcgen", + "ring 0.17.14", + "rustls 0.23.42", + "sec1", + "serde", + "sha1", + "sha2", + "thiserror 1.0.31", + "tokio", + "webrtc-util", + "x25519-dalek", + "x509-parser", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der", + "digest", + "elliptic-curve", + "rfc6979", + "signature 2.2.0", + "spki", +] + [[package]] name = "ed25519" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d916019f70ae3a1faa1195685e290287f39207d38e6dfee727197cffcc002214" dependencies = [ - "signature", + "signature 1.5.0", ] [[package]] @@ -668,6 +1167,27 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct", + "crypto-bigint", + "digest", + "ff", + "generic-array", + "group", + "hkdf", + "pem-rfc7468", + "pkcs8", + "rand_core 0.6.4", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encoding_rs" version = "0.8.35" @@ -677,6 +1197,16 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "env_filter" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" version = "0.9.0" @@ -692,15 +1222,15 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ - "humantime", - "is-terminal", + "anstream", + "anstyle", + "env_filter", + "jiff", "log", - "regex", - "termcolor", ] [[package]] @@ -709,6 +1239,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "event-listener" version = "2.5.2" @@ -724,6 +1264,22 @@ dependencies = [ "instant", ] +[[package]] +name = "ff" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + [[package]] name = "filetime" version = "0.2.16" @@ -732,7 +1288,7 @@ checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "winapi", ] @@ -761,7 +1317,7 @@ dependencies = [ "log", "regex", "rustversion", - "thiserror", + "thiserror 1.0.31", "time", ] @@ -780,7 +1336,7 @@ dependencies = [ "log", "nu-ansi-term", "regex", - "thiserror", + "thiserror 1.0.31", ] [[package]] @@ -818,11 +1374,10 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ - "matches", "percent-encoding", ] @@ -843,9 +1398,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", "futures-sink", @@ -853,9 +1408,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-executor" @@ -881,32 +1436,32 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" [[package]] name = "futures-macro" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 1.0.93", + "quote 1.0.47", + "syn 2.0.119", ] [[package]] name = "futures-sink" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" [[package]] name = "futures-task" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-timer" @@ -916,9 +1471,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.21" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-channel", "futures-core", @@ -928,18 +1483,18 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -953,6 +1508,39 @@ dependencies = [ "wasi", ] +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + [[package]] name = "gimli" version = "0.31.1" @@ -965,6 +1553,17 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "h2" version = "0.3.26" @@ -976,7 +1575,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.7", "indexmap 2.7.0", "slab", "tokio", @@ -1019,16 +1618,18 @@ name = "hbb_common" version = "0.1.0" dependencies = [ "anyhow", + "async-recursion", "backtrace", "base64 0.22.1", "bytes", "chrono", + "clap 4.6.3", "confy", "default_net", "directories-next", "dirs-next", "dlopen", - "env_logger 0.10.2", + "env_logger 0.11.10", "filetime", "flexi_logger 0.27.4", "futures", @@ -1036,33 +1637,43 @@ dependencies = [ "httparse", "lazy_static", "libc", + "libloading", "log", "mac_address", "machine-uid 0.3.0", "osascript", "protobuf", "protobuf-codegen", - "rand", + "rand 0.8.5", "regex", + "rustls-native-certs 0.8.4", "rustls-pki-types", "rustls-platform-verifier", "serde", "serde_derive", "serde_json", "sha2", + "smithay-client-toolkit", "socket2 0.3.19", "sodiumoxide", "sysinfo", - "thiserror", + "thiserror 1.0.31", "tokio", "tokio-native-tls", "tokio-rustls 0.26.1", "tokio-socks 0.5.2-1", + "tokio-tungstenite 0.26.2", "tokio-util", "toml 0.7.8", + "tungstenite 0.26.2", "url", + "users", "uuid", + "webpki-roots 1.0.9", + "webrtc", + "whoami", "winapi", + "x11", "zstd", ] @@ -1076,14 +1687,14 @@ dependencies = [ "base64 0.13.0", "bcrypt", "chrono", - "clap", + "clap 2.34.0", "deadpool", "dns-lookup", "flate2", "flexi_logger 0.22.3", "hbb_common", "headers", - "http", + "http 0.2.7", "ipnetwork", "jsonwebtoken", "lazy_static", @@ -1101,9 +1712,9 @@ dependencies = [ "serde_json", "sodiumoxide", "sqlx", - "tokio-tungstenite", + "tokio-tungstenite 0.17.1", "tower-http", - "tungstenite", + "tungstenite 0.17.2", "uuid", "whoami", ] @@ -1118,7 +1729,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "headers-core", - "http", + "http 0.2.7", "httpdate", "mime", "sha-1", @@ -1130,7 +1741,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.7", ] [[package]] @@ -1157,12 +1768,36 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" +[[package]] +name = "hermit-abi" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" + [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + [[package]] name = "http" version = "0.2.7" @@ -1174,6 +1809,16 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" +dependencies = [ + "bytes", + "itoa", +] + [[package]] name = "http-body" version = "0.4.4" @@ -1181,7 +1826,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes", - "http", + "http 0.2.7", "pin-project-lite", ] @@ -1193,9 +1838,9 @@ checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -1220,7 +1865,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.7", "http-body", "httparse", "httpdate", @@ -1240,7 +1885,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", + "http 0.2.7", "hyper", "rustls 0.21.12", "tokio", @@ -1284,14 +1929,106 @@ dependencies = [ ] [[package]] -name = "idna" -version = "0.2.3" +name = "icu_collections" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" + +[[package]] +name = "icu_properties" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" + +[[package]] +name = "icu_provider" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -1320,6 +2057,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ + "block-padding", "generic-array", ] @@ -1332,6 +2070,27 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "interceptor" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea51375727680dc15f06e8ad90fa31df75d79dd030100e8ad60eef1c27fe2c98" +dependencies = [ + "async-trait", + "bytes", + "futures", + "log", + "portable-atomic", + "rand 0.9.5", + "rtcp", + "rtp", + "thiserror 1.0.31", + "tokio", + "waitgroup", + "webrtc-srtp", + "webrtc-util", +] + [[package]] name = "ipnet" version = "2.10.1" @@ -1358,6 +2117,12 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.10.3" @@ -1374,17 +2139,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] -name = "jni" -version = "0.19.0" +name = "jiff" +version = "0.2.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "e184d09547b80eb7e20d141ba2fb1fbac843ca53f4cf1b31210adc4c1adc6e16" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + +[[package]] +name = "jiff-static" +version = "0.2.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "323da076b7a6faf914dc677cb05a4b907742ff7375c8322c9e7f5061e5e0e9de" +dependencies = [ + "jiff-core", + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.31", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -1419,7 +2222,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc9051c17f81bae79440afa041b3a278e1de71bfb96d32454b477fd4703ccb6f" dependencies = [ "base64 0.13.0", - "pem", + "pem 1.0.2", "ring 0.16.20", "serde", "serde_json", @@ -1428,9 +2231,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lazycell" @@ -1453,9 +2256,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.169" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libloading" @@ -1467,6 +2270,18 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "libredox" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" +dependencies = [ + "bitflags 2.13.1", + "libc", + "plain", + "redox_syscall 0.9.0", +] + [[package]] name = "libsodium-sys" version = "0.2.7" @@ -1490,6 +2305,18 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" + [[package]] name = "local-ip-address" version = "0.5.3" @@ -1498,7 +2325,7 @@ checksum = "2815836665de176ba66deaa449ada98fdf208d84730d1a84a22cbeed6151a6fa" dependencies = [ "libc", "neli", - "thiserror", + "thiserror 1.0.31", "windows-sys 0.48.0", ] @@ -1514,12 +2341,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "mac_address" @@ -1527,7 +2351,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4863ee94f19ed315bf3bc00299338d857d4b5bc856af375cc97d237382ad3856" dependencies = [ - "nix", + "nix 0.23.1", "winapi", ] @@ -1550,24 +2374,37 @@ dependencies = [ "winreg 0.11.0", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "matchit" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memmap2" +version = "0.9.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -1577,6 +2414,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -1620,13 +2466,13 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.3" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", "wasi", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1638,10 +2484,10 @@ dependencies = [ "libc", "log", "openssl", - "openssl-probe", + "openssl-probe 0.1.5", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -1666,7 +2512,7 @@ checksum = "c168194d373b1e134786274020dae7fc5513d565ea2ebb9bc9ff17ffb69106d4" dependencies = [ "either", "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "serde", "syn 1.0.93", ] @@ -1681,7 +2527,20 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset", + "memoffset 0.6.5", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", ] [[package]] @@ -1733,6 +2592,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + [[package]] name = "num-integer" version = "0.1.46" @@ -1779,19 +2644,40 @@ dependencies = [ "memchr", ] +[[package]] +name = "oid-registry" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d8034d9489cdaf79228eb9f6a3b8d7bb32ba00d6645ebd48eef4077ceb5bd9" +dependencies = [ + "asn1-rs", +] + [[package]] name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + [[package]] name = "openssl" version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.7.0", + "bitflags 2.13.1", "cfg-if", "foreign-types", "libc", @@ -1807,8 +2693,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", ] [[package]] @@ -1817,6 +2703,12 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + [[package]] name = "openssl-sys" version = "0.9.104" @@ -1850,6 +2742,30 @@ dependencies = [ "serde_json", ] +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + +[[package]] +name = "p384" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "parking_lot" version = "0.11.2" @@ -1880,7 +2796,7 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "smallvec", "winapi", ] @@ -1893,7 +2809,7 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "smallvec", "windows-sys 0.36.1", ] @@ -1920,10 +2836,29 @@ dependencies = [ ] [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "pem" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64 0.22.1", + "serde_core", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project" @@ -1941,8 +2876,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56a66c0c55993aa927429d0f8a0abfd74f084e4d9c192cffed01e418d83eefb" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", ] [[package]] @@ -1963,9 +2898,19 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69044d1c00894fc1f43d9485aadb6ab6e68df90608fa52cf1074cda6420c6b76" dependencies = [ - "rand", + "rand 0.8.5", "socket2 0.4.4", - "thiserror", + "thiserror 1.0.31", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", ] [[package]] @@ -1974,12 +2919,94 @@ version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.5.2", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "poly1305" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" +dependencies = [ + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3" + +[[package]] +name = "portable-atomic-util" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" version = "0.4.30" @@ -2007,7 +3034,7 @@ dependencies = [ "bytes", "once_cell", "protobuf-support", - "thiserror", + "thiserror 1.0.31", ] [[package]] @@ -2022,7 +3049,7 @@ dependencies = [ "protobuf-parse", "regex", "tempfile", - "thiserror", + "thiserror 1.0.31", ] [[package]] @@ -2037,7 +3064,7 @@ dependencies = [ "protobuf", "protobuf-support", "tempfile", - "thiserror", + "thiserror 1.0.31", "which", ] @@ -2047,7 +3074,7 @@ version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" dependencies = [ - "thiserror", + "thiserror 1.0.31", ] [[package]] @@ -2056,13 +3083,22 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e1dcb320d6839f6edb64f7a4a59d39b30480d4d1765b56873f7c858538a5fe" +[[package]] +name = "quick-xml" +version = "0.39.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" +dependencies = [ + "memchr", +] + [[package]] name = "quickcheck" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ - "rand", + "rand 0.8.5", ] [[package]] @@ -2076,13 +3112,25 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2 1.0.93", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "rand" version = "0.8.5" @@ -2090,8 +3138,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", ] [[package]] @@ -2101,16 +3159,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", ] [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", ] [[package]] @@ -2133,6 +3210,20 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rcgen" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75e669e5202259b5314d1ea5397316ad400819437857b90861765f24c4cf80a2" +dependencies = [ + "pem 3.0.6", + "ring 0.17.14", + "rustls-pki-types", + "time", + "x509-parser", + "yasna", +] + [[package]] name = "redox_syscall" version = "0.2.13" @@ -2142,15 +3233,24 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5102a6aaa05aa011a238e178e6bca86d2cb56fc9f586d37cb80f5bca6e07759" +dependencies = [ + "bitflags 2.13.1", +] + [[package]] name = "redox_users" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom", - "redox_syscall", - "thiserror", + "getrandom 0.2.15", + "redox_syscall 0.2.13", + "thiserror 1.0.31", ] [[package]] @@ -2203,7 +3303,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.7", "http-body", "hyper", "hyper-rustls", @@ -2218,7 +3318,7 @@ dependencies = [ "pin-project-lite", "rustls 0.21.12", "rustls-native-certs 0.6.2", - "rustls-pemfile 1.0.0", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", @@ -2238,6 +3338,16 @@ dependencies = [ "winreg 0.50.0", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ring" version = "0.16.20" @@ -2255,16 +3365,42 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.3" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babe80d5c16becf6594aa32ad2be8fe08498e7ae60b77de8df700e67f191d7e" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "getrandom", + "cfg-if", + "getrandom 0.2.15", "libc", - "spin 0.9.3", "untrusted 0.9.0", - "windows-sys 0.48.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rtcp" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81d30d1c4091644431c22acf9f8be6191b56805e0e977f15ca7104b4a6d6eaec" +dependencies = [ + "bytes", + "thiserror 1.0.31", + "webrtc-util", +] + +[[package]] +name = "rtp" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f126f38ea84c02480e32e547c1459a939052f74fb92117ac3eef23fdac6b023" +dependencies = [ + "bytes", + "memchr", + "portable-atomic", + "rand 0.9.5", + "serde", + "thiserror 1.0.31", + "webrtc-util", ] [[package]] @@ -2289,6 +3425,37 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom 7.1.1", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags 2.13.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + [[package]] name = "rustls" version = "0.20.4" @@ -2308,22 +3475,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.3", + "ring 0.17.14", "rustls-webpki 0.101.7", "sct", ] [[package]] name = "rustls" -version = "0.23.21" +version = "0.23.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" +checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138" dependencies = [ "log", "once_cell", - "ring 0.17.3", + "ring 0.17.14", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.103.13", "subtle", "zeroize", ] @@ -2334,23 +3501,22 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.0", + "openssl-probe 0.1.5", + "rustls-pemfile", "schannel", - "security-framework", + "security-framework 2.11.1", ] [[package]] name = "rustls-native-certs" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ - "openssl-probe", - "rustls-pemfile 2.2.0", + "openssl-probe 0.2.1", "rustls-pki-types", "schannel", - "security-framework", + "security-framework 3.7.0", ] [[package]] @@ -2363,39 +3529,33 @@ dependencies = [ ] [[package]] -name = "rustls-pemfile" -version = "2.2.0" +name = "rustls-pki-types" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046" dependencies = [ - "rustls-pki-types", + "zeroize", ] -[[package]] -name = "rustls-pki-types" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" - [[package]] name = "rustls-platform-verifier" -version = "0.3.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" dependencies = [ - "core-foundation", + "core-foundation 0.10.1", "core-foundation-sys", "jni", "log", "once_cell", - "rustls 0.23.21", - "rustls-native-certs 0.7.3", + "rustls 0.23.42", + "rustls-native-certs 0.8.4", "rustls-platform-verifier-android", - "rustls-webpki 0.102.8", - "security-framework", + "rustls-webpki 0.103.13", + "security-framework 3.7.0", "security-framework-sys", - "webpki-roots 0.26.7", - "winapi", + "webpki-root-certs", + "windows-sys 0.59.0", ] [[package]] @@ -2410,17 +3570,17 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.3", + "ring 0.17.14", "untrusted 0.9.0", ] [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ - "ring 0.17.3", + "ring 0.17.14", "rustls-pki-types", "untrusted 0.9.0", ] @@ -2471,48 +3631,102 @@ dependencies = [ "untrusted 0.7.1", ] +[[package]] +name = "sdp" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32c374dceda16965d541c8800ce9cc4e1c14acfd661ddf7952feeedc3411e5c6" +dependencies = [ + "rand 0.9.5", + "substring", + "thiserror 1.0.31", + "url", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.7.0", - "core-foundation", + "bitflags 2.13.1", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags 2.13.1", + "core-foundation 0.10.1", "core-foundation-sys", "libc", - "num-bigint", "security-framework-sys", ] [[package]] name = "security-framework-sys" -version = "2.14.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", ] [[package]] -name = "serde" -version = "1.0.217" +name = "semver" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 3.0.2", ] [[package]] @@ -2558,6 +3772,17 @@ dependencies = [ "digest", ] +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + [[package]] name = "sha2" version = "0.10.2" @@ -2590,6 +3815,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + [[package]] name = "simple_asn1" version = "0.6.1" @@ -2598,21 +3833,57 @@ checksum = "4a762b1c38b9b990c694b9c2f8abe3372ce6a9ceaae6bca39cfc46e054f45745" dependencies = [ "num-bigint", "num-traits", - "thiserror", + "thiserror 1.0.31", "time", ] [[package]] name = "slab" -version = "0.4.6" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.8.0" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" + +[[package]] +name = "smithay-client-toolkit" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" +dependencies = [ + "bitflags 2.13.1", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix", + "thiserror 2.0.19", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-experimental", + "wayland-protocols-misc", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2645,6 +3916,16 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + [[package]] name = "sodiumoxide" version = "0.2.7" @@ -2672,6 +3953,16 @@ dependencies = [ "lock_api", ] +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "sqlformat" version = "0.1.8" @@ -2727,7 +4018,7 @@ dependencies = [ "paste", "percent-encoding", "rustls 0.20.4", - "rustls-pemfile 1.0.0", + "rustls-pemfile", "serde", "serde_json", "sha2", @@ -2735,7 +4026,7 @@ dependencies = [ "sqlformat", "sqlx-rt", "stringprep", - "thiserror", + "thiserror 1.0.31", "tokio-stream", "url", "webpki-roots 0.22.4", @@ -2752,7 +4043,7 @@ dependencies = [ "heck", "once_cell", "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "serde_json", "sha2", "sqlx-core", @@ -2772,6 +4063,12 @@ dependencies = [ "tokio-rustls 0.23.4", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + [[package]] name = "static_assertions" version = "1.1.0" @@ -2794,6 +4091,40 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "stun" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a512c5d501e3e3b5a4bb3e8e31462d56d54a66b95a28b8596e14422bf21c32b" +dependencies = [ + "base64 0.22.1", + "crc", + "lazy_static", + "md-5", + "rand 0.9.5", + "ring 0.17.14", + "subtle", + "thiserror 1.0.31", + "tokio", + "url", + "webrtc-util", +] + +[[package]] +name = "substring" +version = "1.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ee6433ecef213b2e72f587ef64a2f5943e7cd16fbd82dbe8bc07486c534c86" +dependencies = [ + "autocfg", +] + [[package]] name = "subtle" version = "2.6.1" @@ -2818,18 +4149,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04066589568b72ec65f42d65a1a52436e954b168773148893c020269563decf2" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "unicode-xid 0.2.3", ] [[package]] name = "syn" -version = "2.0.96" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", "unicode-ident", ] @@ -2839,6 +4181,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + [[package]] name = "sysinfo" version = "0.29.10" @@ -2860,7 +4213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -2883,7 +4236,7 @@ dependencies = [ "cfg-if", "fastrand", "libc", - "redox_syscall", + "redox_syscall 0.2.13", "remove_dir_all", "winapi", ] @@ -2912,7 +4265,16 @@ version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.31", +] + +[[package]] +name = "thiserror" +version = "2.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +dependencies = [ + "thiserror-impl 2.0.19", ] [[package]] @@ -2922,28 +4284,63 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", + "quote 1.0.47", "syn 1.0.93", ] [[package]] -name = "time" -version = "0.3.9" +name = "thiserror-impl" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ - "itoa", + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 3.0.2", +] + +[[package]] +name = "time" +version = "0.3.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e1d5e639ff6bab73cb6885cc7e7b1de96c3f32c68ec55f3952614bec1092244" +dependencies = [ + "deranged", "libc", + "num-conv", "num_threads", + "powerfmt", "quickcheck", + "serde_core", + "time-core", "time-macros", ] [[package]] -name = "time-macros" -version = "0.2.4" +name = "time-core" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" +dependencies = [ + "displaydoc", + "zerovec", +] [[package]] name = "tinyvec" @@ -2962,31 +4359,30 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.43.0" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ - "backtrace", "bytes", "libc", "mio", "parking_lot 0.12.0", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.8", + "socket2 0.6.5", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", ] [[package]] @@ -3026,7 +4422,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.21", + "rustls 0.23.42", "tokio", ] @@ -3041,7 +4437,7 @@ dependencies = [ "futures-sink", "futures-util", "pin-project", - "thiserror", + "thiserror 1.0.31", "tokio", "tokio-util", ] @@ -3054,7 +4450,7 @@ checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" dependencies = [ "either", "futures-util", - "thiserror", + "thiserror 1.0.31", "tokio", ] @@ -3078,7 +4474,26 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite", + "tungstenite 0.17.2", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" +dependencies = [ + "futures-util", + "log", + "native-tls", + "rustls 0.23.42", + "rustls-native-certs 0.8.4", + "rustls-pki-types", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.26.1", + "tungstenite 0.26.2", + "webpki-roots 0.26.7", ] [[package]] @@ -3168,7 +4583,7 @@ dependencies = [ "bytes", "futures-core", "futures-util", - "http", + "http 0.2.7", "http-body", "http-range-header", "httpdate", @@ -3215,8 +4630,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", ] [[package]] @@ -3243,16 +4658,59 @@ dependencies = [ "base64 0.13.0", "byteorder", "bytes", - "http", + "http 0.2.7", "httparse", "log", - "rand", + "rand 0.8.5", "sha-1", - "thiserror", + "thiserror 1.0.31", "url", "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" +dependencies = [ + "bytes", + "data-encoding", + "http 1.4.2", + "httparse", + "log", + "native-tls", + "rand 0.9.5", + "rustls 0.23.42", + "rustls-native-certs 0.8.4", + "rustls-pki-types", + "sha1", + "thiserror 2.0.19", + "utf-8", + "webpki-roots 0.26.7", +] + +[[package]] +name = "turn" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ed995882f66ab94238de77c62e5e778389698ab700afa4696f4754da8f457cb" +dependencies = [ + "async-trait", + "base64 0.22.1", + "futures", + "log", + "md-5", + "portable-atomic", + "rand 0.9.5", + "ring 0.17.14", + "stun", + "thiserror 1.0.31", + "tokio", + "tokio-util", + "webrtc-util", +] + [[package]] name = "typenum" version = "1.15.0" @@ -3261,12 +4719,9 @@ checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "unicase" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-bidi" @@ -3319,6 +4774,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common", + "subtle", +] + [[package]] name = "untrusted" version = "0.7.1" @@ -3333,14 +4798,24 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.2.2" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", + "serde", +] + +[[package]] +name = "users" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032" +dependencies = [ + "libc", + "log", ] [[package]] @@ -3350,12 +4825,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] -name = "uuid" -version = "1.12.0" +name = "utf8_iter" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "uuid" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ - "getrandom", + "getrandom 0.4.3", + "js-sys", + "wasm-bindgen", ] [[package]] @@ -3376,6 +4865,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "waitgroup" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1f50000a783467e6c0200f9d10642f4bc424e39efc1b770203e88b488f79292" +dependencies = [ + "atomic-waker", +] + [[package]] name = "walkdir" version = "2.3.2" @@ -3403,6 +4901,21 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" version = "0.2.100" @@ -3424,8 +4937,8 @@ dependencies = [ "bumpalo", "log", "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", "wasm-bindgen-shared", ] @@ -3448,7 +4961,7 @@ version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ - "quote 1.0.38", + "quote 1.0.47", "wasm-bindgen-macro-support", ] @@ -3459,8 +4972,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2 1.0.93", - "quote 1.0.38", - "syn 2.0.96", + "quote 1.0.47", + "syn 2.0.119", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3474,6 +4987,124 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "wayland-backend" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2857dd20b54e916ec7253b3d6b4d5c4d7d4ca2c33c2e11c6c76a99bd8744755d" +dependencies = [ + "cc", + "downcast-rs", + "rustix", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" +dependencies = [ + "bitflags 2.13.1", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.1", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.1", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-experimental" +version = "20250721.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" +dependencies = [ + "bitflags 2.13.1", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-misc" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" +dependencies = [ + "bitflags 2.13.1", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.1", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a" +dependencies = [ + "proc-macro2 1.0.93", + "quick-xml", + "quote 1.0.47", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "pkg-config", +] + [[package]] name = "web-sys" version = "0.3.77" @@ -3494,6 +5125,15 @@ dependencies = [ "untrusted 0.7.1", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webpki-roots" version = "0.22.4" @@ -3518,6 +5158,184 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "webrtc" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08fd686c0920ac08f3a57eacc48e31f0e4ca1ffefba4478784606f78c14e83ad" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "dtls", + "hex", + "interceptor", + "lazy_static", + "log", + "portable-atomic", + "rand 0.9.5", + "rcgen", + "regex", + "ring 0.17.14", + "rtcp", + "rtp", + "sdp", + "serde", + "serde_json", + "sha2", + "smol_str", + "stun", + "thiserror 1.0.31", + "tokio", + "turn", + "unicase", + "url", + "waitgroup", + "webrtc-data", + "webrtc-ice", + "webrtc-mdns", + "webrtc-media", + "webrtc-sctp", + "webrtc-srtp", + "webrtc-util", +] + +[[package]] +name = "webrtc-data" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "062a5438d63bb0756a221693d76cc0dd6119affee1dfdfe57abe3a2a8c8b3eea" +dependencies = [ + "bytes", + "log", + "portable-atomic", + "thiserror 1.0.31", + "tokio", + "webrtc-sctp", + "webrtc-util", +] + +[[package]] +name = "webrtc-ice" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cb13fd1a373e68addc4bba0c8ca058627518e54342583d024bdcbb8ae5d97d" +dependencies = [ + "arc-swap", + "async-trait", + "crc", + "log", + "portable-atomic", + "rand 0.9.5", + "serde", + "serde_json", + "stun", + "thiserror 1.0.31", + "tokio", + "turn", + "url", + "uuid", + "waitgroup", + "webrtc-mdns", + "webrtc-util", +] + +[[package]] +name = "webrtc-mdns" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a17279a067e75df72ce923fdeb7f04cd808f6f5aa4910dc6bcb4fbe66b396ace" +dependencies = [ + "log", + "socket2 0.5.8", + "thiserror 1.0.31", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-media" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94a84c910fec0848fd5a0d8a5651e0ddbdedaf25a7d3ae3f0b15f71ac73a1773" +dependencies = [ + "byteorder", + "bytes", + "rand 0.9.5", + "rtp", + "thiserror 1.0.31", +] + +[[package]] +name = "webrtc-sctp" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f985465467d8910c1f8ac4382cd64f83b1f6a1a75021a82b221546f6fb3b856f" +dependencies = [ + "arc-swap", + "async-trait", + "bytes", + "crc", + "log", + "portable-atomic", + "rand 0.9.5", + "thiserror 1.0.31", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-srtp" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66d8cdc33413f1d0192670a80ce93d17cb78d57fe3a2414be30d6f6dff121123" +dependencies = [ + "aead", + "aes", + "aes-gcm", + "byteorder", + "bytes", + "ctr", + "hmac", + "log", + "rtcp", + "rtp", + "sha1", + "subtle", + "thiserror 1.0.31", + "tokio", + "webrtc-util", +] + +[[package]] +name = "webrtc-util" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1c0c7e0c8f280f2bbfae442701465777ac07adaf46ce0c5863cd58e13fe472a" +dependencies = [ + "async-trait", + "bitflags 1.3.2", + "bytes", + "ipnet", + "lazy_static", + "log", + "nix 0.26.4", + "portable-atomic", + "rand 0.9.5", + "thiserror 1.0.31", + "tokio", + "winapi", +] + [[package]] name = "which" version = "4.2.5" @@ -3531,11 +5349,12 @@ dependencies = [ [[package]] name = "whoami" -version = "1.2.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "wasm-bindgen", + "libredox", + "wasite", "web-sys", ] @@ -3598,6 +5417,12 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + [[package]] name = "windows-sys" version = "0.36.1" @@ -3611,6 +5436,15 @@ dependencies = [ "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3638,6 +5472,30 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -3669,6 +5527,12 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -3687,6 +5551,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3705,6 +5575,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3729,6 +5605,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3747,6 +5629,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3759,6 +5647,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -3777,6 +5671,12 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3827,11 +5727,175 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x25519-dalek" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" +dependencies = [ + "curve25519-dalek", + "rand_core 0.6.4", + "serde", + "zeroize", +] + +[[package]] +name = "x509-parser" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcbc162f30700d6f3f82a24bf7cc62ffe7caea42c0b2cba8bf7f3ae50cf51f69" +dependencies = [ + "asn1-rs", + "data-encoding", + "der-parser", + "lazy_static", + "nom 7.1.1", + "oid-registry", + "ring 0.17.14", + "rusticata-macros", + "thiserror 1.0.31", + "time", +] + +[[package]] +name = "xcursor" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[package]] +name = "yoke" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] + +[[package]] +name = "zerotrie" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" +dependencies = [ + "proc-macro2 1.0.93", + "quote 1.0.47", + "syn 2.0.119", +] [[package]] name = "zstd" diff --git a/src/relay_server.rs b/src/relay_server.rs index 0ec190a..72c21e4 100644 --- a/src/relay_server.rs +++ b/src/relay_server.rs @@ -401,6 +401,15 @@ async fn make_pair( use tokio_tungstenite::tungstenite::handshake::server::{Request, Response}; let callback = |req: &Request, response: Response| { let headers = req.headers(); + // X-Real-IP / X-Forwarded-For are trusted as-is so that the real + // client IP is preserved when the WebSocket port runs behind a + // reverse proxy (WSS). They are NOT validated: anyone who can reach + // this port directly can spoof an arbitrary IP, bypassing IP-based + // rate limiting / blocking and corrupting logged IPs. Do not expose + // the WebSocket port directly to untrusted networks; only the + // reverse proxy, which overwrites these headers, should be able to + // connect to it. + // https://github.com/rustdesk/rustdesk-server/issues/634 let real_ip = headers .get("X-Real-IP") .or_else(|| headers.get("X-Forwarded-For")) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index dff45eb..4c782d4 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -1153,6 +1153,15 @@ impl RendezvousServer { use tokio_tungstenite::tungstenite::handshake::server::{Request, Response}; let callback = |req: &Request, response: Response| { let headers = req.headers(); + // X-Real-IP / X-Forwarded-For are trusted as-is so that the real + // client IP is preserved when the WebSocket port runs behind a + // reverse proxy (WSS). They are NOT validated: anyone who can reach + // this port directly can spoof an arbitrary IP, bypassing IP-based + // rate limiting / blocking and corrupting logged IPs. Do not expose + // the WebSocket port directly to untrusted networks; only the + // reverse proxy, which overwrites these headers, should be able to + // connect to it. + // https://github.com/rustdesk/rustdesk-server/issues/634 let real_ip = headers .get("X-Real-IP") .or_else(|| headers.get("X-Forwarded-For")) From 109d9a235136c883f544cb3ea0f11a58f1cedd58 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 23 Jul 2026 18:43:32 +0800 Subject: [PATCH 35/43] fix more UDP reflection/amplification --- src/rendezvous_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 4c782d4..0de0878 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -429,10 +429,10 @@ impl RendezvousServer { // The supported client path sends PunchHoleRequest over TCP/WS. } Some(rendezvous_message::Union::PunchHoleSent(phs)) => { - self.handle_hole_sent(phs, addr, Some(socket)).await?; + // UDP PunchHoleSent is intentionally unsupported to avoid UDP reflection/amplification } Some(rendezvous_message::Union::LocalAddr(la)) => { - self.handle_local_addr(la, addr, Some(socket)).await?; + // UDP LocalAddr is intentionally unsupported to avoid UDP reflection/amplification } Some(rendezvous_message::Union::ConfigureUpdate(mut cu)) => { if try_into_v4(addr).ip().is_loopback() && cu.serial > self.inner.serial { From 0d915e6fc518bc9e85a18bb44f2aacc1a32c215b Mon Sep 17 00:00:00 2001 From: Julien Date: Thu, 23 Jul 2026 12:46:09 +0200 Subject: [PATCH 36/43] Update protobuf to 3.7.2 (#684) * Update protobuf to 3.7.2 Signed-off-by: Julien Arnaud * Harden protobuf recursion regression Signed-off-by: Julien Arnaud --------- Signed-off-by: Julien Arnaud Co-authored-by: Julien Arnaud --- Cargo.lock | 16 ++++++++-------- tests/protobuf_recursion.rs | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 tests/protobuf_recursion.rs diff --git a/Cargo.lock b/Cargo.lock index c0195a6..e9a5b7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3027,9 +3027,9 @@ dependencies = [ [[package]] name = "protobuf" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a7c64d9bf75b1b8d981124c14c179074e8caa7dfe7b6a12e6222ddcd0c8f72" +checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" dependencies = [ "bytes", "once_cell", @@ -3039,9 +3039,9 @@ dependencies = [ [[package]] name = "protobuf-codegen" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e26b833f144769a30e04b1db0146b2aaa53fd2fd83acf10a6b5f996606c18144" +checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace" dependencies = [ "anyhow", "once_cell", @@ -3054,9 +3054,9 @@ dependencies = [ [[package]] name = "protobuf-parse" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322330e133eab455718444b4e033ebfac7c6528972c784fcde28d2cc783c6257" +checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" dependencies = [ "anyhow", "indexmap 2.7.0", @@ -3070,9 +3070,9 @@ dependencies = [ [[package]] name = "protobuf-support" -version = "3.7.1" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b088fd20b938a875ea00843b6faf48579462630015c3788d397ad6a786663252" +checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" dependencies = [ "thiserror 1.0.31", ] diff --git a/tests/protobuf_recursion.rs b/tests/protobuf_recursion.rs new file mode 100644 index 0000000..e45be85 --- /dev/null +++ b/tests/protobuf_recursion.rs @@ -0,0 +1,34 @@ +use hbb_common::{protobuf::Message, rendezvous_proto::RendezvousMessage}; +use std::process::Command; + +const CHILD_ENV: &str = "RUSTDESK_PROTOBUF_RECURSION_CHILD"; +const CHILD_COMPLETION_SENTINEL: &str = "protobuf_recursion_child_completed"; +const TEST_NAME: &str = "deeply_nested_unknown_groups_are_rejected_without_aborting"; + +#[test] +fn deeply_nested_unknown_groups_are_rejected_without_aborting() { + if std::env::var_os(CHILD_ENV).is_some() { + const DEPTH: usize = 300_000; + let mut input = vec![0x0b; DEPTH]; + input.extend(std::iter::repeat(0x0c).take(DEPTH)); + + assert!(RendezvousMessage::parse_from_bytes(&input).is_err()); + println!("{CHILD_COMPLETION_SENTINEL}"); + return; + } + + let output = Command::new(std::env::current_exe().expect("locate the test binary")) + .args(["--exact", TEST_NAME, "--nocapture"]) + .env(CHILD_ENV, "1") + .output() + .expect("run the recursive-input check in an isolated process"); + + let stdout = String::from_utf8_lossy(&output.stdout); + assert!( + output.status.success() && stdout.lines().any(|line| line == CHILD_COMPLETION_SENTINEL), + "child parser check did not complete successfully (status: {}):\nstdout:\n{}\nstderr:\n{}", + output.status, + stdout, + String::from_utf8_lossy(&output.stderr) + ); +} From 30fba485472b18da0e80fd069d3b54acdd6f7838 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Thu, 23 Jul 2026 20:13:48 +0800 Subject: [PATCH 37/43] bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- debian/changelog | 4 ++++ ui/setup.nsi | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e9a5b7d..7c76b2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1679,7 +1679,7 @@ dependencies = [ [[package]] name = "hbbs" -version = "1.1.16" +version = "1.1.17" dependencies = [ "async-speed-limit", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index e5162ee..43963d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hbbs" -version = "1.1.16" +version = "1.1.17" authors = ["rustdesk "] edition = "2021" build = "build.rs" diff --git a/debian/changelog b/debian/changelog index 536785c..9b0be6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,7 @@ +rustdesk-server (1.1.17) UNRELEASED; urgency=medium + + * Fix more UDP reflection/amplification + rustdesk-server (1.1.16) UNRELEASED; urgency=medium * Fix i32 overflow: peers offline 24.9–49.7 days wrongly reported online #676 diff --git a/ui/setup.nsi b/ui/setup.nsi index 4622ee9..909d7d1 100644 --- a/ui/setup.nsi +++ b/ui/setup.nsi @@ -15,7 +15,7 @@ !define PRODUCT_NAME "rustdesk_server" !define PRODUCT_DESCRIPTION "Installer for ${PRODUCT_NAME}" !define COPYRIGHT "Copyright © 2021" -!define VERSION "1.1.16" +!define VERSION "1.1.17" VIProductVersion "${VERSION}.0" VIAddVersionKey "ProductName" "${PRODUCT_NAME}" From 09b9539ebe13cfc45b1de22b9d0dc179adf133e8 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 24 Jul 2026 08:50:50 +0800 Subject: [PATCH 38/43] configure doc --- README.md | 22 +++ docs/environment-variables.md | 258 ++++++++++++++++++++++++++++++++++ 2 files changed, 280 insertions(+) create mode 100644 docs/environment-variables.md diff --git a/README.md b/README.md index def4226..9476da0 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [**Manual**](https://rustdesk.com/docs/en/self-host/) +[**Configuration & environment variables**](docs/environment-variables.md) + [**FAQ**](https://github.com/rustdesk/rustdesk/wiki/FAQ) [**How to migrate OSS to Pro**](https://rustdesk.com/docs/en/self-host/rustdesk-server-pro/installscript/#convert-from-open-source) @@ -26,6 +28,26 @@ Three executables will be generated in target/release. You can find updated binaries on the [Releases](https://github.com/rustdesk/rustdesk-server/releases) page. +## Configuration + +`hbbs` and `hbbr` can be configured with command-line flags, environment +variables, or an `.env` / config file. Run `hbbs --help` or `hbbr --help` to see +the available flags. + +The most common options: + +| Option | Flag | Env var | Applies to | Purpose | +| --- | --- | --- | --- | --- | +| Key | `-k` | `KEY` | hbbs, hbbr | Server key; `-k _` requires encryption | +| Port | `-p` | `PORT` | hbbs, hbbr | Listening port (hbbs `21116`, hbbr `21117`) | +| Relay servers | `-r` | `RELAY-SERVERS` | hbbs | Relay address given to clients, e.g. your domain | +| Force relay | — | `ALWAYS_USE_RELAY` | hbbs | `Y` disables direct connections | +| Log level | — | `RUST_LOG` | hbbs, hbbr | e.g. `debug` (default `info`) | + +See **[docs/environment-variables.md](docs/environment-variables.md)** for the +full list of variables, the file/flag/env precedence rules, database and relay +bandwidth tuning, Docker image variables, and examples. + If you want extra features, [RustDesk Server Pro](https://rustdesk.com/pricing.html) might suit you better. If you want to develop your own server, [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) might be a better and simpler start for you than this repo. diff --git a/docs/environment-variables.md b/docs/environment-variables.md new file mode 100644 index 0000000..692e8d7 --- /dev/null +++ b/docs/environment-variables.md @@ -0,0 +1,258 @@ +# Configuration & Environment Variables + +This document is the single reference for every option that the open‑source +RustDesk server binaries (`hbbs`, `hbbr`) understand: command‑line flags, +environment variables, and configuration files. + +> **TL;DR** — For most people the command‑line flags shown by `hbbs --help` / +> `hbbr --help` are all you need. Environment variables are an alternative way to +> set the same options, plus a handful of extra tuning knobs that have no flag. + +--- + +## How configuration is loaded + +Both servers read their configuration from three sources. For **`hbbs`** the +order of precedence, from highest to lowest, is: + +1. **Command‑line flag** (e.g. `-p 21116`, `-k mykey`) +2. **`--config `** — an INI file passed with `-c`/`--config` +3. **`.env`** — an INI file named `.env` in the working directory +4. **Inherited process environment** — variables exported before launch + +A value set by a higher source overrides the same value from a lower one. Under +the hood every source is turned into a process environment variable, and the +code then reads that variable — so "flag", "config file" and "env var" are just +three ways to set the same thing. + +For **`hbbr`** the precedence is: **flag** (`-p`, `-k`) → **`.env`** → +**inherited environment**. + +### ⚠️ The `.env` naming gotcha (read this) + +`hbbs` and `hbbr` do **not** parse `.env` the same way: + +| | Key written in `.env` | Variable the code sees | +|---|---|---| +| **`hbbs`** | `relay_servers` **or** `relay-servers` | `RELAY-SERVERS` (upper‑cased, `_`→`-`) | +| **`hbbr`** | `downgrade_threshold` | `DOWNGRADE_THRESHOLD` (used verbatim) | + +* `hbbs` rewrites every `.env`/`--config` key to **UPPERCASE** and replaces + underscores with dashes. So a key with an underscore in `.env` (for example + `DB_URL` or `TEST_HBBS`) becomes `DB-URL` / `TEST-HBBS` and will **not** match + the `DB_URL` / `TEST_HBBS` the code looks for. Those "direct" variables + (marked 🅴 in the tables below) can therefore **only** be set as a real + environment variable, not through the `hbbs` `.env`/`--config` file. +* `hbbr` uses `.env` keys verbatim, so `.env` works for all of its variables. + +**Recommendation:** +* Set the documented flag options via the **command line** or the **`.env` + file** (using the dashed lowercase name, e.g. `relay-servers`). +* Set the 🅴 "direct" tuning variables as **real environment variables** + (docker‑compose `environment:`, systemd `Environment=`, or `export`). + +Multi‑word options such as `relay-servers` have an internal env‑var name that +contains a dash (`RELAY-SERVERS`). Most shells cannot `export RELAY-SERVERS=…`, +so for those prefer the CLI flag or the `.env` file. Single‑word options +(`PORT`, `KEY`, `MASK`, `SERIAL`, `RMEM`) are ordinary identifiers and work fine +as exported environment variables. + +--- + +## `hbbs` — ID / rendezvous server + +| Variable | CLI flag | Default | Description | +|---|---|---|---| +| `KEY` | `-k`, `--key` | `-` | Public key clients must use, or a base64 secret key, or `-` / `_` to auto‑generate a key pair (`id_ed25519`, `id_ed25519.pub`). Use `_` to require encryption (see [Keys](#keys-and-encryption)). | +| `PORT` | `-p`, `--port` | `21116` | Main TCP/UDP listening port. `hbbs` also binds `PORT-1` (NAT type test) and `PORT+2` (WebSocket). | +| `RELAY-SERVERS` | `-r`, `--relay-servers` | *(empty)* | Default relay server(s) handed to clients, comma‑separated `host` or `host:port`. Usually your public IP / domain. | +| `RENDEZVOUS-SERVERS` | `-R`, `--rendezvous-servers` | *(empty)* | Peer rendezvous servers to forward to, comma‑separated. For multi‑server setups; leave empty for a single server. | +| `MASK` | `--mask` | *(none)* | CIDR that marks a client as "LAN", e.g. `192.168.0.0/16`. When set, LAN peers get `LOCAL-IP` instead of their public address. | +| `LOCAL-IP` | *(none — env/`.env` only)* | auto‑detected | LAN address advertised to peers matched by `MASK`. Defaults to the machine's primary local IP. | +| `SERIAL` | `-s`, `--serial` | `0` | Config update serial. Bump it to push updated relay/rendezvous lists to clients. | +| `RMEM` | `-M`, `--rmem` | `0` (system default) | UDP receive‑buffer size in bytes. Raise the OS limit first: `sudo sysctl -w net.core.rmem_max=52428800`. | +| `SOFTWARE-URL` | `-u`, `--software-url` | *(empty)* | Download URL of the newest RustDesk client; the version is parsed from it and offered to clients. | +| *(config file)* | `-c`, `--config` | *(none)* | Path to an extra INI config file (see precedence above). | +| `TEST_HBBS` 🅴 | *(none)* | *(auto)* | UDP self‑test target checked at start‑up. Set to `no` to skip the check (useful behind some NATs/proxies), or to an explicit `host:port`. | +| `ALWAYS_USE_RELAY` 🅴 | *(none)* | `N` | `Y` forces every session through a relay (disables direct/hole‑punched connections). Also toggleable at runtime via the `rustdesk-utils` / console `always-use-relay` command. | +| `DB_URL` 🅴 | *(none)* | `./db_v2.sqlite3` | Path/URL of the SQLite database file. See [Database](#database). | +| `MAX_DATABASE_CONNECTIONS` 🅴 | *(none)* | `1` | Size of the SQLite connection pool. | + +🅴 = read directly from the environment; **cannot** be set through the `hbbs` +`.env`/`--config` file (see the gotcha above). + +> `PORT_FOR_API` / `KEY_FOR_API` are only used by RustDesk Server **Pro** and its +> API; they have no effect in the open‑source server. + +--- + +## `hbbr` — relay server + +| Variable | CLI flag | Default | Description | +|---|---|---|---| +| `KEY` | `-k`, `--key` | *(empty)* | Same meaning as for `hbbs`. Must match the key `hbbs` uses. `-` / `_` auto‑generate / require encryption. | +| `PORT` | `-p`, `--port` | `21117` | Relay listening port. `hbbr` also binds `PORT+2` for WebSocket relay. **Note:** when set via the `PORT` env var (not `-p`), `hbbr` listens on `PORT + 1`, so a shared `PORT=21116` makes `hbbs`=21116 and `hbbr`=21117. | + +### Relay bandwidth / QoS (all 🅴, set as environment variables) + +These have no CLI flag and can also be changed at runtime through the `hbbr` +interactive console (`ba`, `tb`, `sb`, `ls`, `dt`, `t`, …; type `h` for help). + +| Variable | Default | Unit | Description | +|---|---|---|---| +| `SINGLE_BANDWIDTH` | `128` | Mb/s | Max bandwidth a single relay connection may use. | +| `TOTAL_BANDWIDTH` | `1024` | Mb/s | Max aggregate bandwidth across all relay connections before throttling kicks in. | +| `LIMIT_SPEED` | `32` | Mb/s | Reduced per‑connection speed applied to "heavy" connections once the relay is congested. | +| `DOWNGRADE_THRESHOLD` | `0.66` | ratio (0–1) | Load ratio above which a connection is treated as heavy and eligible for downgrade. | +| `DOWNGRADE_START_CHECK` | `1800` | seconds | How long a connection must run before it is evaluated for downgrade. | + +`hbbr` reads its `.env` verbatim, so these may also be placed in `.env` +(e.g. `SINGLE_BANDWIDTH=256`). + +### Blocklists / blacklists (files, not env vars) + +`hbbr` reads two optional files from its working directory at start‑up: + +* **`blacklist.txt`** — IPs that are **bandwidth‑limited** (one IP per line; + anything after the first space on a line is ignored). +* **`blocklist.txt`** — IPs that are **refused** outright. + +Both can also be edited live from the `hbbr` console (`ba`/`br`, `Ba`/`Br`). + +--- + +## Database + +At runtime the database location comes from **`DB_URL`** (default +`./db_v2.sqlite3`). If unset, `hbbs` creates the SQLite file in its working +directory. + +> **Do not confuse `DB_URL` with `DATABASE_URL`.** The `DATABASE_URL` entry in +> the repository's `.env` is used **only at compile time** by `sqlx` to check SQL +> queries; it is **not** read by the running server. Setting `DATABASE_URL` on a +> running server has no effect — use `DB_URL`. + +--- + +## Logging + +Both binaries use `flexi_logger`, which honours the standard **`RUST_LOG`** +environment variable (default level `info`). + +```bash +RUST_LOG=debug hbbs -r example.com +``` + +--- + +## Keys and encryption + +The `KEY` / `-k` value can be: + +* a **public key** string — clients must present the matching key; +* a **base64‑encoded 64‑byte secret key** — the server derives the public key + from it; +* **`-`, `_`, or empty** — the server auto‑generates a key pair on first start, + writing `id_ed25519` (private) and `id_ed25519.pub` (public) to the working + directory, and prints the public key in the log. + +By convention `-k _` is used to run an **encryption‑only** server (the official +Docker image exposes this as `ENCRYPTED_ONLY=1`). `hbbs` and `hbbr` must be +started with the **same** key. + +To supply your own key pair, place `id_ed25519` and `id_ed25519.pub` next to the +binaries (or in `/data` for Docker) before first start. + +--- + +## Docker image variables + +The official image (`rustdesk/rustdesk-server`) wraps the binaries with an +s6 supervisor and adds a few convenience variables handled by the entrypoint, +**not** by `hbbs`/`hbbr` directly: + +| Variable | Default | Description | +|---|---|---| +| `RELAY` | `relay.example.com` | Passed to `hbbs` as `-r $RELAY` (your public address). | +| `ENCRYPTED_ONLY` | `0` | `1` adds `-k _` to both servers, forcing encryption. | +| `KEY_PUB` | *(unset)* | If set, written to `/data/id_ed25519.pub` on first start. | +| `KEY_PRIV` | *(unset)* | If set, written to `/data/id_ed25519` on first start. Provide **both** `KEY_PUB` and `KEY_PRIV`, or neither. | + +Any variable from the tables above can also be passed straight through the +container's environment (e.g. `-e ALWAYS_USE_RELAY=Y`, `-e RUST_LOG=debug`). + +--- + +## Examples + +### Command line + +```bash +# ID server: relay clients to this host, LAN detection, force encryption +hbbs -r rustdesk.example.com:21117 --mask 192.168.0.0/16 -k _ + +# Relay server, same key +hbbr -k _ +``` + +### `.env` file (working directory) + +```ini +# Works for both binaries. Use dashed lowercase names for hbbs flag options. +relay-servers = rustdesk.example.com:21117 +key = _ +port = 21116 +``` + +> Reminder: put the 🅴 variables (`DB_URL`, `TEST_HBBS`, `ALWAYS_USE_RELAY`, +> `MAX_DATABASE_CONNECTIONS`) in the real environment, not in the `hbbs` `.env`. + +### docker-compose + +```yaml +services: + hbbs: + image: rustdesk/rustdesk-server:latest + command: hbbs -r rustdesk.example.com:21117 + environment: + - ENCRYPTED_ONLY=1 + - ALWAYS_USE_RELAY=Y + - RUST_LOG=info + ports: ["21115:21115", "21116:21116", "21116:21116/udp", "21118:21118"] + volumes: ["./data:/root"] + restart: unless-stopped + + hbbr: + image: rustdesk/rustdesk-server:latest + command: hbbr + environment: + - ENCRYPTED_ONLY=1 + - SINGLE_BANDWIDTH=256 + ports: ["21117:21117", "21119:21119"] + volumes: ["./data:/root"] + restart: unless-stopped +``` + +### systemd + +```ini +[Service] +Environment=ALWAYS_USE_RELAY=Y +Environment=RUST_LOG=info +ExecStart=/usr/bin/hbbs -r rustdesk.example.com:21117 -k _ +``` + +--- + +## Port reference + +| Port | Proto | Server | Purpose | +|---|---|---|---| +| 21115 | TCP | hbbs | NAT type test (`PORT-1`) | +| 21116 | TCP + UDP | hbbs | ID registration / rendezvous / hole punching (`PORT`) | +| 21117 | TCP | hbbr | Relay (`hbbr PORT`) | +| 21118 | TCP | hbbs | WebSocket rendezvous (`PORT+2`) | +| 21119 | TCP | hbbr | WebSocket relay (`hbbr PORT+2`) | + +Ports 21118/21119 are only needed for the web client; you can omit them +otherwise. From 5530085fdab5ccb548f02f2a4c03f282b1460b02 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 24 Jul 2026 09:11:03 +0800 Subject: [PATCH 39/43] fix review --- README.md | 9 +-- docs/environment-variables.md | 131 ++++++++++++++++++++++------------ 2 files changed, 92 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 9476da0..4d7590f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ Self-host your own RustDesk server, it is free and open source. +> [!IMPORTANT] +> **Need more features?** [RustDesk Server Pro](https://rustdesk.com/pricing.html) might suit you better. +> +> **Want to develop your own server?** Start with [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo), a simpler starting point than this repository. + ## How to build manually ```bash @@ -48,10 +53,6 @@ See **[docs/environment-variables.md](docs/environment-variables.md)** for the full list of variables, the file/flag/env precedence rules, database and relay bandwidth tuning, Docker image variables, and examples. -If you want extra features, [RustDesk Server Pro](https://rustdesk.com/pricing.html) might suit you better. - -If you want to develop your own server, [rustdesk-server-demo](https://github.com/rustdesk/rustdesk-server-demo) might be a better and simpler start for you than this repo. - ## Installation Please follow this [doc](https://rustdesk.com/docs/en/self-host/rustdesk-server-oss/) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 692e8d7..8531f52 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -12,8 +12,8 @@ environment variables, and configuration files. ## How configuration is loaded -Both servers read their configuration from three sources. For **`hbbs`** the -order of precedence, from highest to lowest, is: +Both servers read their configuration from the following sources. For +**`hbbs`** the order of precedence, from highest to lowest, is: 1. **Command‑line flag** (e.g. `-p 21116`, `-k mykey`) 2. **`--config `** — an INI file passed with `-c`/`--config` @@ -28,6 +28,10 @@ three ways to set the same thing. For **`hbbr`** the precedence is: **flag** (`-p`, `-k`) → **`.env`** → **inherited environment**. +`RUST_LOG` is an exception to these rules. Both binaries initialize logging +before loading `.env` (or `hbbs`'s `--config` file), so `RUST_LOG` must be set +in the inherited process environment. + ### ⚠️ The `.env` naming gotcha (read this) `hbbs` and `hbbr` do **not** parse `.env` the same way: @@ -43,11 +47,16 @@ For **`hbbr`** the precedence is: **flag** (`-p`, `-k`) → **`.env`** → the `DB_URL` / `TEST_HBBS` the code looks for. Those "direct" variables (marked 🅴 in the tables below) can therefore **only** be set as a real environment variable, not through the `hbbs` `.env`/`--config` file. -* `hbbr` uses `.env` keys verbatim, so `.env` works for all of its variables. +* `hbbr` uses `.env` keys verbatim, so names must match the documented + uppercase spelling exactly. This works for variables read after `.env` is + loaded; `RUST_LOG` is the exception described above. **Recommendation:** -* Set the documented flag options via the **command line** or the **`.env` +* Set multi-word `hbbs` flag options via the **command line** or the **`.env` file** (using the dashed lowercase name, e.g. `relay-servers`). +* In a `.env` file shared by both binaries, spell shared names such as `KEY` and + `PORT` in uppercase. `hbbs` accepts that spelling after normalization, and + `hbbr` requires it. * Set the 🅴 "direct" tuning variables as **real environment variables** (docker‑compose `environment:`, systemd `Environment=`, or `export`). @@ -63,7 +72,7 @@ as exported environment variables. | Variable | CLI flag | Default | Description | |---|---|---|---| -| `KEY` | `-k`, `--key` | `-` | Public key clients must use, or a base64 secret key, or `-` / `_` to auto‑generate a key pair (`id_ed25519`, `id_ed25519.pub`). Use `_` to require encryption (see [Keys](#keys-and-encryption)). | +| `KEY` | `-k`, `--key` | `-` | Public key clients must use, a base64 secret key, or `-` / `_` to load or generate a key pair (`id_ed25519`, `id_ed25519.pub`). Use `_` to require encryption. An explicitly empty value disables key validation; see [Keys](#keys-and-encryption). | | `PORT` | `-p`, `--port` | `21116` | Main TCP/UDP listening port. `hbbs` also binds `PORT-1` (NAT type test) and `PORT+2` (WebSocket). | | `RELAY-SERVERS` | `-r`, `--relay-servers` | *(empty)* | Default relay server(s) handed to clients, comma‑separated `host` or `host:port`. Usually your public IP / domain. | | `RENDEZVOUS-SERVERS` | `-R`, `--rendezvous-servers` | *(empty)* | Peer rendezvous servers to forward to, comma‑separated. For multi‑server setups; leave empty for a single server. | @@ -74,7 +83,7 @@ as exported environment variables. | `SOFTWARE-URL` | `-u`, `--software-url` | *(empty)* | Download URL of the newest RustDesk client; the version is parsed from it and offered to clients. | | *(config file)* | `-c`, `--config` | *(none)* | Path to an extra INI config file (see precedence above). | | `TEST_HBBS` 🅴 | *(none)* | *(auto)* | UDP self‑test target checked at start‑up. Set to `no` to skip the check (useful behind some NATs/proxies), or to an explicit `host:port`. | -| `ALWAYS_USE_RELAY` 🅴 | *(none)* | `N` | `Y` forces every session through a relay (disables direct/hole‑punched connections). Also toggleable at runtime via the `rustdesk-utils` / console `always-use-relay` command. | +| `ALWAYS_USE_RELAY` 🅴 | *(none)* | `N` | `Y` forces every session through a relay (disables direct/hole‑punched connections). At runtime, send `always-use-relay Y` or `always-use-relay N` to the `hbbs` [loopback console](#runtime-console). | | `DB_URL` 🅴 | *(none)* | `./db_v2.sqlite3` | Path/URL of the SQLite database file. See [Database](#database). | | `MAX_DATABASE_CONNECTIONS` 🅴 | *(none)* | `1` | Size of the SQLite connection pool. | @@ -90,21 +99,29 @@ as exported environment variables. | Variable | CLI flag | Default | Description | |---|---|---|---| -| `KEY` | `-k`, `--key` | *(empty)* | Same meaning as for `hbbs`. Must match the key `hbbs` uses. `-` / `_` auto‑generate / require encryption. | +| `KEY` | `-k`, `--key` | *(empty)* | Must match the non-empty key `hbbs` uses. `-` / `_` load or generate a key pair. The empty default disables key validation and leaves the relay unauthenticated; do not leave it empty on an exposed server. | | `PORT` | `-p`, `--port` | `21117` | Relay listening port. `hbbr` also binds `PORT+2` for WebSocket relay. **Note:** when set via the `PORT` env var (not `-p`), `hbbr` listens on `PORT + 1`, so a shared `PORT=21116` makes `hbbs`=21116 and `hbbr`=21117. | ### Relay bandwidth / QoS (all 🅴, set as environment variables) -These have no CLI flag and can also be changed at runtime through the `hbbr` -interactive console (`ba`, `tb`, `sb`, `ls`, `dt`, `t`, …; type `h` for help). +These have no CLI flag and can also be changed through the `hbbr` +[loopback console](#runtime-console) (`tb`, `sb`, `ls`, `dt`, `t`, …; send `h` +for help). | Variable | Default | Unit | Description | |---|---|---|---| -| `SINGLE_BANDWIDTH` | `128` | Mb/s | Max bandwidth a single relay connection may use. | -| `TOTAL_BANDWIDTH` | `1024` | Mb/s | Max aggregate bandwidth across all relay connections before throttling kicks in. | -| `LIMIT_SPEED` | `32` | Mb/s | Reduced per‑connection speed applied to "heavy" connections once the relay is congested. | -| `DOWNGRADE_THRESHOLD` | `0.66` | ratio (0–1) | Load ratio above which a connection is treated as heavy and eligible for downgrade. | -| `DOWNGRADE_START_CHECK` | `1800` | seconds | How long a connection must run before it is evaluated for downgrade. | +| `SINGLE_BANDWIDTH` | `128` | Mb/s | Normal maximum bandwidth for each relay connection. | +| `TOTAL_BANDWIDTH` | `1024` | Mb/s | Aggregate bandwidth cap shared by all relay connections. | +| `LIMIT_SPEED` | `32` | Mb/s | Per-connection cap applied after a connection is downgraded, and to IPs in `blacklist.txt`. | +| `DOWNGRADE_THRESHOLD` | `0.66` | ratio (0–1) | Fraction of `SINGLE_BANDWIDTH` that a connection's lifetime-average throughput must exceed to trigger downgrade. | +| `DOWNGRADE_START_CHECK` | `1800` | seconds | Delay before a connection becomes eligible for the lifetime-average downgrade check. | + +Downgrade is decided independently for each connection; it does **not** check +aggregate relay congestion. After `DOWNGRADE_START_CHECK`, a connection is +capped to `LIMIT_SPEED` once its average throughput since it started exceeds +`SINGLE_BANDWIDTH * DOWNGRADE_THRESHOLD`. A lone transfer can therefore be +downgraded even when the relay is otherwise idle. `TOTAL_BANDWIDTH` is a +separate aggregate cap. `hbbr` reads its `.env` verbatim, so these may also be placed in `.env` (e.g. `SINGLE_BANDWIDTH=256`). @@ -117,7 +134,24 @@ interactive console (`ba`, `tb`, `sb`, `ls`, `dt`, `t`, …; type `h` for help). anything after the first space on a line is ignored). * **`blocklist.txt`** — IPs that are **refused** outright. -Both can also be edited live from the `hbbr` console (`ba`/`br`, `Ba`/`Br`). +Both can also be edited live through the `hbbr` loopback console (`ba`/`br`, +`Ba`/`Br`). + +### Runtime console + +The runtime consoles are TCP command transports built into the services; they +are not `rustdesk-utils` commands or interactive standard-input consoles. A +connection from a loopback address is treated as a single console command: + +```bash +# hbbs: toggle forced relay on PORT-1 (21115 by default) +printf 'always-use-relay Y' | nc 127.0.0.1 21115 + +# hbbr: list commands on its relay PORT (21117 by default) +printf 'h' | nc 127.0.0.1 21117 +``` + +Use the corresponding configured ports if you changed `PORT`. --- @@ -137,7 +171,9 @@ directory. ## Logging Both binaries use `flexi_logger`, which honours the standard **`RUST_LOG`** -environment variable (default level `info`). +environment variable (default level `info`). Set it in the process environment +before launching the binary. A value in `.env` or `hbbs`'s `--config` file is +loaded too late and has no effect on logging. ```bash RUST_LOG=debug hbbs -r example.com @@ -152,24 +188,30 @@ The `KEY` / `-k` value can be: * a **public key** string — clients must present the matching key; * a **base64‑encoded 64‑byte secret key** — the server derives the public key from it; -* **`-`, `_`, or empty** — the server auto‑generates a key pair on first start, - writing `id_ed25519` (private) and `id_ed25519.pub` (public) to the working - directory, and prints the public key in the log. +* **`-` or `_`** — the server loads a key pair from the working directory or + generates one on first start, writing `id_ed25519` (private) and + `id_ed25519.pub` (public); +* **empty** — key validation is disabled. `hbbs` still loads or generates key + files for signing but deliberately leaves its active validation key empty; + `hbbr` neither loads nor generates a key. Both services then accept clients + without validating a key. Do not use an empty value on an exposed server. By convention `-k _` is used to run an **encryption‑only** server (the official -Docker image exposes this as `ENCRYPTED_ONLY=1`). `hbbs` and `hbbr` must be -started with the **same** key. +supervisor Docker image exposes this as `ENCRYPTED_ONLY=1`). `hbbs` and `hbbr` +must be started with the **same non-empty** key. -To supply your own key pair, place `id_ed25519` and `id_ed25519.pub` next to the -binaries (or in `/data` for Docker) before first start. +To supply your own key pair, place `id_ed25519` and `id_ed25519.pub` in the +process's **current working directory** before first start. That directory may +differ from the directory containing the executable. For the supervisor Docker +image, the working directory is `/data`. --- ## Docker image variables -The official image (`rustdesk/rustdesk-server`) wraps the binaries with an -s6 supervisor and adds a few convenience variables handled by the entrypoint, -**not** by `hbbs`/`hbbr` directly: +The supervisor image (`rustdesk/rustdesk-server-s6`) starts both binaries with +s6 and adds a few convenience variables handled by its service scripts, **not** +by `hbbs`/`hbbr` directly: | Variable | Default | Description | |---|---|---| @@ -181,6 +223,10 @@ s6 supervisor and adds a few convenience variables handled by the entrypoint, Any variable from the tables above can also be passed straight through the container's environment (e.g. `-e ALWAYS_USE_RELAY=Y`, `-e RUST_LOG=debug`). +The classic scratch image (`rustdesk/rustdesk-server`) contains only the +binaries and does **not** implement `RELAY`, `ENCRYPTED_ONLY`, `KEY_PUB`, or +`KEY_PRIV`; those variables are ignored by that image. + --- ## Examples @@ -198,10 +244,10 @@ hbbr -k _ ### `.env` file (working directory) ```ini -# Works for both binaries. Use dashed lowercase names for hbbs flag options. -relay-servers = rustdesk.example.com:21117 -key = _ -port = 21116 +# Shared by both binaries. hbbr requires exact uppercase KEY and PORT names. +relay-servers=rustdesk.example.com:21117 +KEY=_ +PORT=21116 ``` > Reminder: put the 🅴 variables (`DB_URL`, `TEST_HBBS`, `ALWAYS_USE_RELAY`, @@ -211,25 +257,22 @@ port = 21116 ```yaml services: - hbbs: - image: rustdesk/rustdesk-server:latest - command: hbbs -r rustdesk.example.com:21117 + rustdesk-server: + image: rustdesk/rustdesk-server-s6:latest environment: + - RELAY=rustdesk.example.com:21117 - ENCRYPTED_ONLY=1 - ALWAYS_USE_RELAY=Y - RUST_LOG=info - ports: ["21115:21115", "21116:21116", "21116:21116/udp", "21118:21118"] - volumes: ["./data:/root"] - restart: unless-stopped - - hbbr: - image: rustdesk/rustdesk-server:latest - command: hbbr - environment: - - ENCRYPTED_ONLY=1 - SINGLE_BANDWIDTH=256 - ports: ["21117:21117", "21119:21119"] - volumes: ["./data:/root"] + ports: + - "21115:21115" + - "21116:21116" + - "21116:21116/udp" + - "21117:21117" + - "21118:21118" + - "21119:21119" + volumes: ["./data:/data"] restart: unless-stopped ``` From 538aef71d1265ecb91990434927c745faa766cd8 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 24 Jul 2026 10:56:56 +0800 Subject: [PATCH 40/43] bind interface and refactor doc --- AGENTS.md | 17 +++++ CLAUDE.md | 1 + README.md | 5 +- db_v2.sqlite3 | Bin 24576 -> 24576 bytes docs/environment-variables.md | 96 ++++++++------------------ src/common.rs | 122 ++++++++++++++++++++++++++++++++-- src/database.rs | 3 +- src/hbbr.rs | 23 +++++-- src/main.rs | 18 +++-- src/peer.rs | 2 +- src/relay_server.rs | 37 +++++++---- src/rendezvous_server.rs | 73 ++++++++++++++------ 12 files changed, 270 insertions(+), 127 deletions(-) create mode 100644 AGENTS.md create mode 100644 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..feb1f2f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,17 @@ +# Repository Instructions + +## Rust Rules + +- In Rust code, do not introduce `unwrap()` or `expect()`. +- Allowed exceptions: +- Tests may use `unwrap()` or `expect()` when it keeps the test focused and readable. +- Lock acquisition may use `unwrap()` only when the locking API makes that the practical option and the failure mode is poison handling rather than normal control flow. +- Outside those exceptions, propagate errors, handle them explicitly, or use safer fallbacks instead of `unwrap()` and `expect()`. + +## Editing Hygiene + +- Do not introduce formatting-only changes. +- Do not run repository-wide formatters or reflow unrelated code unless the + user explicitly asks for formatting. +- Keep diffs limited to semantic changes required for the task. + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c317064 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md diff --git a/README.md b/README.md index 4d7590f..887cee6 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,10 @@ The most common options: | Option | Flag | Env var | Applies to | Purpose | | --- | --- | --- | --- | --- | -| Key | `-k` | `KEY` | hbbs, hbbr | Server key; `-k _` requires encryption | +| Key | `-k` | `KEY` | hbbs, hbbr | `hbbs` loads/generates one by default | +| Bind address | `-b` | `BIND` | hbbs, hbbr | Local IP address to listen on (default: all interfaces; requires 1.1.17+) | | Port | `-p` | `PORT` | hbbs, hbbr | Listening port (hbbs `21116`, hbbr `21117`) | -| Relay servers | `-r` | `RELAY-SERVERS` | hbbs | Relay address given to clients, e.g. your domain | +| Relay servers | `-r` | `RELAY-SERVERS` | hbbs | Override when the relay uses a different address or a non-standard port | | Force relay | — | `ALWAYS_USE_RELAY` | hbbs | `Y` disables direct connections | | Log level | — | `RUST_LOG` | hbbs, hbbr | e.g. `debug` (default `info`) | diff --git a/db_v2.sqlite3 b/db_v2.sqlite3 index 93d9801b0ce72813f71240b9adf5642926bfc6c0..5e1c7814dfcca556036530cd4955da8ac6ed7325 100644 GIT binary patch delta 44 zcmZoTz}RqrQ6@OhC$l6~AuYcsH?c&)m_dMnk&(ecL4kpRL42Z&Go$#%gaz>cA*TzD delta 44 zcmZoTz}RqrQ6@OhC$l6~AuYcsH?c&)m_dMniHX5ML4kpRL2ROoGo#qXgaz>cA-xNZ diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 8531f52..488921f 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -25,70 +25,31 @@ the hood every source is turned into a process environment variable, and the code then reads that variable — so "flag", "config file" and "env var" are just three ways to set the same thing. -For **`hbbr`** the precedence is: **flag** (`-p`, `-k`) → **`.env`** → +For **`hbbr`** the precedence is: **flag** (`-b`, `-p`, `-k`) → **`.env`** → **inherited environment**. `RUST_LOG` is an exception to these rules. Both binaries initialize logging before loading `.env` (or `hbbs`'s `--config` file), so `RUST_LOG` must be set in the inherited process environment. -### ⚠️ The `.env` naming gotcha (read this) - -`hbbs` and `hbbr` do **not** parse `.env` the same way: - -| | Key written in `.env` | Variable the code sees | -|---|---|---| -| **`hbbs`** | `relay_servers` **or** `relay-servers` | `RELAY-SERVERS` (upper‑cased, `_`→`-`) | -| **`hbbr`** | `downgrade_threshold` | `DOWNGRADE_THRESHOLD` (used verbatim) | - -* `hbbs` rewrites every `.env`/`--config` key to **UPPERCASE** and replaces - underscores with dashes. So a key with an underscore in `.env` (for example - `DB_URL` or `TEST_HBBS`) becomes `DB-URL` / `TEST-HBBS` and will **not** match - the `DB_URL` / `TEST_HBBS` the code looks for. Those "direct" variables - (marked 🅴 in the tables below) can therefore **only** be set as a real - environment variable, not through the `hbbs` `.env`/`--config` file. -* `hbbr` uses `.env` keys verbatim, so names must match the documented - uppercase spelling exactly. This works for variables read after `.env` is - loaded; `RUST_LOG` is the exception described above. - -**Recommendation:** -* Set multi-word `hbbs` flag options via the **command line** or the **`.env` - file** (using the dashed lowercase name, e.g. `relay-servers`). -* In a `.env` file shared by both binaries, spell shared names such as `KEY` and - `PORT` in uppercase. `hbbs` accepts that spelling after normalization, and - `hbbr` requires it. -* Set the 🅴 "direct" tuning variables as **real environment variables** - (docker‑compose `environment:`, systemd `Environment=`, or `export`). - -Multi‑word options such as `relay-servers` have an internal env‑var name that -contains a dash (`RELAY-SERVERS`). Most shells cannot `export RELAY-SERVERS=…`, -so for those prefer the CLI flag or the `.env` file. Single‑word options -(`PORT`, `KEY`, `MASK`, `SERIAL`, `RMEM`) are ordinary identifiers and work fine -as exported environment variables. - --- ## `hbbs` — ID / rendezvous server | Variable | CLI flag | Default | Description | |---|---|---|---| -| `KEY` | `-k`, `--key` | `-` | Public key clients must use, a base64 secret key, or `-` / `_` to load or generate a key pair (`id_ed25519`, `id_ed25519.pub`). Use `_` to require encryption. An explicitly empty value disables key validation; see [Keys](#keys-and-encryption). | +| `KEY` | `-k`, `--key` | `-` | Public key clients must use, a base64 secret key, or `-` / `_` to load or generate a key pair (`id_ed25519`, `id_ed25519.pub`). `-` and `_` have the same behavior, so explicitly passing `-k _` to `hbbs` is unnecessary. An explicitly empty value disables key validation; see [Keys](#keys-and-encryption). | +| `BIND` | `-b`, `--bind` | all interfaces | **Available since 1.1.17.** Local IPv4 or IPv6 address on which all `hbbs` TCP, UDP, and WebSocket listeners bind. This does not change the addresses advertised to clients. Supported by `--config`, `.env`, and the inherited environment. | | `PORT` | `-p`, `--port` | `21116` | Main TCP/UDP listening port. `hbbs` also binds `PORT-1` (NAT type test) and `PORT+2` (WebSocket). | -| `RELAY-SERVERS` | `-r`, `--relay-servers` | *(empty)* | Default relay server(s) handed to clients, comma‑separated `host` or `host:port`. Usually your public IP / domain. | -| `RENDEZVOUS-SERVERS` | `-R`, `--rendezvous-servers` | *(empty)* | Peer rendezvous servers to forward to, comma‑separated. For multi‑server setups; leave empty for a single server. | -| `MASK` | `--mask` | *(none)* | CIDR that marks a client as "LAN", e.g. `192.168.0.0/16`. When set, LAN peers get `LOCAL-IP` instead of their public address. | -| `LOCAL-IP` | *(none — env/`.env` only)* | auto‑detected | LAN address advertised to peers matched by `MASK`. Defaults to the machine's primary local IP. | -| `SERIAL` | `-s`, `--serial` | `0` | Config update serial. Bump it to push updated relay/rendezvous lists to clients. | +| `RELAY-SERVERS` | `-r`, `--relay-servers` | *(empty)* | Optional relay server override handed to clients, as comma-separated `host` or `host:port` values. Leave empty when `hbbr` uses the same address as `hbbs` and the standard port `21117`; clients derive it automatically. Set this only when the relay uses a different IP/hostname or a non-standard port. | | `RMEM` | `-M`, `--rmem` | `0` (system default) | UDP receive‑buffer size in bytes. Raise the OS limit first: `sudo sysctl -w net.core.rmem_max=52428800`. | -| `SOFTWARE-URL` | `-u`, `--software-url` | *(empty)* | Download URL of the newest RustDesk client; the version is parsed from it and offered to clients. | | *(config file)* | `-c`, `--config` | *(none)* | Path to an extra INI config file (see precedence above). | | `TEST_HBBS` 🅴 | *(none)* | *(auto)* | UDP self‑test target checked at start‑up. Set to `no` to skip the check (useful behind some NATs/proxies), or to an explicit `host:port`. | | `ALWAYS_USE_RELAY` 🅴 | *(none)* | `N` | `Y` forces every session through a relay (disables direct/hole‑punched connections). At runtime, send `always-use-relay Y` or `always-use-relay N` to the `hbbs` [loopback console](#runtime-console). | | `DB_URL` 🅴 | *(none)* | `./db_v2.sqlite3` | Path/URL of the SQLite database file. See [Database](#database). | | `MAX_DATABASE_CONNECTIONS` 🅴 | *(none)* | `1` | Size of the SQLite connection pool. | -🅴 = read directly from the environment; **cannot** be set through the `hbbs` -`.env`/`--config` file (see the gotcha above). +🅴 = set through the inherited process environment. > `PORT_FOR_API` / `KEY_FOR_API` are only used by RustDesk Server **Pro** and its > API; they have no effect in the open‑source server. @@ -99,10 +60,11 @@ as exported environment variables. | Variable | CLI flag | Default | Description | |---|---|---|---| -| `KEY` | `-k`, `--key` | *(empty)* | Must match the non-empty key `hbbs` uses. `-` / `_` load or generate a key pair. The empty default disables key validation and leaves the relay unauthenticated; do not leave it empty on an exposed server. | +| `KEY` | `-k`, `--key` | *(empty)* | The empty default intentionally disables relay key validation, avoiding key-pair setup and mismatch failures. To enable relay key validation, use the same non-empty key as `hbbs`; `-` / `_` have the same behavior and load or generate a key pair. An empty key allows clients without a matching key to use the relay, so choose this tradeoff deliberately on an exposed server. | +| `BIND` | `-b`, `--bind` | all interfaces | **Available since 1.1.17.** Local IPv4 or IPv6 address on which the relay TCP and WebSocket listeners bind. Supported by `.env` and the inherited environment; `hbbr` does not support `--config`. | | `PORT` | `-p`, `--port` | `21117` | Relay listening port. `hbbr` also binds `PORT+2` for WebSocket relay. **Note:** when set via the `PORT` env var (not `-p`), `hbbr` listens on `PORT + 1`, so a shared `PORT=21116` makes `hbbs`=21116 and `hbbr`=21117. | -### Relay bandwidth / QoS (all 🅴, set as environment variables) +### Relay bandwidth / QoS These have no CLI flag and can also be changed through the `hbbr` [loopback console](#runtime-console) (`tb`, `sb`, `ls`, `dt`, `t`, …; send `h` @@ -123,7 +85,7 @@ capped to `LIMIT_SPEED` once its average throughput since it started exceeds downgraded even when the relay is otherwise idle. `TOTAL_BANDWIDTH` is a separate aggregate cap. -`hbbr` reads its `.env` verbatim, so these may also be placed in `.env` +These may also be placed in `.env` using the uppercase spellings shown above (e.g. `SINGLE_BANDWIDTH=256`). ### Blocklists / blacklists (files, not env vars) @@ -176,7 +138,7 @@ before launching the binary. A value in `.env` or `hbbs`'s `--config` file is loaded too late and has no effect on logging. ```bash -RUST_LOG=debug hbbs -r example.com +RUST_LOG=debug hbbs ``` --- @@ -194,11 +156,16 @@ The `KEY` / `-k` value can be: * **empty** — key validation is disabled. `hbbs` still loads or generates key files for signing but deliberately leaves its active validation key empty; `hbbr` neither loads nor generates a key. Both services then accept clients - without validating a key. Do not use an empty value on an exposed server. + without validating a key. This is the intentional `hbbr` default; use a + non-empty value when relay key validation is required. -By convention `-k _` is used to run an **encryption‑only** server (the official -supervisor Docker image exposes this as `ENCRYPTED_ONLY=1`). `hbbs` and `hbbr` -must be started with the **same non-empty** key. +`hbbs` defaults to `-`, so it already loads or generates a key pair without an +explicit `-k _`. `hbbr` intentionally defaults to an empty key to avoid +key-pair setup and mismatch failures. Leave it empty for the default mode +without key validation. To enable relay key validation, give it the same +non-empty key as `hbbs`; both services can reuse key material from a shared +working directory. The `_` value is not a stricter mode than `-` in the current +implementation. To supply your own key pair, place `id_ed25519` and `id_ed25519.pub` in the process's **current working directory** before first start. That directory may @@ -216,7 +183,7 @@ by `hbbs`/`hbbr` directly: | Variable | Default | Description | |---|---|---| | `RELAY` | `relay.example.com` | Passed to `hbbs` as `-r $RELAY` (your public address). | -| `ENCRYPTED_ONLY` | `0` | `1` adds `-k _` to both servers, forcing encryption. | +| `ENCRYPTED_ONLY` | `0` | `1` adds `-k _` to both servers. This is redundant for `hbbs`, whose default is `-`, and opts `hbbr` into key validation instead of its intentional empty default. | | `KEY_PUB` | *(unset)* | If set, written to `/data/id_ed25519.pub` on first start. | | `KEY_PRIV` | *(unset)* | If set, written to `/data/id_ed25519` on first start. Provide **both** `KEY_PUB` and `KEY_PRIV`, or neither. | @@ -231,28 +198,22 @@ binaries and does **not** implement `RELAY`, `ENCRYPTED_ONLY`, `KEY_PUB`, or ## Examples -### Command line +### Command line — non-standard ports ```bash -# ID server: relay clients to this host, LAN detection, force encryption -hbbs -r rustdesk.example.com:21117 --mask 192.168.0.0/16 -k _ - -# Relay server, same key -hbbr -k _ +# Tell clients where the relay listens because it is not using port 21117. +hbbs -p 22116 -r rustdesk.example.com:22117 +hbbr -p 22117 ``` ### `.env` file (working directory) ```ini -# Shared by both binaries. hbbr requires exact uppercase KEY and PORT names. -relay-servers=rustdesk.example.com:21117 -KEY=_ -PORT=21116 +# Non-standard ports shared by both binaries; hbbr listens on PORT+1. +relay-servers=rustdesk.example.com:22117 +PORT=22116 ``` -> Reminder: put the 🅴 variables (`DB_URL`, `TEST_HBBS`, `ALWAYS_USE_RELAY`, -> `MAX_DATABASE_CONNECTIONS`) in the real environment, not in the `hbbs` `.env`. - ### docker-compose ```yaml @@ -261,7 +222,6 @@ services: image: rustdesk/rustdesk-server-s6:latest environment: - RELAY=rustdesk.example.com:21117 - - ENCRYPTED_ONLY=1 - ALWAYS_USE_RELAY=Y - RUST_LOG=info - SINGLE_BANDWIDTH=256 @@ -282,7 +242,7 @@ services: [Service] Environment=ALWAYS_USE_RELAY=Y Environment=RUST_LOG=info -ExecStart=/usr/bin/hbbs -r rustdesk.example.com:21117 -k _ +ExecStart=/usr/bin/hbbs ``` --- diff --git a/src/common.rs b/src/common.rs index 9c76f41..80fc73a 100644 --- a/src/common.rs +++ b/src/common.rs @@ -7,10 +7,33 @@ use sodiumoxide::crypto::sign; use std::{ io::prelude::*, io::Read, - net::SocketAddr, + net::{IpAddr, SocketAddr}, time::{Instant, SystemTime}, }; +pub fn parse_bind_address(value: &str) -> Result> { + let value = value.trim(); + if value.is_empty() { + Ok(None) + } else { + value + .parse() + .with_context(|| format!("Invalid bind address: {value}")) + .map(Some) + } +} + +pub async fn listen_tcp( + bind_addr: Option, + port: u16, +) -> ResultType { + if let Some(bind_addr) = bind_addr { + hbb_common::tcp::new_listener(SocketAddr::new(bind_addr, port), true).await + } else { + hbb_common::tcp::listen_any(port).await + } +} + #[allow(dead_code)] pub(crate) fn get_expired_time() -> Instant { let now = Instant::now(); @@ -52,6 +75,12 @@ fn arg_name(name: &str) -> String { name.to_uppercase().replace('_', "-") } +#[allow(dead_code)] +#[inline] +pub fn set_arg(name: &str, value: &str) { + std::env::set_var(arg_name(name), value); +} + #[allow(dead_code)] pub fn init_args(args: &str, name: &str, about: &str) { let matches = App::new(name) @@ -64,7 +93,7 @@ pub fn init_args(args: &str, name: &str, about: &str) { if let Some(section) = v.section(None::) { section .iter() - .for_each(|(k, v)| std::env::set_var(arg_name(k), v)); + .for_each(|(k, v)| set_arg(k, v)); } } if let Some(config) = matches.value_of("config") { @@ -72,17 +101,42 @@ pub fn init_args(args: &str, name: &str, about: &str) { if let Some(section) = v.section(None::) { section .iter() - .for_each(|(k, v)| std::env::set_var(arg_name(k), v)); + .for_each(|(k, v)| set_arg(k, v)); } } } for (k, v) in matches.args { if let Some(v) = v.vals.first() { - std::env::set_var(arg_name(k), v.to_string_lossy().to_string()); + set_arg(k, &v.to_string_lossy()); } } } +#[allow(dead_code)] +pub fn get_arg_opt(name: &str) -> Option { + let dashed = arg_name(name); + let underscored = dashed.replace('-', "_"); + let lower_dashed = dashed.to_lowercase(); + let lower_underscored = underscored.to_lowercase(); + for alias in [&dashed, &underscored, &lower_dashed, &lower_underscored] { + if let Ok(value) = std::env::var(alias) { + return Some(value); + } + } + let mut aliases = std::env::vars_os() + .filter_map(|(key, value)| { + let key = key.into_string().ok()?; + if arg_name(&key) == dashed { + Some((key, value.into_string().ok()?)) + } else { + None + } + }) + .collect::>(); + aliases.sort_by(|a, b| a.0.cmp(&b.0)); + aliases.into_iter().next().map(|(_, value)| value) +} + #[allow(dead_code)] #[inline] pub fn get_arg(name: &str) -> String { @@ -92,7 +146,7 @@ pub fn get_arg(name: &str) -> String { #[allow(dead_code)] #[inline] pub fn get_arg_or(name: &str, default: String) -> String { - std::env::var(arg_name(name)).unwrap_or(default) + get_arg_opt(name).unwrap_or(default) } #[allow(dead_code)] @@ -215,4 +269,60 @@ async fn check_software_update_() -> hbb_common::ResultType<()> { log::info!("new version is available: {}", latest_release_version); } Ok(()) -} \ No newline at end of file +} + +#[cfg(test)] +mod tests { + use super::*; + use std::net::{Ipv4Addr, Ipv6Addr}; + + #[test] + fn argument_names_ignore_case_and_separator() { + let aliases = [ + "RUSTDESK-CONFIG-ALIAS-TEST", + "RUSTDESK_CONFIG_ALIAS_TEST", + "rustdesk-config-alias-test", + "rustdesk_config_alias_test", + "RustDesk_Config-Alias_Test", + ]; + for alias in aliases { + std::env::remove_var(alias); + } + for alias in aliases { + std::env::set_var(alias, alias); + assert_eq!(get_arg("RUSTDESK_CONFIG_ALIAS_TEST"), alias); + std::env::remove_var(alias); + } + set_arg("rustdesk_config_alias_test", "normalized"); + assert_eq!( + std::env::var("RUSTDESK-CONFIG-ALIAS-TEST").unwrap(), + "normalized" + ); + std::env::set_var("RUSTDESK_CONFIG_ALIAS_TEST", "inherited"); + set_arg("rustdesk-config-alias-test", "higher-priority"); + assert_eq!(get_arg("rustdesk_config_alias_test"), "higher-priority"); + std::env::remove_var("RUSTDESK-CONFIG-ALIAS-TEST"); + std::env::remove_var("RUSTDESK_CONFIG_ALIAS_TEST"); + } + + #[test] + fn parses_bind_address() { + assert_eq!(parse_bind_address("").unwrap(), None); + assert_eq!( + parse_bind_address("127.0.0.1").unwrap(), + Some(IpAddr::V4(Ipv4Addr::LOCALHOST)) + ); + assert_eq!( + parse_bind_address("::1").unwrap(), + Some(IpAddr::V6(Ipv6Addr::LOCALHOST)) + ); + assert!(parse_bind_address("not-an-ip").is_err()); + } + + #[hbb_common::tokio::test] + async fn tcp_listener_uses_bind_address() { + let bind_addr = IpAddr::V4(Ipv4Addr::LOCALHOST); + let listener = listen_tcp(Some(bind_addr), 0).await.unwrap(); + assert_eq!(listener.local_addr().unwrap().ip(), bind_addr); + } +} diff --git a/src/database.rs b/src/database.rs index fa1b6ed..1ea016e 100644 --- a/src/database.rs +++ b/src/database.rs @@ -51,8 +51,7 @@ impl Database { if !std::path::Path::new(url).exists() { std::fs::File::create(url).ok(); } - let n: usize = std::env::var("MAX_DATABASE_CONNECTIONS") - .unwrap_or_else(|_| "1".to_owned()) + let n: usize = crate::common::get_arg_or("MAX_DATABASE_CONNECTIONS", "1".to_owned()) .parse() .unwrap_or(1); log::debug!("MAX_DATABASE_CONNECTIONS={}", n); diff --git a/src/hbbr.rs b/src/hbbr.rs index 4c8a784..e6763fa 100644 --- a/src/hbbr.rs +++ b/src/hbbr.rs @@ -13,7 +13,8 @@ fn main() -> ResultType<()> { .write_mode(WriteMode::Async) .start()?; let args = format!( - "-p, --port=[NUMBER(default={RELAY_PORT})] 'Sets the listening port' + "-b, --bind=[IP] 'Sets the IP address to bind to (default: all interfaces)' + -p, --port=[NUMBER(default={RELAY_PORT})] 'Sets the listening port' -k, --key=[KEY] 'Only allow the client with the same key' ", ); @@ -25,21 +26,29 @@ fn main() -> ResultType<()> { .get_matches(); if let Ok(v) = ini::Ini::load_from_file(".env") { if let Some(section) = v.section(None::) { - section.iter().for_each(|(k, v)| std::env::set_var(k, v)); + section.iter().for_each(|(k, v)| common::set_arg(k, v)); } } let mut port = RELAY_PORT; - if let Ok(v) = std::env::var("PORT") { + if let Some(v) = common::get_arg_opt("PORT") { let v: i32 = v.parse().unwrap_or_default(); if v > 0 { port = v + 1; } } - start( + let bind = matches + .value_of("bind") + .map(str::to_owned) + .unwrap_or_else(|| common::get_arg("BIND")); + let bind_addr = common::parse_bind_address(&bind)?; + let key = matches + .value_of("key") + .map(str::to_owned) + .unwrap_or_else(|| common::get_arg("KEY")); + start_with_bind( + bind_addr, matches.value_of("port").unwrap_or(&port.to_string()), - matches - .value_of("key") - .unwrap_or(&std::env::var("KEY").unwrap_or_default()), + &key, )?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index 8a0ff24..d422c3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,13 +15,14 @@ fn main() -> ResultType<()> { .start()?; let args = format!( "-c --config=[FILE] +takes_value 'Sets a custom config file' + -b, --bind=[IP] 'Sets the IP address to bind to (default: all interfaces)' -p, --port=[NUMBER(default={RENDEZVOUS_PORT})] 'Sets the listening port' - -s, --serial=[NUMBER(default=0)] 'Sets configure update serial number' - -R, --rendezvous-servers=[HOSTS] 'Sets rendezvous servers, separated by comma' - -u, --software-url=[URL] 'Sets download url of RustDesk software of newest version' + -s, --serial=[NUMBER(default=0)] '[DEPRECATED] Sets configure update serial number' + -R, --rendezvous-servers=[HOSTS] '[DEPRECATED] Sets rendezvous servers, separated by comma' + -u, --software-url=[URL] '[DEPRECATED] Sets download url of RustDesk software of newest version' -r, --relay-servers=[HOST] 'Sets the default relay servers, separated by comma' -M, --rmem=[NUMBER(default={RMEM})] 'Sets UDP recv buffer size, set system rmem_max first, e.g., sudo sysctl -w net.core.rmem_max=52428800. vi /etc/sysctl.conf, net.core.rmem_max=52428800, sudo sysctl –p' - , --mask=[MASK] 'Determine if the connection comes from LAN, e.g. 192.168.0.0/16' + , --mask=[MASK] '[DEPRECATED] Determine if the connection comes from LAN, e.g. 192.168.0.0/16' -k, --key=[KEY] 'Only allow the client with the same key'", ); init_args(&args, "hbbs", "RustDesk ID/Rendezvous Server"); @@ -29,9 +30,16 @@ fn main() -> ResultType<()> { if port < 3 { bail!("Invalid port"); } + let bind_addr = parse_bind_address(&get_arg("bind"))?; let rmem = get_arg("rmem").parse::().unwrap_or(RMEM); let serial: i32 = get_arg("serial").parse().unwrap_or(0); crate::common::check_software_update(); - RendezvousServer::start(port, serial, &get_arg_or("key", "-".to_owned()), rmem)?; + RendezvousServer::start_with_bind( + bind_addr, + port, + serial, + &get_arg_or("key", "-".to_owned()), + rmem, + )?; Ok(()) } diff --git a/src/peer.rs b/src/peer.rs index 4ca87cf..0f218df 100644 --- a/src/peer.rs +++ b/src/peer.rs @@ -67,7 +67,7 @@ pub(crate) struct PeerMap { impl PeerMap { pub(crate) async fn new() -> ResultType { - let db = std::env::var("DB_URL").unwrap_or({ + let db = get_arg_opt("DB_URL").unwrap_or_else(|| { let mut db = "db_v2.sqlite3".to_owned(); #[cfg(all(windows, not(debug_assertions)))] { diff --git a/src/relay_server.rs b/src/relay_server.rs index 72c21e4..70c3d3c 100644 --- a/src/relay_server.rs +++ b/src/relay_server.rs @@ -8,7 +8,7 @@ use hbb_common::{ protobuf::Message as _, rendezvous_proto::*, sleep, - tcp::{listen_any, FramedStream}, + tcp::FramedStream, timeout, tokio::{ self, @@ -24,7 +24,7 @@ use std::{ collections::{HashMap, HashSet}, io::prelude::*, io::Error, - net::SocketAddr, + net::{IpAddr, SocketAddr}, sync::atomic::{AtomicUsize, Ordering}, }; @@ -46,7 +46,11 @@ const BLACKLIST_FILE: &str = "blacklist.txt"; const BLOCKLIST_FILE: &str = "blocklist.txt"; #[tokio::main(flavor = "multi_thread")] -pub async fn start(port: &str, key: &str) -> ResultType<()> { +pub async fn start_with_bind( + bind_addr: Option, + port: &str, + key: &str, +) -> ResultType<()> { let key = get_server_sk(key); if let Ok(mut file) = std::fs::File::open(BLACKLIST_FILE) { let mut contents = String::new(); @@ -85,7 +89,12 @@ pub async fn start(port: &str, key: &str) -> ResultType<()> { let main_task = async move { loop { log::info!("Start"); - io_loop(listen_any(port).await?, listen_any(port2).await?, &key).await; + io_loop( + crate::common::listen_tcp(bind_addr, port).await?, + crate::common::listen_tcp(bind_addr, port2).await?, + &key, + ) + .await; } }; let listen_signal = crate::common::listen_signal(); @@ -96,8 +105,8 @@ pub async fn start(port: &str, key: &str) -> ResultType<()> { } fn check_params() { - let tmp = std::env::var("DOWNGRADE_THRESHOLD") - .map(|x| x.parse::().unwrap_or(0.)) + let tmp = crate::common::get_arg("DOWNGRADE_THRESHOLD") + .parse::() .unwrap_or(0.); if tmp > 0. { DOWNGRADE_THRESHOLD_100.store((tmp * 100.) as _, Ordering::SeqCst); @@ -106,8 +115,8 @@ fn check_params() { "DOWNGRADE_THRESHOLD: {}", DOWNGRADE_THRESHOLD_100.load(Ordering::SeqCst) as f64 / 100. ); - let tmp = std::env::var("DOWNGRADE_START_CHECK") - .map(|x| x.parse::().unwrap_or(0)) + let tmp = crate::common::get_arg("DOWNGRADE_START_CHECK") + .parse::() .unwrap_or(0); if tmp > 0 { DOWNGRADE_START_CHECK.store(tmp * 1000, Ordering::SeqCst); @@ -116,8 +125,8 @@ fn check_params() { "DOWNGRADE_START_CHECK: {}s", DOWNGRADE_START_CHECK.load(Ordering::SeqCst) / 1000 ); - let tmp = std::env::var("LIMIT_SPEED") - .map(|x| x.parse::().unwrap_or(0.)) + let tmp = crate::common::get_arg("LIMIT_SPEED") + .parse::() .unwrap_or(0.); if tmp > 0. { LIMIT_SPEED.store((tmp * 1024. * 1024.) as usize, Ordering::SeqCst); @@ -126,8 +135,8 @@ fn check_params() { "LIMIT_SPEED: {}Mb/s", LIMIT_SPEED.load(Ordering::SeqCst) as f64 / 1024. / 1024. ); - let tmp = std::env::var("TOTAL_BANDWIDTH") - .map(|x| x.parse::().unwrap_or(0.)) + let tmp = crate::common::get_arg("TOTAL_BANDWIDTH") + .parse::() .unwrap_or(0.); if tmp > 0. { TOTAL_BANDWIDTH.store((tmp * 1024. * 1024.) as usize, Ordering::SeqCst); @@ -137,8 +146,8 @@ fn check_params() { "TOTAL_BANDWIDTH: {}Mb/s", TOTAL_BANDWIDTH.load(Ordering::SeqCst) as f64 / 1024. / 1024. ); - let tmp = std::env::var("SINGLE_BANDWIDTH") - .map(|x| x.parse::().unwrap_or(0.)) + let tmp = crate::common::get_arg("SINGLE_BANDWIDTH") + .parse::() .unwrap_or(0.); if tmp > 0. { SINGLE_BANDWIDTH.store((tmp * 1024. * 1024.) as usize, Ordering::SeqCst); diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index 0de0878..b194ae0 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -16,7 +16,7 @@ use hbb_common::{ register_pk_response::Result::{TOO_FREQUENT, UUID_MISMATCH}, *, }, - tcp::{listen_any, FramedStream}, + tcp::FramedStream, timeout, tokio::{ self, @@ -98,18 +98,25 @@ enum LoopFailure { } impl RendezvousServer { + pub fn start(port: i32, serial: i32, key: &str, rmem: usize) -> ResultType<()> { + Self::start_with_bind(None, port, serial, key, rmem) + } + #[tokio::main(flavor = "multi_thread")] - pub async fn start(port: i32, serial: i32, key: &str, rmem: usize) -> ResultType<()> { + pub async fn start_with_bind( + bind_addr: Option, + port: i32, + serial: i32, + key: &str, + rmem: usize, + ) -> ResultType<()> { let (key, sk) = Self::get_server_sk(key); let nat_port = port - 1; let ws_port = port + 2; let pm = PeerMap::new().await?; log::info!("serial={}", serial); let rendezvous_servers = get_servers(&get_arg("rendezvous-servers"), "rendezvous-servers"); - log::info!("Listening on tcp/udp :{}", port); - log::info!("Listening on tcp :{}, extra port for NAT test", nat_port); - log::info!("Listening on websocket :{}", ws_port); - let mut socket = create_udp_listener(port, rmem).await?; + let mut socket = create_udp_listener(bind_addr, port, rmem).await?; let (tx, mut rx) = mpsc::unbounded_channel::(); let software_url = get_arg("software-url"); let version = hbb_common::get_version_from_url(&software_url); @@ -147,15 +154,17 @@ impl RendezvousServer { log::info!("local-ip: {:?}", rs.inner.local_ip); std::env::set_var("PORT_FOR_API", port.to_string()); rs.parse_relay_servers(&get_arg("relay-servers")); - let mut listener = create_tcp_listener(port).await?; - let mut listener2 = create_tcp_listener(nat_port).await?; - let mut listener3 = create_tcp_listener(ws_port).await?; - let test_addr = std::env::var("TEST_HBBS").unwrap_or_default(); - if std::env::var("ALWAYS_USE_RELAY") - .unwrap_or_default() - .to_uppercase() - == "Y" - { + let mut listener = create_tcp_listener(bind_addr, port).await?; + let mut listener2 = create_tcp_listener(bind_addr, nat_port).await?; + let mut listener3 = create_tcp_listener(bind_addr, ws_port).await?; + log::info!("Listening on tcp/udp {}", listener.local_addr()?); + log::info!( + "Listening on tcp {}, extra port for NAT test", + listener2.local_addr()? + ); + log::info!("Listening on websocket {}", listener3.local_addr()?); + let test_addr = get_arg("TEST_HBBS"); + if get_arg("ALWAYS_USE_RELAY").to_uppercase() == "Y" { ALWAYS_USE_RELAY.store(true, Ordering::SeqCst); } log::info!( @@ -204,19 +213,19 @@ impl RendezvousServer { { LoopFailure::UdpSocket => { drop(socket); - socket = create_udp_listener(port, rmem).await?; + socket = create_udp_listener(bind_addr, port, rmem).await?; } LoopFailure::Listener => { drop(listener); - listener = create_tcp_listener(port).await?; + listener = create_tcp_listener(bind_addr, port).await?; } LoopFailure::Listener2 => { drop(listener2); - listener2 = create_tcp_listener(nat_port).await?; + listener2 = create_tcp_listener(bind_addr, nat_port).await?; } LoopFailure::Listener3 => { drop(listener3); - listener3 = create_tcp_listener(ws_port).await?; + listener3 = create_tcp_listener(bind_addr, ws_port).await?; } } } @@ -1352,7 +1361,15 @@ async fn send_rk_res( socket.send(&msg_out, addr).await } -async fn create_udp_listener(port: i32, rmem: usize) -> ResultType { +async fn create_udp_listener( + bind_addr: Option, + port: i32, + rmem: usize, +) -> ResultType { + if let Some(bind_addr) = bind_addr { + let addr = SocketAddr::new(bind_addr, port as _); + return FramedSocket::new_reuse(&addr, true, rmem).await; + } let addr = SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), port as _); if let Ok(s) = FramedSocket::new_reuse(&addr, true, rmem).await { log::debug!("listen on udp {:?}", s.local_addr()); @@ -1365,8 +1382,20 @@ async fn create_udp_listener(port: i32, rmem: usize) -> ResultType } #[inline] -async fn create_tcp_listener(port: i32) -> ResultType { - let s = listen_any(port as _).await?; +async fn create_tcp_listener(bind_addr: Option, port: i32) -> ResultType { + let s = listen_tcp(bind_addr, port as _).await?; log::debug!("listen on tcp {:?}", s.local_addr()); Ok(s) } + +#[cfg(test)] +mod tests { + use super::*; + + #[hbb_common::tokio::test] + async fn udp_listener_uses_bind_address() { + let bind_addr = IpAddr::V4(Ipv4Addr::LOCALHOST); + let socket = create_udp_listener(Some(bind_addr), 0, 0).await.unwrap(); + assert_eq!(socket.local_addr().unwrap().ip(), bind_addr); + } +} From af7d7f0b02945ffb93e9051a7e2f5ffd8ccae50f Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 25 Jul 2026 11:42:45 +0800 Subject: [PATCH 41/43] fix bin --- src/common.rs | 76 +++++++++++++++++++++++++++++++++++++++- src/relay_server.rs | 20 ++++++++++- src/rendezvous_server.rs | 20 +++++++++++ 3 files changed, 114 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index 80fc73a..df1a7df 100644 --- a/src/common.rs +++ b/src/common.rs @@ -7,7 +7,7 @@ use sodiumoxide::crypto::sign; use std::{ io::prelude::*, io::Read, - net::{IpAddr, SocketAddr}, + net::{IpAddr, Ipv4Addr, SocketAddr}, time::{Instant, SystemTime}, }; @@ -34,6 +34,41 @@ pub async fn listen_tcp( } } +pub fn console_addr(bind_addr: Option, port: u16) -> Option { + let bind_addr = bind_addr?; + if bind_addr.is_unspecified() || bind_addr == IpAddr::V4(Ipv4Addr::LOCALHOST) { + return None; + } + Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port)) +} + +// The runtime console (check_cmd) is reached via 127.0.0.1, so when the bind +// address does not already accept connections to 127.0.0.1 (it is neither the +// any-address nor 127.0.0.1 itself), the console gets a dedicated listener +// there; it is never bound to the external bind address. +pub async fn listen_console( + bind_addr: Option, + port: u16, +) -> ResultType> { + match console_addr(bind_addr, port) { + Some(addr) => { + let listener = hbb_common::tcp::new_listener(addr, true).await?; + log::info!("Listening on tcp {} for the console", addr); + Ok(Some(listener)) + } + None => Ok(None), + } +} + +pub async fn accept_or_pending( + listener: Option<&hbb_common::tokio::net::TcpListener>, +) -> std::io::Result<(hbb_common::tokio::net::TcpStream, SocketAddr)> { + match listener { + Some(listener) => listener.accept().await, + None => std::future::pending().await, + } +} + #[allow(dead_code)] pub(crate) fn get_expired_time() -> Instant { let now = Instant::now(); @@ -325,4 +360,43 @@ mod tests { let listener = listen_tcp(Some(bind_addr), 0).await.unwrap(); assert_eq!(listener.local_addr().unwrap().ip(), bind_addr); } + + #[test] + fn console_addr_only_when_bind_does_not_cover_ipv4_localhost() { + for bind_addr in [ + None, + Some(IpAddr::V4(Ipv4Addr::UNSPECIFIED)), + Some(IpAddr::V6(Ipv6Addr::UNSPECIFIED)), + Some(IpAddr::V4(Ipv4Addr::LOCALHOST)), + ] { + assert_eq!(console_addr(bind_addr, 21117), None); + } + for bind_addr in [ + Some(IpAddr::V4(Ipv4Addr::new(192, 0, 2, 1))), + Some("2001:db8::1".parse().unwrap()), + Some(IpAddr::V6(Ipv6Addr::LOCALHOST)), + ] { + assert_eq!( + console_addr(bind_addr, 21117), + Some(SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 21117)) + ); + } + } + + #[hbb_common::tokio::test] + async fn console_listener_binds_ipv4_localhost() { + let listener = listen_console(Some(IpAddr::V4(Ipv4Addr::new(192, 0, 2, 1))), 0) + .await + .unwrap() + .unwrap(); + assert_eq!( + listener.local_addr().unwrap().ip(), + IpAddr::V4(Ipv4Addr::LOCALHOST) + ); + assert!(listen_console(None, 0).await.unwrap().is_none()); + assert!(listen_console(Some(IpAddr::V4(Ipv4Addr::LOCALHOST)), 0) + .await + .unwrap() + .is_none()); + } } diff --git a/src/relay_server.rs b/src/relay_server.rs index 70c3d3c..de1a7ea 100644 --- a/src/relay_server.rs +++ b/src/relay_server.rs @@ -92,6 +92,7 @@ pub async fn start_with_bind( io_loop( crate::common::listen_tcp(bind_addr, port).await?, crate::common::listen_tcp(bind_addr, port2).await?, + crate::common::listen_console(bind_addr, port).await?, &key, ) .await; @@ -332,7 +333,12 @@ async fn check_cmd(cmd: &str, limiter: Limiter) -> String { res } -async fn io_loop(listener: TcpListener, listener2: TcpListener, key: &str) { +async fn io_loop( + listener: TcpListener, + listener2: TcpListener, + listener_console: Option, + key: &str, +) { check_params(); let limiter = ::new(TOTAL_BANDWIDTH.load(Ordering::SeqCst) as _); loop { @@ -361,6 +367,18 @@ async fn io_loop(listener: TcpListener, listener2: TcpListener, key: &str) { } } } + res = crate::common::accept_or_pending(listener_console.as_ref()) => { + match res { + Ok((stream, addr)) => { + stream.set_nodelay(true).ok(); + handle_connection(stream, addr, &limiter, key, false).await; + } + Err(err) => { + log::error!("console listener.accept failed: {}", err); + break; + } + } + } } } } diff --git a/src/rendezvous_server.rs b/src/rendezvous_server.rs index b194ae0..eaf7190 100644 --- a/src/rendezvous_server.rs +++ b/src/rendezvous_server.rs @@ -95,6 +95,7 @@ enum LoopFailure { Listener3, Listener2, Listener, + ConsoleListener, } impl RendezvousServer { @@ -157,6 +158,7 @@ impl RendezvousServer { let mut listener = create_tcp_listener(bind_addr, port).await?; let mut listener2 = create_tcp_listener(bind_addr, nat_port).await?; let mut listener3 = create_tcp_listener(bind_addr, ws_port).await?; + let mut listener_console = listen_console(bind_addr, nat_port as _).await?; log::info!("Listening on tcp/udp {}", listener.local_addr()?); log::info!( "Listening on tcp {}, extra port for NAT test", @@ -206,6 +208,7 @@ impl RendezvousServer { &mut listener, &mut listener2, &mut listener3, + &mut listener_console, &mut socket, &key, ) @@ -223,6 +226,10 @@ impl RendezvousServer { drop(listener2); listener2 = create_tcp_listener(bind_addr, nat_port).await?; } + LoopFailure::ConsoleListener => { + drop(listener_console.take()); + listener_console = listen_console(bind_addr, nat_port as _).await?; + } LoopFailure::Listener3 => { drop(listener3); listener3 = create_tcp_listener(bind_addr, ws_port).await?; @@ -243,6 +250,7 @@ impl RendezvousServer { listener: &mut TcpListener, listener2: &mut TcpListener, listener3: &mut TcpListener, + listener_console: &mut Option, socket: &mut FramedSocket, key: &str, ) -> LoopFailure { @@ -294,6 +302,18 @@ impl RendezvousServer { } } } + res = accept_or_pending(listener_console.as_ref()) => { + match res { + Ok((stream, addr)) => { + stream.set_nodelay(true).ok(); + self.handle_listener2(stream, addr).await; + } + Err(err) => { + log::error!("console listener.accept failed: {}", err); + return LoopFailure::ConsoleListener; + } + } + } res = listener3.accept() => { match res { Ok((stream, addr)) => { From 6e7de5b1d648e64e5d7930eea2239f58721420b9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2026 09:43:51 +0800 Subject: [PATCH 42/43] Git submodule: Bump libs/hbb_common from `5438d20` to `69cea8d` (#687) Bumps [libs/hbb_common](https://github.com/rustdesk/hbb_common) from `5438d20` to `69cea8d`. - [Release notes](https://github.com/rustdesk/hbb_common/releases) - [Commits](https://github.com/rustdesk/hbb_common/compare/5438d2022513573094c860e4035b4fb32a8e7787...69cea8dafee147848ae88702029f4bf7df7224c3) --- updated-dependencies: - dependency-name: libs/hbb_common dependency-version: 69cea8dafee147848ae88702029f4bf7df7224c3 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- libs/hbb_common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/hbb_common b/libs/hbb_common index 5438d20..69cea8d 160000 --- a/libs/hbb_common +++ b/libs/hbb_common @@ -1 +1 @@ -Subproject commit 5438d2022513573094c860e4035b4fb32a8e7787 +Subproject commit 69cea8dafee147848ae88702029f4bf7df7224c3 From a7736be5e40f85bfc141120dce587e836e5d4b80 Mon Sep 17 00:00:00 2001 From: RustDesk <71636191+rustdesk@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:56:36 +0800 Subject: [PATCH 43/43] Delete .github/dependabot.yml --- .github/dependabot.yml | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 56258e4..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "gitsubmodule" - directory: "/" - target-branch: "master" - schedule: - interval: "daily" - commit-message: - prefix: "Git submodule" - labels: - - "dependencies"