Commit Graph
461 Commits
Author SHA1 Message Date
rustdeskandClaude Opus 5.5 0b86c30004 Merge master into message-size-limits
The WebSocket handshakes keep this branch's config and take the 30 s
deadline from #722. The test streams from #721 and #723 implement
set_max_packet_length. This branch's relay tests become
message_size_tests, so they no longer clash with the module #723 added.
The paired-legs test parks its websocket leg first only to fix which leg
pairs, since #721 made concurrent arrivals pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq
2026-11-07 13:12:25 +08:00
RustDeskandClaude Opus 5.5 98ffcee829 Bound console reply writes with a deadline (#746)
Since #717 the console sends its reply with write_all, which waits until
every byte is sent. A local client that sends a command and then stops
reading would hold the task and its socket forever. Give the write the
same 1 s deadline as the read above it, and log a reply that fails or
runs late instead of dropping the error.


Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 13:07:52 +08:00
jahvari 36a0996ee8 fix: write complete administrative console responses (#717)
* fix: write complete administrative console responses

* Document changed function contracts
2026-11-07 12:52:17 +08:00
1bd3938cfe Bound stalled relay writes in both directions (#723)
* Bound stalled relay writes in both directions

* Document changed function contracts

* Clarify relay authentication documentation

---------

Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 12:47:28 +08:00
jahvariandRustDesk e5c0a4261d Preserve connection ports when applying forwarded WebSocket IPs (#725)
* Preserve connection ports when applying forwarded WebSocket IPs

* Document changed function contracts

* Update relay_server.rs

* Update IP address handling in rendezvous server

---------

Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
2026-11-07 12:44:26 +08:00
jahvari 474fbc7de4 Bound WebSocket upgrade handshake duration (#722)
* Bound WebSocket upgrade handshake duration

* Document changed function contracts
2026-11-07 12:43:08 +08:00
jahvari 134008e0e9 Fix relay waiter expiration after pair ID reuse (#721)
* Fix relay waiter expiration after pair ID reuse

* Keep waiter regressions separate from other relay tests

* Document changed function contracts

* Clarify relay authentication documentation
2026-11-07 12:07:52 +08:00
rustdeskandClaude Opus 5.5 495a271f44 Bound message sizes on hbbs and hbbr
hbbs drops a connection whose frame header announces more than
MAX_MESSAGE_KB (default 64, capped at 65536) on 21115, 21116 and the
websocket 21118, and gives each websocket 8 KiB buffers instead of
tungstenite's 128 KiB default.

hbbr bounds the relay request to 128 KiB until the two legs pair, then
lifts the bound on framed legs and restores tungstenite's defaults on
websocket legs. That needs set_config on an accepted stream, so
tokio-tungstenite and tungstenite now come from the rustdesk-org forks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkh9Gd5dwGW8vL9JNV8
2026-11-05 15:29:31 +08:00
rustdeskandClaude Opus 5.5 08cd4428a7 Cover more relay UUID spellings in the validation test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkh9Gd5dwGW8vL9JNV8
2026-11-04 17:28:17 +08:00
rustdeskandClaude Opus 5.5 44de977af3 Validate relay UUIDs before forwarding
The peer sends the relay uuid to whatever relay_server names, so a uuid
carrying line breaks reaches that service verbatim. RequestRelay and
RelayResponse with a uuid that is empty, longer than 128 bytes, or outside
[A-Za-z0-9_-] now close the connection. The empty ack a peer sends for a
RequestRelay is still allowed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JAxkkh9Gd5dwGW8vL9JNV8
2026-11-04 17:28:10 +08:00
rustdesk 2215e70145 remove CLAUDE.md 2026-11-03 11:21:25 +08:00
fufesou 873230e35a fix: key file perm (#705)
* fix: key file perm

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: enforce secure private key permissions on Unix

Create new keys with mode 0600 and verify permissions before writing.
Tighten existing keys to 0600 and propagate permission failures.
Preserve dangling symlinks and clean up failed key creation.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: preserve read-only keys and prevent public key clobbering

Accept existing 0400 keys without changing their permissions.
Write the public key only after private key creation and writing succeed.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: generate missing public keys and reject mismatched key pairs

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: publish public keys atomically without overwriting existing files

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: key file perms, comments

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: reject key conflicts and clean up failed private key writes

Reuse symlink resolution and simplify key loading and regression tests.

Signed-off-by: fufesou <linlong1266@gmail.com>

* fix: key file perm, simple refactor

Signed-off-by: fufesou <linlong1266@gmail.com>

---------

Signed-off-by: fufesou <linlong1266@gmail.com>
2026-10-10 17:34:18 +08:00
RustDeskandClaude Opus 5.5 5e37f45dfe Fix/punch reqs bound (#713)
* fix(hbbs): bound the punch-request record store

PUNCH_REQS grew without limit; its dedupe scan only covers the newest 30
entries, so cycling 31 online peer ids from one source appended a record
per request for the lifetime of the process. Keep at most 10,000 entries,
evicting the oldest.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

* feat(hbbs): make the punch-request record cap configurable

MAX_PUNCH_REQUESTS sets how many records the punch-requests console
command keeps (default 10000); 0 disables recording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

* fix(hbbs): cap peer id length at 253 bytes

RegisterPk accepted ids up to a whole UDP datagram, so 31 registered
peers with ~64 KB ids still let the bounded punch-request store reach
hundreds of MB. Reject longer ids in RegisterPk and RegisterPeer, the
same bound the Pro server uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

* feat(hbbs): keep 100000 punch-request records by default

With peer ids capped at 253 bytes a full store is roughly 45 MB at
worst, so a larger default keeps more console history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

* test(hbbs): assert which punch-request records survive eviction

The length check alone passed if the newest record were evicted or new
records were dropped once full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

* test(hbbs): cover MAX_PUNCH_REQUESTS=0 in the punch-request test

At zero capacity the loop never ran and the new front/back asserts
unwrapped an empty queue. Make at least one request so the disabled
path is exercised, and only check eviction order when records are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PkpVy2ufxgEjKd3SjXPnJ8

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-10 16:51:29 +08:00
RustDesk a7736be5e4 Delete .github/dependabot.yml 2026-08-07 16:56:36 +08:00
dependabot[bot] 6e7de5b1d6 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-27 09:43:51 +08:00
rustdesk af7d7f0b02 fix bin 2026-07-25 11:42:45 +08:00
rustdesk 538aef71d1 bind interface and refactor doc 2026-07-24 10:56:56 +08:00
rustdesk 5530085fda fix review 2026-07-24 09:11:03 +08:00
rustdesk 09b9539ebe configure doc 2026-07-24 08:50:50 +08:00
rustdesk 30fba48547 bump version 2026-07-23 20:13:48 +08:00
JulienandJulien Arnaud 0d915e6fc5 Update protobuf to 3.7.2 (#684)
* Update protobuf to 3.7.2

Signed-off-by: Julien Arnaud <julien.arnaud@sib-retail.com>

* Harden protobuf recursion regression

Signed-off-by: Julien Arnaud <julien.arnaud@sib-retail.com>

---------

Signed-off-by: Julien Arnaud <julien.arnaud@sib-retail.com>
Co-authored-by: Julien Arnaud <julien.arnaud@sib-retail.com>
2026-07-23 18:46:09 +08:00
rustdesk 109d9a2351 fix more UDP reflection/amplification 2026-07-23 18:43:32 +08:00
rustdesk 70dcfdeb95 https://github.com/rustdesk/rustdesk-server/issues/634 2026-07-21 07:12:57 +08:00
dependabot[bot] ea72cf2b72 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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-21 06:14:29 +08:00
RustDesk 60645b0f70 Update build.yaml 2026-07-21 06:05:22 +08:00
rustdesk 73523b31cf bump version 1.1.16 2026-07-21 05:26:35 +08:00
Luc BusquinandClaude Opus 4.8 91fb928c6e 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) <noreply@anthropic.com>
2026-07-07 10:14:03 +08:00
rustdesk 80d3a50566 https://github.com/rustdesk/rustdesk-server/issues/670 2026-07-01 12:17:57 +08:00
WC3Dandaikido-autofix[bot] 815c728837 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>
2026-02-17 14:28:35 +08:00
RustDesk bd7bc52c43 Update build.yaml 2026-01-13 10:26:46 +08:00
rustdesk 34cbd57e71 bump version 2026-01-13 10:20:40 +08:00
rustdesk 46e9ecd47d fix pr 2026-01-12 17:28:25 +08:00
rustdesk d0770e6c06 high rustc 2026-01-12 15:08:01 +08:00
rustdesk f87372ead0 GHCR manifest 2026-01-12 14:59:45 +08:00
RustDesk 04efb7033c Update README.md 2026-01-12 14:54:50 +08:00
RustDesk 9bae9f2f39 Update build.yaml 1.1.15 2026-01-12 13:28:04 +08:00
rustdesk 7c2057c360 remove annoying fmt check 2026-01-10 16:33:46 +08:00
rustdesk f61b31f04e 1.1.15 debain log 2026-01-10 16:07:16 +08:00
rustdesk bb455a3eb7 merge ghcr to build.yml 2026-01-10 15:51:06 +08:00
RustDesk 631618a6be Update build.yaml 2026-01-10 14:47:34 +08:00
rustdesk 34946219c3 update workflow 2026-01-09 19:12:49 +08:00
rustdesk 5d1b4ba78a connection log query 2026-01-06 23:59:47 +08:00
Nawer 7e921be539 chore: Added kubernetes example file (#623) 2026-01-06 17:58:33 +08:00
lrin 716041bac1 libs: Fix hbb_common Submodule (#553)
The hbb_common Submodule was accidentally deleted in https://github.com/rustdesk/rustdesk-server/commit/c650217919ce6b67bf62a3d0c092e41f0d37b18b
2025-11-22 15:24:50 +08:00
Guiorgy 6b72cefbc5 define the HOME env to allow running rootless (#612) 2025-11-22 15:20:15 +08:00
Geert Stappers 386c83874c 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 <info@rustdesk.com>  Wed, 11 Jan 2023 11:27:00 +0800

rustdesk-server (1.1.6) UNRELEASED; urgency=medium

  * Initial release

 -- open-trade <info@rustdesk.com>  Fri, 15 Jul 2022 12:27:27 +0200

* debian/changelog: reformat a date stamp

The "wrong format" was discovered by Lintian.
2025-11-03 13:57:06 +08:00
Geert Stappers 5cc309dc9f new file: debian/README.source (#592)
Describes how to build
2025-11-03 13:56:00 +08:00
rustdesk 4e8d6d08e2 fix https://github.com/rustdesk/rustdesk-server/issues/435 2025-11-03 13:03:19 +08:00
乐 c8a5d41906 chore: Update to Windows 2022 runner image (#568) 2025-07-13 07:33:30 +08:00
rustdesk 2c57e51ec5 higher default bandwidth 2025-06-22 15:03:13 +09:00