Commit Graph

3 Commits

Author SHA1 Message Date
UNITRONIX 0496b1dbc4 Add client API, sysinfo endpoints and Docker
Add RustDesk-compatible client API and telemetry support and introduce a single-container Docker build. New client_api_handlers.go implements /api/login, /api/login-options, /api/logout, /api/currentUser, /api/ab, /api/heartbeat, /api/sysinfo and /api/sysinfo_ver with TOTP flow and an in-memory TFA session store; auth middleware and Server registration updated accordingly. Database interface and SQLite/Postgres implementations gain UpdatePeerSysinfo (with tests), audit actions for sysinfo, and handleGetPeer now returns live_online/live_status. Also add Dockerfile, docker-compose.single.yml, supervisord entrypoint, UI fixes (QR color inversion, 403 error view), labels file, README updates, and other ancillary changes.

Co-Authored-By: MrBrodacz - Design <215021251+MrBrodacz2025@users.noreply.github.com>
Co-Authored-By: boruto79 <176351662+boruto79@users.noreply.github.com>
Co-Authored-By: marcosacramento <marcosacramento@gmail.com>
Co-Authored-By: Charles Olivier Savignac <1275666+sircharlo@users.noreply.github.com>
2026-03-06 01:08:10 +01:00
UNITRONIX 3f8e731db8 Add LAN relay, peer sync, QR & SSL updates
Multiple improvements across server, scripts and console:

- DB: add totp_recovery_codes column to users (Postgres + SQLite) and migration entries.
- Signal server: implement LAN-aware logic (isSameNetwork), detect LAN IP, add getLANRelayServer, use LAN relay for punchhole/relay flows, and enhance RelayResponse handling (IP-based sender lookup). Matches Rust hbbs behavior for local /24 detection.
- Node.js console: add server config QR generation (rustdesk://config/<b64-json>), fix address-book endpoints to safely return JSON strings, and implement Go↔Node peer sync bridges for both SQLite and Postgres (sync peers from Go 'peers' table into console 'peer' table with fallbacks).
- Scripts: update firewall port lists and add SSL-aware .env handling (switch HBBS/BETTERDESK API URLs to https when enabling TLS, set NODE_EXTRA_CA_CERTS for self-signed certs), and restart both server and console services after changes.

These changes improve LAN connectivity, keep the web console in sync with the Go signal server, and ensure console/server URLs and firewall rules match TLS configuration.

Co-Authored-By: MrBrodacz - Design <215021251+MrBrodacz2025@users.noreply.github.com>
Co-Authored-By: boruto79 <176351662+boruto79@users.noreply.github.com>
2026-03-05 21:43:32 +01:00
UNITRONIX 32e29723e4 Add Node.js web console and update to v2.2.0
Introduce a new Node.js-based web console (Express + EJS + better-sqlite3) under web-nodejs/ and add installer support to choose between Node.js and the legacy Flask console. Update interactive ALL-IN-ONE installers (betterdesk.sh, betterdesk.ps1) with flags/options for --nodejs/--flask, automatic Node.js installation, migration logic, enhanced service handling and diagnostics. Bump VERSION to 2.2.0 and update README and project docs (.github/copilot-instructions.md) to reflect the new console, usage examples, and Docker/docs changes. Many new web-nodejs files and supporting middleware/services/routes/views/static assets were added to support the new console.
2026-02-17 10:59:46 +01:00