Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture

Components

BinaryRoleDefault ports
hbbsID / rendezvous server, with the REST API and web console embedded21116 TCP+UDP (rendezvous), 21115 TCP (NAT test), 21118 TCP (WebSocket), 21114 TCP (API, console)
hbbrrelay server21117 TCP, 21119 TCP (WebSocket)
rustdesk-utilskey pair generation and validation, connectivity check (doctor)–

The ports are defined in libs/hbb_common/src/config.rs and src/main.rs; rustdesk-utils doctor checks them.

hbbs stores peers and the API data in a SQLite database (db_v2.sqlite3, or the file given by DB_URL). Its key pair is id_ed25519 / id_ed25519.pub in the working directory; clients are given the public key.

Repository layout

PathContentOrigin
src/hbbs, hbbr, rustdesk-utilsupstream, with our changes in main.rs and rendezvous_server.rs
libs/hbb_commonshared protocol librarygit submodule on rustdesk/hbb_common, unmodified
crates/api-serverREST API, embedded into hbbsours
crates/api-{state,utils,oauth2,s3software}libraries of the API serverours
web/console, web/rapidocVue web console, API documentationours
client/patches, overlay and branding for the clientours, on top of upstream
deploy/helmHelm chart (to be refactored)ours
docs/this manualours

All the crates live in one Cargo workspace; see ADR 0005.

What is ours in upstream files

Kept deliberately small, see Syncing with upstream:

  • src/main.rs: starts the API server, defines API_PORT;
  • src/rendezvous_server.rs: the TCP key exchange and its tests;
  • src/common.rs: the --require-kx-v1 flag.

Transports

hbbs speaks UDP, TCP and WebSocket natively (upstream). On TCP and WebSocket, the connection is encrypted by a key exchange that our server implements and upstream’s server does not.