mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-07-12 17:53:54 +00:00
master
`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>
RustDesk Server Program
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
Description
Languages
Rust
86.1%
NSIS
4.6%
JavaScript
3.9%
Shell
3.7%
Dockerfile
0.6%
Other
1.1%