Directories
¶
| Path | Synopsis |
|---|---|
|
Package api embeds the admin API contract (openapi.yaml) so the server can serve it to signed-in panel users at /api/v1/openapi.{yaml,json}.
|
Package api embeds the admin API contract (openapi.yaml) so the server can serve it to signed-in panel users at /api/v1/openapi.{yaml,json}. |
|
cmd
|
|
|
rdpanel
command
Command rdpanel is the RustDesk API server and admin panel.
|
Command rdpanel is the RustDesk API server and admin panel. |
|
internal
|
|
|
adminapi
Package adminapi implements the panel JSON API mounted at /api/v1/admin: cookie sessions (auth_tokens kind=web) or personal API tokens (Bearer rdp_..., api_tokens.go), CSRF double-submit (X-CSRF-Token) for cookie sessions, TOTP, OIDC panel login and CRUD for users, groups, devices, address books, audit, identity providers, server control and settings.
|
Package adminapi implements the panel JSON API mounted at /api/v1/admin: cookie sessions (auth_tokens kind=web) or personal API tokens (Bearer rdp_..., api_tokens.go), CSRF double-submit (X-CSRF-Token) for cookie sessions, TOTP, OIDC panel login and CRUD for users, groups, devices, address books, audit, identity providers, server control and settings. |
|
agent
Package agent implements `rdpanel agent`: it runs next to (as the parent of) hbbr on a relay host, enrolls with the central panel using a one-time token, keeps an outbound ed25519-authenticated WebSocket session to <panel>/agent/v1/connect, persists the desired hbbr config it receives, applies it through hbbr's loopback admin channel (the hbbr half of the panel's reconciler, unchanged) and reports status.
|
Package agent implements `rdpanel agent`: it runs next to (as the parent of) hbbr on a relay host, enrolls with the central panel using a one-time token, keeps an outbound ed25519-authenticated WebSocket session to <panel>/agent/v1/connect, persists the desired hbbr config it receives, applies it through hbbr's loopback admin channel (the hbbr half of the panel's reconciler, unchanged) and reports status. |
|
app
Package app wires configuration, storage, auth primitives and HTTP handlers into a runnable server, and implements the rdpanel command line.
|
Package app wires configuration, storage, auth primitives and HTTP handlers into a runnable server, and implements the rdpanel command line. |
|
auth
Package auth implements credential primitives: password hashing and verification (argon2id, bcrypt, legacy rustdesk-api md5), client JWTs, opaque session tokens, TOTP, recovery codes and login rate limiting.
|
Package auth implements credential primitives: password hashing and verification (argon2id, bcrypt, legacy rustdesk-api md5), client JWTs, opaque session tokens, TOTP, recovery codes and login rate limiting. |
|
authz
Package authz decides whether a RustDesk connection may start and which control permissions the controlled device applies to it, from the connection rules and control roles (docs/acl-policy.md).
|
Package authz decides whether a RustDesk connection may start and which control permissions the controlled device applies to it, from the connection rules and control roles (docs/acl-policy.md). |
|
buildinfo
Package buildinfo exposes version metadata injected at link time:
|
Package buildinfo exposes version metadata injected at link time: |
|
clientapi
Package clientapi implements the RustDesk client wire API mounted at /api (login, logout, currentUser, address books, accessible users/peers, heartbeat, sysinfo, audit, device provisioning).
|
Package clientapi implements the RustDesk client wire API mounted at /api (login, logout, currentUser, address books, accessible users/peers, heartbeat, sysinfo, audit, device provisioning). |
|
clientdl
Package clientdl offers the official RustDesk clients set up for this server.
|
Package clientdl offers the official RustDesk clients set up for this server. |
|
clientopts
Package clientopts holds the RustDesk client options the panel pushes to every device through the heartbeat "strategy" (config_options), currently the WebRTC ones: ice-servers (STUN/TURN for the WebRTC transport of RustDesk 1.5+) and allow-webrtc-congestion-control.
|
Package clientopts holds the RustDesk client options the panel pushes to every device through the heartbeat "strategy" (config_options), currently the WebRTC ones: ice-servers (STUN/TURN for the WebRTC transport of RustDesk 1.5+) and allow-webrtc-congestion-control. |
|
config
Package config loads and validates rdpanel configuration.
|
Package config loads and validates rdpanel configuration. |
|
crypto
Package crypto provides authenticated encryption for secrets at rest, key file management, random tokens and token hashing.
|
Package crypto provides authenticated encryption for secrets at rest, key file management, random tokens and token hashing. |
|
db
Package db opens the panel database (SQLite by default, or PostgreSQL), applies embedded goose migrations and provides transaction helpers shared by the repositories in internal/store.
|
Package db opens the panel database (SQLite by default, or PostgreSQL), applies embedded goose migrations and provides transaction helpers shared by the repositories in internal/store. |
|
db/dbtest
Package dbtest opens panel databases for tests: a SQLite file in the test's temporary directory by default, or a fresh PostgreSQL database when RDPANEL_TEST_PG_DSN is set, so the same suites run on both engines (CI runs the PostgreSQL pass against a postgres service container).
|
Package dbtest opens panel databases for tests: a SQLite file in the test's temporary directory by default, or a fresh PostgreSQL database when RDPANEL_TEST_PG_DSN is set, so the same suites run on both engines (CI runs the PostgreSQL pass against a postgres service container). |
|
events
Package events is the in-process pub/sub for presence, device, audit and hbbs health events, exposed to the panel as Server-Sent Events at /api/v1/events.
|
Package events is the in-process pub/sub for presence, device, audit and hbbs health events, exposed to the panel as Server-Sent Events at /api/v1/events. |
|
hbbs/control
Package control is a typed client for the hbbs/hbbr loopback admin channels (docs/research/hbbs-integration.md §1).
|
Package control is a typed client for the hbbs/hbbr loopback admin channels (docs/research/hbbs-integration.md §1). |
|
hbbs/hbbstest
Package hbbstest provides test doubles for hbbs/hbbr.
|
Package hbbstest provides test doubles for hbbs/hbbr. |
|
hbbs/presence
Package presence polls hbbs for the online state of every known device.
|
Package presence polls hbbs for the online state of every known device. |
|
hbbs/reconcile
Package reconcile keeps hbbs/hbbr runtime settings in line with the desired state stored in the panel database (server_settings).
|
Package reconcile keeps hbbs/hbbr runtime settings in line with the desired state stored in the panel database (server_settings). |
|
hbbs/relaystats
Package relaystats exports hbbr relay activity as Prometheus gauges.
|
Package relaystats exports hbbr relay activity as Prometheus gauges. |
|
hbbs/wire
Package wire hand-encodes the tiny subset of the hbbs rendezvous protocol the panel needs: the length-prefixed TCP framing used by hbbs/hbbr and the RendezvousMessage envelope carrying OnlineRequest / OnlineResponse / KeyExchange.
|
Package wire hand-encodes the tiny subset of the hbbs rendezvous protocol the panel needs: the length-prefixed TCP framing used by hbbs/hbbr and the RendezvousMessage envelope carrying OnlineRequest / OnlineResponse / KeyExchange. |
|
httpx
Package httpx contains HTTP middleware and helpers shared by every API surface: client IP resolution, request logging, panic recovery, metrics and JSON error responses.
|
Package httpx contains HTTP middleware and helpers shared by every API surface: client IP resolution, request logging, panic recovery, metrics and JSON error responses. |
|
legacy
Package legacy imports a lejianwen/rustdesk-api v2.7 SQLite database (`rustdeskapi.db`) into the RD Panel schema.
|
Package legacy imports a lejianwen/rustdesk-api v2.7 SQLite database (`rustdeskapi.db`) into the RD Panel schema. |
|
loginlog
Package loginlog is a minimal writer for the login_events table used by the panel login and the OIDC flows (stream B1).
|
Package loginlog is a minimal writer for the login_events table used by the panel login and the OIDC flows (stream B1). |
|
logs
Package logs keeps recent log lines of hbbs, hbbr and rdpanel in memory for the panel's Server -> Logs page (GET /api/v1/admin/server/logs*).
|
Package logs keeps recent log lines of hbbs, hbbr and rdpanel in memory for the panel's Server -> Logs page (GET /api/v1/admin/server/logs*). |
|
mail
Package mail sends the panel's transactional e-mails (address verification, sign-in codes, password reset, test message) over SMTP with net/smtp: implicit TLS, STARTTLS or plain, PLAIN/LOGIN authentication, and multipart/alternative (text + minimal HTML) bodies.
|
Package mail sends the panel's transactional e-mails (address verification, sign-in codes, password reset, test message) over SMTP with net/smtp: implicit TLS, STARTTLS or plain, PLAIN/LOGIN authentication, and multipart/alternative (text + minimal HTML) bodies. |
|
mail/mailtest
Package mailtest is an in-process fake SMTP server for tests: it speaks enough ESMTP (EHLO, STARTTLS, AUTH PLAIN/LOGIN, MAIL, RCPT, DATA) for net/smtp and records every accepted message.
|
Package mailtest is an in-process fake SMTP server for tests: it speaks enough ESMTP (EHLO, STARTTLS, AUTH PLAIN/LOGIN, MAIL, RCPT, DATA) for net/smtp and records every accepted message. |
|
mailauth
Package mailauth implements the e-mail based account features on top of internal/mail: the effective SMTP configuration (environment/config file, or the panel settings with an AEAD-sealed password), address verification codes, the e-mail second factor (panel login and the RustDesk client /api/login "email_check" step) and password reset links.
|
Package mailauth implements the e-mail based account features on top of internal/mail: the effective SMTP configuration (environment/config file, or the panel settings with an AEAD-sealed password), address verification codes, the e-mail second factor (panel login and the RustDesk client /api/login "email_check" step) and password reset links. |
|
metrics
Package metrics holds the panel's business counters (logins, client tokens, client audit records) and the build-info gauge.
|
Package metrics holds the panel's business counters (logins, client tokens, client audit records) and the build-info gauge. |
|
oidc
Package oidc implements login with external identity providers (GitHub, Google, generic OpenID Connect with discovery) for both the RustDesk client (/api/oidc/*, polling) and the panel (cookie session), plus linking identities to existing accounts.
|
Package oidc implements login with external identity providers (GitHub, Google, generic OpenID Connect with discovery) for both the RustDesk client (/api/oidc/*, polling) and the panel (cookie session), plus linking identities to existing accounts. |
|
oidc/oidctest
Package oidctest provides fake identity providers (generic OIDC with discovery + signed ID tokens, and GitHub) for tests.
|
Package oidctest provides fake identity providers (generic OIDC with discovery + signed ID tokens, and GitHub) for tests. |
|
relays
Package relays manages hbbr relays for hbbs: the co-located relay, static (unmanaged) relays and remote relay agents (`rdpanel agent`).
|
Package relays manages hbbr relays for hbbs: the co-located relay, static (unmanaged) relays and remote relay agents (`rdpanel agent`). |
|
relays/agentproto
Package agentproto is the wire protocol between `rdpanel agent` (on a relay host, next to hbbr) and the panel's agent hub (/agent/v1/*).
|
Package agentproto is the wire protocol between `rdpanel agent` (on a relay host, next to hbbr) and the panel's agent hub (/agent/v1/*). |
|
store
Package store holds typed repositories over the panel database.
|
Package store holds typed repositories over the panel database. |
|
updatecheck
Package updatecheck looks up the latest RD Panel release on GitHub for the About page.
|
Package updatecheck looks up the latest RD Panel release on GitHub for the About page. |
|
web
Package web serves the embedded single-page app and sets security headers.
|
Package web serves the embedded single-page app and sets security headers. |
|
websessions
Package websessions remembers which panel user a browser (web client) session belongs to.
|
Package websessions remembers which panel user a browser (web client) session belongs to. |
|
scripts
|
|
|
seed-demo
command
Command seed-demo fills a running rdpanel with realistic demo data through its public APIs: users and groups through the admin API, devices, heartbeats, logins, address books and audit records through the RustDesk client API (exactly what real clients send).
|
Command seed-demo fills a running rdpanel with realistic demo data through its public APIs: users and groups through the admin API, devices, heartbeats, logins, address books and audit records through the RustDesk client API (exactly what real clients send). |
|
wsclient
command
Command wsclient reproduces a RustDesk client in WebSocket/TCP rendezvous mode against a real hbbs and prints its online timeline, to check hbbs' TCP_KEEPALIVE option (bropines/rustdesk-server >= 393f872).
|
Command wsclient reproduces a RustDesk client in WebSocket/TCP rendezvous mode against a real hbbs and prints its online timeline, to check hbbs' TCP_KEEPALIVE option (bropines/rustdesk-server >= 393f872). |
|
Package web embeds the built React SPA (web/dist, produced by `npm run build`).
|
Package web embeds the built React SPA (web/dist, produced by `npm run build`). |
Click to show internal directories.
Click to hide internal directories.















