Luc Busquin 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
2023-02-16 15:23:31 +08:00
2026-01-13 10:26:46 +08:00
2023-02-08 16:45:30 +08:00
2026-01-10 16:07:16 +08:00
2023-07-06 00:50:11 +08:00
2022-05-12 20:07:45 +08:00
2023-02-16 15:23:31 +08:00
2026-01-13 10:20:40 +08:00
2026-01-13 10:20:40 +08:00
2025-01-21 01:09:21 +08:00
2022-05-12 22:11:06 +08:00
2026-01-12 14:54:50 +08:00

RustDesk Server Program

build

Download

Manual

FAQ

How to migrate OSS to Pro

Self-host your own RustDesk server, it is free and open source.

How to build manually

cargo build --release

Three executables will be generated in target/release.

  • hbbs - RustDesk ID/Rendezvous server
  • hbbr - RustDesk relay server
  • rustdesk-utils - RustDesk CLI utilities

You can find updated binaries on the Releases page.

If you want extra features, RustDesk Server Pro might suit you better.

If you want to develop your own server, rustdesk-server-demo might be a better and simpler start for you than this repo.

Installation

Please follow this doc

S
Description
Languages
Rust 86.1%
NSIS 4.6%
JavaScript 3.9%
Shell 3.7%
Dockerfile 0.6%
Other 1.1%