39 Commits

Author SHA1 Message Date
UNITRONIX a73a3a40b3 fix(betterdesk.sh): start Console after GitHub update (Refs #306)
Prevent set -e abort on sqlite3 API-key sync so betterdesk-console is always started after Online GitHub update; fail the update loudly when Console stays inactive. Hotfix PRs on main use patch bumps (3.4.x).
2026-07-25 08:09:05 +02:00
UNITRONIX fd12dd1d5e fix(ci): bump Go toolchain 1.26.5 and stop CodeQL push conflict 2026-07-21 12:52:12 +02:00
UNITRONIX 9b102c6e58 fix(ci): unblock Go vet, Secret Scan, npm audit, and race flake 2026-07-21 12:08:33 +02:00
UNITRONIX feb3d19987 chore: update .gitignore and Gitleaks configuration, enhance CI workflows
- Updated .gitignore to include new binary paths and retain .gitkeep.
- Modified Gitleaks configuration to ignore additional directories.
- Adjusted CI workflows to prevent execution on version bump pushes and improved version bump handling in scripts.
- Bumped BetterDesk Console Manager version to 3.3.136 in betterdesk.sh and related scripts.
2026-07-13 17:34:41 +02:00
UNITRONIX 648a8d4f8a security(3.4): harden console and Go server for pre-release audit
Commit web-nodejs lockfile with tar override; CI uses npm ci and moderate npm audit.
Add LOG_LEVEL filtering and log redaction in Node console and Go server.
Validate WS tokens on bd-signal; require single-use token for remote-agent relay.
Limit active relay sessions per IP and block open enrollment without TLS.
2026-07-12 20:44:46 +02:00
UNITRONIX c2aedb10fe Enhance security and input validation across CDAP and organization routes
- Implemented input validation for `orgId` and `deviceId` in CDAP and organization detail routes using `assertSafeApiId`, returning a 400 error for invalid inputs.
- Added HTML escaping for `deviceId` and `orgId` in views to prevent XSS vulnerabilities.
- Hardened `patch-role-scope-i18n.js` against prototype pollution with a guard for unsafe nested keys.
- Updated CodeQL configuration to include new exclusions and ensure documented exclusions are applied.
2026-07-09 21:16:55 +02:00
UNITRONIX 3411994d60 feat(docker): introduce official single container layout and update installation scripts
- Added support for an official all-in-one Docker image (`ghcr.io/unitronix/betterdesk`) as the default installation method.
- Updated installation scripts and documentation to reflect the new single container layout.
- Retained legacy two-container layout option for backward compatibility.
- Adjusted API port from `21114` to `21121` for the new layout.
- Enhanced Docker-related scripts and configuration files to support the new structure.
- Updated various language files to ensure consistency in messaging regarding Docker deployment.
2026-07-06 19:31:22 +02:00
UNITRONIX 1118fc2ba6 Anonymize operator infrastructure fingerprints from public repo.
Remove internal LAN IP, SSH user, and developer paths from docs and examples; move deploy runbook to gitignored docs/private with a public template; drop Cursor debug logging leftovers; add CI checks to prevent regression.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 19:07:42 +02:00
UNITRONIX d6b94f986b chore: update CI workflow to use package.json for caching and switch to npm install 2026-06-27 20:21:48 +02:00
UNITRONIX 611863753f feat(mesh): introduce MeshCentral compatibility layer with REST API and UI enhancements
Added a compatibility layer for MeshCentral, including a native Go implementation of key endpoints and a unified inventory for mesh agents. Enhanced the UI with new actions for mesh agents, such as terminal access and file management. Updated localization for mesh features and introduced new styles for mesh terminal overlays. Integrated interop testing for simulated and live MeshAgent connections.
2026-06-21 22:02:04 +02:00
UNITRONIX 253a126888 chore: remove outdated build workflow and update CI configurations
Deleted the obsolete build workflow for BetterDesk and made adjustments to the CI configurations across multiple workflows. This includes changing permissions from write to read in the release-client and secret-scan workflows, updating the Node.js setup in the web-nodejs CI, and enhancing the rate limiting for RdClient pages. Additionally, improved the handling of return URLs in the auth middleware and added new utility functions for better security and logging.
2026-06-20 18:08:54 +02:00
UNITRONIX 52248b81bb Improve Go server stability without changing RustDesk wire protocol.
Batch peer status writes, skip heartbeat rate limits for known peers, CDAP session cleanup on disconnect, relay WS conn limits, Postgres query timeouts, org login throttling, and CI with go test -race.
2026-06-14 11:38:36 +02:00
UNITRONIX fe2d970574 chore: release version 3.3.0 [version-bump]
Complete stable release after PR #196 merge. Delete stale release branch
before push in version-bump-main workflow to avoid non-fast-forward failures.
2026-06-12 06:32:55 +02:00
UNITRONIX 5403a04783 chore: update Go server version handling and enhance Docker build process 2026-06-11 20:31:21 +02:00
UNITRONIX 556f0a2a3f fix(ci): grant pull-requests write for stable version bump workflow
Fixes automated release PR creation after merge to main (was failing with
Resource not accessible by integration).
2026-06-10 03:03:22 +02:00
UNITRONIX 6d7692ea6a fix(security): phase-A log redaction, font/transfer paths, CI permissions
Stop logging generated admin passwords, redact API login usernames,
confine font and file-transfer temp paths with safePath, and scope
GitHub Actions permissions in build.yml.
2026-06-09 02:42:56 +02:00
UNITRONIX cf6f70f6cd fix(ci): correct find precedence in server release checksum step
The migrate artifact directory was matched without -type f, causing
sha256sum to fail on tag pushes (e.g. v3.1.3-dev).
2026-06-09 02:08:40 +02:00
UNITRONIX c219f3be68 fix(security): patch CVE-2026-50575 and harden deps, SSRF, shell exec
Complete GHSA-3v82-3gf8-fxx8 WebSocket replay fix for soft-deleted peers,
bump vulnerable Go/Rust dependencies, and apply CodeQL-driven hardening
(OIDC URL validation, path confinement, execFileSync, rate limits).
2026-06-09 02:05:17 +02:00
UNITRONIX 8ae17f38ec fix(ci): restore direct dev version bump after relaxing branch protection
GitHub Actions cannot create PRs in this repo; dev no longer requires
pre-push status checks so the bump bot can push [version-bump] commits.
2026-06-07 17:01:03 +02:00
UNITRONIX ef62317927 fix(ci): dev version bump via PR to satisfy branch protection
Direct pushes to protected dev were rejected (GH006). Create bump/vX.Y.Z
PR and admin-merge; skip re-run on bot merge commits to avoid loops.
2026-06-07 16:59:41 +02:00
UNITRONIX 3076c009c6 fix(ci): release bump via PR to satisfy protected main branch
Direct pushes from version-bump-main were rejected by branch protection;
create release/vX.Y.Z PR and admin-merge instead.
2026-06-07 16:57:30 +02:00
UNITRONIX 317365c766 Add dev/main branching, automated versioning, and update channel switcher.
Introduce bump-version.js with CI workflows for patch bumps on dev and
stable releases on main, plus panel and installer UI to choose stable vs
development GitHub update branches.
2026-06-07 16:48:31 +02:00
UNITRONIX 73d614b338 fix(console): migrate legacy auth.db token_hash on SQLite upgrade (#158)
Existing Docker volumes crashed at startup because ensureAuthTables indexed
token_hash before the column existed on upgraded auth.db files. Bump images to 3.0.0.
2026-06-07 00:26:48 +02:00
UNITRONIX 9c6490f6ab fix(ci,update): unblock Web Console CI and non-root in-app updates.
Use npm install without a lockfile in CI, treat root-owned installer scripts as non-critical update failures, and skip privileged H-7 hooks when betterdesk already exists without sudo.
2026-06-06 14:46:41 +02:00
UNITRONIX 647a3221f9 Harden console security and wire fixes into the update flow.
Hash RustDesk access tokens at rest (phase 1), add SSRF guards for admin network tools with LAN monitoring support, run dedicated console service user on Linux, and hook post-update verification plus service patching into both betterdesk.sh and the in-app updater.
2026-06-06 14:40:51 +02:00
UNITRONIX e067a5a865 fix(update): disable in-app updates for Docker GHCR deployments (#158)
The panel updater assumed a native install with Go source on disk. In
Compose/GHCR mode it now uses the embedded image commit, clears stale
binary markers, and directs operators to pull new container images instead.
2026-06-06 14:09:57 +02:00
UNITRONIX fc8ac44baf Enhance support agent staging and rebuild process
- Implemented a conditional staging process for the Go support-agent source during updates, creating a rebuild flag for generator bundles.
- Added functions to handle the requeuing of builds and marking rebuilds as pending, improving the update workflow.
- Updated the update service to stage support-agent files and trigger rebuilds after in-app updates.
- Removed the obsolete GitHub Actions workflow for the support agent, streamlining CI/CD processes.
2026-06-04 03:13:43 +02:00
UNITRONIX 3484ef68be Enhance support agent with audio handling and consent management
- Added audio stream handling to the agent, including support for audio start and stop messages.
- Introduced lifecycle callbacks for consent and session management in the agent configuration.
- Updated desktop handling to utilize new consent handler and session start/end callbacks.
- Improved UI to reflect enrollment status and consent requests, enhancing user experience.
- Refactored branding structure to include additional color properties for better theming.
2026-06-04 02:09:19 +02:00
UNITRONIX 196a6addfd ci: stop desktop client builds on version tags
Desktop client is still in development. Version tags (v*) now only
trigger Docker image publish (server, console, all-in-one). Desktop
builds remain available via manual workflow_dispatch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 00:55:05 +02:00
UNITRONIX 3ee1cd8062 feat(docker): publish versioned GHCR tags aligned with CHANGELOG
Wire docker-publish to git tags v*, workflow_dispatch tag input, and
semver prereleases; pin quick-start compose to 3.0.0-alpha by default.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-03 00:46:15 +02:00
UNITRONIX a3202515d6 Fix Node.js 20 deprecation and Docker secrets lint warnings
GitHub Actions:
- actions/checkout: v4 -> v6 (Node.js 24 native)
- docker/login-action: v3 -> v4 (Node.js 24 native)
- docker/metadata-action: v5 -> v6 (Node.js 24 native)

Docker lint:
- Add check=skip=SecretsUsedInArgOrEnv to Dockerfile + Dockerfile.console
  (PUB_KEY_PATH and API_KEY_PATH are file paths, not secrets)
2026-04-06 17:19:30 +02:00
UNITRONIX 23567a7042 Update GitHub Actions to Node.js 24 compatibility
- docker/setup-buildx-action: v3 -> v4
- docker/build-push-action: v5 -> v6
- Add FORCE_JAVASCRIPT_ACTIONS_TO_NODE24=true env var
  (Node.js 20 deprecated June 2, 2026)
2026-04-06 17:09:56 +02:00
UNITRONIX 66c46f7d93 Fix SBOM/Trivy GHCR auth for private packages 2026-04-05 14:28:28 +02:00
UNITRONIX dd0889e3d6 Add SessionManager; update docs, i18n & CI
Introduce a SessionManager for relay-based remote sessions in the Tauri MGMT client: new SessionCommand API, start/stop/session input routing, clipboard/recording/quality controls, and notification read/dismiss state. Wire AppState with new mutexes and show main window on startup. CI: add SBOM generation (anchore) and Trivy vulnerability scan steps. Misc: change console Docker DB path, large README/CHANGELOG updates (chat E2E, unattended access/WOL, i18n expansion, CDAP/SDK docs), and many web-nodejs assets/locales/routes/views/services and server-side changes.
2026-04-05 13:42:07 +02:00
UNITRONIX bbf839754e Harden bd-mgmt, API key, and WS security
Add multiple security hardenings across the server and web console: enforce proof-of-possession for /ws/bd-mgmt using Ed25519-signed headers with timestamp/nonce and replay protection (public key binding, canonicalization, storage, verification, and tests); remove legacy API key query param and config-table fallback in favor of scoped api_keys (migrate bootstrap key into api_keys); tighten WebSocket origin handling for relay and signal servers to allow only localhost origins by default unless an explicit allowlist is set; update auth middleware public paths and test helpers to use X-API-Key header; add ensureScopedAPIKey migration and related helpers; add a GitHub Secret Scan workflow and an audit report. Misc: propagate audit logging on bd-mgmt connect/disconnect and validate enrollment public keys during device register.
2026-03-29 01:48:14 +01:00
UNITRONIX 95f2beb744 feat: organizations, desktop mode, i18n (ja/ko/ru), security docs, client i18n integration 2026-03-25 20:27:04 +01:00
UNITRONIX 98209249f3 Fix ForceRelay UUID mismatch; add GHCR notes
Change ForceRelay TCP path to return a PunchHoleResponse with NatType=SYMMETRIC instead of sending a server-generated RelayResponse, so clients will send RequestRelay with their own UUIDs and both sides use the same UUID (resolves relay pairing mismatch, Issue #66). Add diagnostic log.Printf calls in handleRequestRelay (UDP) and handleRequestRelayTCP to aid relay pairing debugging. Update docs and CI: add GHCR "pull access denied" troubleshooting and package visibility guidance to DOCKER_QUICKSTART.md, docker-compose.quick.yml, and the docker-publish workflow summary (addresses Issue #67). Also update changelog entry in .github/copilot-instructions.md and add related files to .gitignore.
2026-03-19 22:41:24 +01:00
UNITRONIX 2d6b730f99 Add Docker quickstart and GHCR publish workflow
Add Docker quickstart flow and CI to publish images to GitHub Container Registry. Creates a new GitHub Actions workflow (.github/workflows/docker-publish.yml) that builds multi-arch images (server, console, all-in-one) and pushes to ghcr.io. Adds docker-compose.quick.yml using pre-built GHCR images and a DOCKER_QUICKSTART.md with a 30s one‑line quick start, troubleshooting, and configuration notes. Update README Docker section to surface the quick start and adjust docker-compose.yml header to reference the quick file. Also update .github/copilot-instructions.md to document the Docker quick start and publishing phase.
2026-03-19 06:47:18 +01:00
UNITRONIX b14a8cf162 Add CI, build scripts, docs, and dev utilities
Add a full automated build pipeline, interactive build scripts, documentation and development utilities.

- Add GitHub Actions workflow (.github/workflows/build.yml) to build BetterDesk (hbbs/hbbr) for Linux x64, Linux ARM64 and Windows x64, upload artifacts, optionally create a release and update repository binaries.
- Add interactive build scripts for Windows and Unix (build-betterdesk.ps1, build-betterdesk.sh) supporting download, patch application, cross-build and checksum generation.
- Add build and status docs (docs/BUILD_GUIDE.md, docs/STATUS_TRACKING_v3.md) and update project README/instructions (.github/copilot-instructions.md) with new items and updated timestamp.
- Add development utilities under dev_modules/ (multiple database/patch/test helpers) and move test_generator.py into dev_modules/test_generator.py.
- Update .gitignore to exclude archive/ folder.
- Modify hbbs-patch-v2 sources (database.rs, http_api.rs, main.rs, peer.rs and add rendezvous_server.rs) and remove legacy fixed files; update web UI backend and static files (web/app.py, web/static/*, web/templates/index.html).

These changes set up CI/CD for multi-platform builds, provide local build tooling, expand docs for v3 status tracking and ID-change features, and add developer test/patch utilities.
2026-02-06 23:34:35 +01:00