- Rust 89.5%
- NSIS 3.5%
- JavaScript 2.9%
- Shell 2.8%
- Dockerfile 0.4%
- Other 0.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
* Match IPv4 clients against the relay lists in their IPv4 form hbbr listens dual-stack by default, so a direct IPv4 client reaches relay() as ::ffff:a.b.c.d. relay() checked BLACKLIST and BLOCKLIST with that form, while the lists hold the plain IPv4 that `ba` and `Ba` are given. A blacklisted IPv4 client was therefore never throttled, and adding it to the blocklist did not end its session. handle_connection already normalizes with try_into_v4 for its accept-time check; relay() now does the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq * Keep IPv4-mapped list entries matching in relay() The previous commit looked the lists up in the plain IPv4 form only, so an entry in the ::ffff:a.b.c.d form stopped matching. That is the form `usage` and the pairing logs print, so an admin copying an address from them, or an existing list file holding one, lost the throttle and the mid-session blocklist check. relay() now matches either form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq * Match either form of an IPv4-mapped client at accept too handle_connection checked the blocklist in plain IPv4 form only, so an entry in the ::ffff: form, the one usage prints, let the client connect. If that client was the leg parked first, relay() never checks it and the whole session ran. It now matches either form, as relay() does. The relay() test gains a client that is not listed, which must outlive the first list check, and a new test covers the accept check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq * Require a timeout in the list tests' unlisted cases An unlisted client passed if relay() or the connection ended with an error, not only if it stayed up until the timeout. Each case now names the one outcome it expects. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JAxkkiaGp2k8okvs4MpCUq --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
| .cargo | ||
| .github | ||
| .vscode | ||
| debian | ||
| docker | ||
| docker-classic | ||
| docs | ||
| kubernetes | ||
| libs | ||
| rcd | ||
| src | ||
| systemd | ||
| tests | ||
| ui | ||
| .env | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| db_v2.sqlite3 | ||
| docker-compose.yml | ||
| LICENSE | ||
| README.md | ||
RustDesk Server Program
Configuration & environment variables
Self-host your own RustDesk server, it is free and open source.
Important
Need more features? RustDesk Server Pro might suit you better.
Want to develop your own server? Start with rustdesk-server-demo, a simpler starting point than this repository.
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.
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 | 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 | 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) |
See 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.
Installation
Please follow this doc