Commit Graph

53 Commits

Author SHA1 Message Date
UNITRONIX 7b88fe3b03 fix(compat): harden RustDesk 1.5 relay and proto parity
Refs #504
Refs #505

Fix force-relay target advertisement for RustDesk 1.5 relay allowlists, sync additive 1.5.x protocol fields, filter locked strategy keys, and add translated deployment guidance plus regression coverage.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-18 00:40:17 +01:00
UNITRONIX 0429c4080d fix(security): close the 2026-11-13 audit findings (C1-C3, H1-H10, M4-M6/M8/M11)
Full report and per-finding status in docs/security/AUDIT_2026-11-13.md.

Critical
- POST /api/bd/register now requires an Ed25519 proof of possession for a
  first registration and for any public_key/uuid rotation, rejects banned and
  soft-deleted ids before writing, and is rate limited per IP. Knowing a device
  id is no longer enough to flood inventory, resurrect a removed device or
  swap its key.
- Signal RegisterPk with old_id is applied only when the supplied key or the
  machine UUID matches the stored peer, so an unauthenticated caller can no
  longer move and delete someone else's row. Stock RustDesk change-ID (no pk,
  matching UUID) still works.
- The Go server runs as betterdesk from /usr/local/bin/betterdesk-server and
  /opt/rustdesk is no longer group-writable at the directory level, so the
  console user cannot replace the binary. DSNs and the bootstrap admin password
  are gone from systemd units.

High
- /metrics and /api/health/detail require the metrics allowlist or an API key;
  public /api/health returns only {status, version}.
- Panel login consults the shared account-lockout tracker (429 + Retry-After);
  delegated 2FA fails closed; pending-2FA state is written after session
  regeneration; GET /logout no longer destroys the session.
- HTTP->HTTPS redirect no longer trusts the Host header or absolute request
  targets.
- Desktop login no longer pre-renders the account list; a rate-limited
  /login/lookup returns at most 8 prefix matches.
- Panel section overrides are clamped to the role ceiling, so a per-user policy
  cannot grant a permission the role lacks.
- /api/devices/:id/* is covered by one scope guard (tags, rename, change-id,
  restore, access-policy).
- applyUpdate verifies an optional Ed25519-signed manifest and can be made
  fail-closed with UPDATE_REQUIRE_SIGNED_MANIFEST=true.
- The privileged broker no longer manages DATABASE_URL, SESSION_SECRET,
  DEFAULT_ADMIN_PASSWORD, UPDATE_GITHUB_TOKEN, API_KEY_PATH,
  ORG_PEER_VAULT_KEY, SMTP_PASS or API_TOKEN_EXPIRY_DAYS, and reports a
  protocol version so a stale broker is detectable.
- Peer status/online/metrics/linked/policy endpoints require device.view and
  enforce organisation scope.

Medium / low
- Backup restore enforces a decompressed-size and entry-count budget.
- limit/offset clamped on the console and in the Go audit handlers; public
  audit writes are rate limited.
- Data embedded in inline <script> blocks goes through safeJsonScript; the
  pairing page escapes the suggested host.
- Go toolchain and builder images bumped to go1.26.11 (GO-2026-6859); the
  console requires at least that version to rebuild the server.
- Workflow Actions pinned to commit SHAs; Dependabot tracks github-actions.
- Restart tokens compared with crypto.timingSafeEqual.

Tooling
- scripts/security/pentest-local.sh / .ps1 local security gate.
- scripts/check-security-regressions.sh CI gate (unit credentials, inline
  script escaping), wired into Secret Scan.
- Two long-standing red tests fixed (platform loopback address, missing
  panelAccessPolicyService mock).

Verified on the test host: /metrics 401, /api/health/detail 401,
/api/peers/online 401, desktop login ships an empty user list, unproven
register returns 403, Host spoofing redirects to the configured public host,
and the broker reports version 2 with a secret-free manifest.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-13 21:25:10 +01:00
UNITRONIX 34825e6fd1 feat(console): add panel access policies with group inheritance
Give users and groups none/read/write section access and client feature toggles, rebuild the users page matrix UI, and harden settings restart completion.
2026-11-09 00:24:03 +01:00
UNITRONIX 1c291db101 docs(ports): one authoritative port cheat sheet, with verification
Port guidance was contradictory, and none of it matched the code.

- `docs/architecture/PORT_SECURITY.md` documented an API on `127.0.0.1:21120` that was never
  shipped (the real port is `21114`).
- `docs/wiki/Installation.md` told operators to expose the panel (`5000`) to WAN, which
  `docs/setup/REVERSE_PROXY.md` explicitly forbids.
- `betterdesk.sh` wrote a `firewall-notes.txt` with `21121` but without `21114`.
- `betterdesk.ps1` opened `5000`, `5443`, `21115`, `21118` and `21119` unconditionally.

New `docs/CONNECTION_PORTS.md` is now the single source of truth: port table with exposure
and failure mode, four ready-to-apply profiles (minimal / reverse-proxy+TLS recommended /
WSS-only / Docker), client-field map, what pairing actually requires, a common-mistakes
table and verification commands.

- `PORT_SECURITY.md` is marked historical and points at the new document; the wiki now
  refers to a profile instead of listing WAN ports.
- `betterdesk.sh` firewall notes include 21114 and separate WAN from localhost.
- `betterdesk.ps1` opens only the documented minimum (21116 TCP+UDP, 21117, Go API).
- `scripts/check-connection-ports.sh|.ps1` compare observed listeners with the chosen
  profile and fail on WAN-exposed panel ports or a mis-bound Client API.
- `scripts/check-port-docs.js` fails CI when the cheat sheet and the port constants in
  `constants.go` / `config.js` disagree, and when `21120` reappears as a live port.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-08 15:04:34 +01:00
UNITRONIX 6b87f53943 feat(console): pairing page, public route allowlist and locale keys
The panel side of short-code pairing.

- New `/pairing` page (`views/pairing.ejs` + `public/js/pairing.js`) next to the existing
  QR activation flow: mint a code with an optional label, see the countdown, copy it, and
  revoke active codes. The plaintext code is shown once, because only its hash is stored.
- `routes/pairing.routes.js` proxies mint/list/revoke to Go behind `requireAuth` and
  `enrollment.approve`; the client redeems directly against Go, so no code is ever handled
  by the panel's public API.
- `wanSecurity.js` allows `/api/pairing/redeem` and `/api/pairing/config` on :21121 as POST
  only. Minting and listing stay off the public client API: a GET could spend somebody
  else's code via a link preview, and listing would expose code metadata.
- `betterdeskApi` gains `createPairingCode`, `listPairingCodes`, `revokePairingCode`.
- 28 new keys plus a `nav.pairing` entry in all 26 locale files. `scripts/check-pairing-i18n.js`
  enforces parity and runs in CI.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-08 15:04:34 +01:00
UNITRONIX f20a6be46f fix(portal,toolchain): explain empty installer list and keep Flutter checksum
Two user-visible gaps from the backlog:

- /api/portal/installers returned an empty array with no explanation when no
  Support Agent release had been imported, so the public page looked broken
  (#439, #475). It now reports no_release_imported, release_cache_incomplete or
  cache_unreadable, and the page renders a specific sentence for each. Covered
  by tests/portalInstallers.test.js. No new public surface is added.

- scripts/install-build-toolchain.sh fetched ${url}.sha256, a path Flutter does
  not publish, so the optional toolchain install always failed at the checksum
  step (#466). The hash is now resolved from Flutter's releases_linux.json and
  a missing hash aborts instead of skipping verification; FLUTTER_ARCHIVE_SHA256
  overrides it. Verified against the live manifest for 3.24.5.

Also adds the drive-root regression for Web Remote parent navigation (#467).

Refs #439, #466, #467, #475

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-11-08 10:37:57 +01:00
UNITRONIX 1259ad1a6f fix(ui): Settings nav flush/scroll, Remote bottom-nav, Material Symbols subset
Restore UX 3.5 Settings tab bleed on phone/tablet so sticky tabs sit flush
under the topbar; keep a thin horizontal scrollbar for overflow tabs.
Fix mobile “Zdalny” linking to /remote (was /remote-dashboard 404) with a
legacy redirect. Regenerate Material Symbols to include label/assignment/
my_location so Devices toolbar icons no longer show as giant ligature text.

Refs #396
Refs #393

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-25 18:07:05 +01:00
UNITRONIX 1b24b99d9b feat(generator): default Support agents to download-only (#466)
Import signed BetterDesk-Client releases instead of compiling on the panel host; mark build toolchain optional; add Główne → Aktywuj agenta pairing entry and Download Hub i18n.

Refs #466

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-21 01:05:28 +02:00
UNITRONIX 235c9c0706 security: implement Phase 0-3 remediation (deps, SQL ident, JWT, CSP, suite)
Bump axios/multer and npm overrides; add safeSqlIdent and multer cleanup;
harden JWT aud/iss/nbf; CSP without unsafe-eval via static protobuf build
and data-bd-call delegation; ship Security Test Suite v1.2.0 and docs.
Ignore generated RdClient protobuf artifacts (~40k lines) — rebuild locally
with npm run protocols:rdclient.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
2026-10-17 15:33:48 +02:00
UNITRONIX d57fe3dc49 feat(generator): add generic agent releases and QR activation
Adds local verification and distribution of signed generic incoming-only agent releases, mobile-friendly QR activation, and the supporting generator interfaces. Includes the current staged console, documentation, localization, and builder changes.\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-11 00:43:26 +02:00
UNITRONIX ecc77b784e feat(generator): add local Linux package formats
Build local Linux clients once and package them as portable archives, Debian packages, RPMs, or Arch packages when the host toolchain supports the format. Keep artifact manifests and validation format-aware.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-05 10:39:57 +02:00
UNITRONIX 6af0c5a65a feat(remote): add gated RDP/VNC dependency updates
Pin the upstream gateway source, verify checksums and licenses in CI, and prepare reviewed dependency update PRs. Keep runtime activation fail-closed while the VNC GPL dependency remains outside the project policy.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-04 00:56:07 +02:00
UNITRONIX abc00b8804 feat(guest): enforce scoped guest access lifecycle
Bind guest WebSocket sessions to a single target peer, enforce grant lifecycle and atomic usage, add the guest issuer scope, and document the password-less security boundary.\n\nRefs #440\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-10-03 10:22:20 +02:00
UNITRONIX a36dc10608 fix(installer): handle piped bash entrypoint
Refs #371

Tests: bash scripts/test-native-installer.sh; bash -n install.sh scripts/test-native-installer.sh; bash install.sh --help

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-26 11:42:11 +02:00
UNITRONIX 1f0143c023 test(docker): make hardening smoke portable
Refs #424

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-26 03:11:06 +02:00
UNITRONIX 602c4e798b fix(docker): preserve secrets on hardened bind mounts
Refs #424

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-26 03:02:17 +02:00
UNITRONIX ebcebdf41a fix(installer): bound native Go build and preserve dirty clones
Refs #371

Add stage-specific watchdogs for module graph validation and Go builds, and make native source branch recovery non-destructive. Add regression coverage for timeout propagation, dirty clones, runtime data preservation, and clone failure recovery.

Tests: Git Bash bash -n; scripts/test-native-installer.sh; installer-focused npm tests (4 suites, 33 tests); IDE lints.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-26 02:27:48 +02:00
UNITRONIX bda11200cd fix(installer): configure local PostgreSQL HBA rules
Add idempotent loopback pg_hba.conf rules before the native PostgreSQL connection test. Cover the installer path with a mocked regression test, CI checks, and operator documentation for Rocky/RHEL systems.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-25 00:12:38 +02:00
UNITRONIX dba33b1515 fix(installer): handle Debian Node.js package conflicts
Refs #430

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-20 17:38:19 +02:00
UNITRONIX 4207a56ea4 ci: restore dev action checks
Remove stale version-bump paths, eliminate Gitleaks false positives, and update vulnerable console dependencies.\n\nThanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-13 21:37:13 +02:00
UNITRONIX 5d4baad6d1 fix: stabilize BetterDesk API and support installer 2026-09-13 12:54:08 +02:00
UNITRONIX 3f277eba9e fix(ui): self-host Material Symbols for console icons
Replace Classic Material Icons with Symbols subsets so ligatures like
monitoring render correctly offline, and drop remaining Google icon CDN links.

Refs #393

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-12 11:27:29 +02:00
UNITRONIX 01aebf597c Replace CDAP Support Agent generator with BetterDesk Support templates
Install Client generator templates from GitHub, inject custom.txt for incoming-only builds, and remove the Go Support Agent pipeline.
2026-09-07 01:29:41 +02:00
UNITRONIX 868aa5b22f docs: slim README, refresh wiki for 3.5.x, add Privacy
Replace the monolithic README with a short landing page, align wiki
with current 3.5.x product facts, add PRIVACY.md, Monitoring and
Unattended/WoL guides, and park historical audits under docs/archive.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-09-06 12:25:34 +02:00
UNITRONIX 26038176eb feat(desktop): add native BetterDesk Desktop core and release path
Introduce the independent Rust + Flutter desktop client with CDAP/RustDesk
session support, packaging via build.py, and tag-triggered Windows/Linux
release artifacts. Align server CDAP desktop interop (view_only, desktop_end,
capabilities), protocol docs, pre-release checklist, version bump rules, and
WAN allowlist for /api/health and /api/server/pubkey.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-20 11:08:29 +02:00
UNITRONIX 34ef01e17d fix(security): harden TLS defaults, device auth, and update privileges
Require stricter client/server TLS options, centralize device auth on agent APIs, constrain Linux privileged update helpers, and harden filebrowser path checks with supporting audit notes.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 23:28:03 +02:00
UNITRONIX 29d03492fb fix(installer): harden cross-platform lifecycle reliability
Harden native, agent and Docker lifecycle paths with tracked update verification, rollback and preflight checks, safe uninstall semantics, and health verification. Add shared protocol tests, installer CI gates, and lifecycle documentation.

Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow)
2026-08-15 21:50:47 +02:00
UNITRONIX c9f7ae5006 fix(agent): hide console windows for PowerShell commands and improve GDI screenshot capture
- Updated PowerShell command invocations to use `-WindowStyle Hidden` to prevent visible console windows during clipboard operations and other commands.
- Implemented GDI-based screenshot capture to eliminate the need for PowerShell, reducing console window spamming during desktop capture.
- Enhanced error handling for missing OpenGL DLLs and ensured complete Mesa DLL set is shipped with the agent to prevent startup issues.
- Updated build scripts to ensure proper installation of required tools and dependencies for Windows builds.
2026-08-09 20:44:12 +02:00
UNITRONIX abe0d52fe4 chore: refresh EOL runtimes and patch non-agent dependencies
Move Docker/CI/installers to Node 24 and Go 1.26 images, bump Alpine server runtime, apply safe npm/Go patch updates, migrate SNMP to pysnmp, and document deferred majors.
2026-08-01 09:19:42 +02:00
UNITRONIX cdf950130a fix(docker): repair fresh install path for GHCR and single layout (#299)
Sync install.sh image pin with VERSION, fix split DB_PATH/SQLITE_READONLY, resolve AIO container for password reset, and write bootstrap files as betterdesk under cap_drop.
2026-07-24 18:07:20 +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 0180f33228 docs: add GitHub wiki source and sync tooling
Maintain user-facing wiki pages in docs/wiki/ with updated BetterDesk URLs,
AGPL licensing, RBAC/org coverage, and eight new operator guides. Add sync
scripts and point docker helper TLS docs to the BetterDesk wiki.
2026-07-12 20:06:09 +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 03e0e99675 feat(dashboard): enhance RustDesk mass-deployment documentation and UI
Updated the documentation for RustDesk mass-deployment, including the correct `--config` deploy string format and the addition of editable client server address fields. Enhanced the dashboard with features like **Copy deploy string** and **Intune script** snippets. Introduced a new environment variable `PANEL_PUBLIC_HOST` for better configuration management. Added UI elements for improved user experience in client configuration.
2026-06-20 23:01: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 9e365c413d chore: update Docker Compose image tags to 3.2.14 and adjust documentation for versioning 2026-06-11 18:45:43 +02:00
UNITRONIX 577fc79a97 chore: update Docker Compose image tags to 3.2.12 and enhance documentation for versioning 2026-06-11 18:36:48 +02:00
UNITRONIX c2e0e2e784 fix(security): harden CodeQL findings across console and Go server
Address GitHub code scanning alerts with OIDC SSRF guards, confined path
helpers, safer client routing, branding sanitization, upload rate limits,
and CodeQL config exclusions for dev-only and protocol-intentional hashes.
2026-06-11 06:57:58 +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 09d20c3444 feat(consent): streamline remote consent handling for terminal and desktop sessions
Refactored the consent handling logic for both terminal and desktop sessions to utilize a unified requestRemoteConsent method. This change simplifies the consent process, ensuring consistent behavior across different session types. Additionally, introduced default session ID handling and improved logging for consent status. Updated related payload structures to include operator names for better tracking.
2026-06-07 12:03:49 +02:00
UNITRONIX 8fe678f980 Implement device self-help request and enhance enrollment token handling
- Added a new API endpoint for enrolled devices to raise help requests via REST when not connected to CDAP.
- Improved the device enrollment process by issuing a device token during status polls, allowing for seamless recovery of CDAP authentication.
- Enhanced error handling for device token validation and ensured proper responses for various failure scenarios.
- Updated the build process to support dual UI binaries for Linux (X11 and Wayland) and included a session-aware launcher.
- Refactored the installation script to accommodate the new Linux UI bundle structure, improving deployment flexibility.
2026-06-04 20:06:12 +02:00
UNITRONIX 733c4f62be Refactor system tray icon handling and enhance OpenGL support
- Updated the system tray icon setup to use a platform-appropriate resource method, improving compatibility across operating systems.
- Introduced a new function to provide a tray icon resource based on the platform, ensuring proper icon display on Windows.
- Enhanced the installation process to include copying the Mesa OpenGL library for better GUI support on Windows, particularly in virtual environments.
- Updated the build worker to stage the OpenGL library alongside the application, improving user experience for GUI operations.
- Refactored command-line options to clarify GUI usage and improve overall application behavior in headless environments.
2026-06-04 15:46:00 +02:00
UNITRONIX 8bd60d1193 Refactor UI status handling and improve Go toolchain installation checks
- Updated the UI to utilize a new status handling method, enhancing the display of connection and enrollment statuses.
- Introduced a status dot indicator for better visual feedback on connection state.
- Refactored the Go toolchain installation script to verify the presence of the JSON package instead of PNG, improving compatibility checks.
- Enhanced error handling in the agent build worker to streamline the build process and ensure proper environment setup.
2026-06-04 04:12:01 +02:00
UNITRONIX 7bac0e774a Implement Go toolchain installation and health checks
- Added a new function to install the Go toolchain if it's missing or broken, ensuring proper setup for support-agent Generator builds.
- Enhanced the agentBuildWorker to check for a healthy Go binary and requeue builds that failed due to a broken Go installation.
- Updated the build environment configuration to prioritize a working Go toolchain, improving the reliability of the build process.
2026-06-04 03:23:23 +02:00
UNITRONIX d07da4951a Implement support agent staging and enhance connection handling
- Added a new function to stage the Go support-agent source for Generator builds, ensuring proper setup without a full git checkout.
- Refactored connection handling to improve TLS configuration, allowing for insecure connections based on environment variables.
- Updated UI elements for better user experience, including resizing and wrapping labels for status messages.
- Enhanced the enrollment process with improved error handling and status updates.
- Introduced new environment variables and command-line options for running the agent without a GUI, catering to environments like VMs or RDP.
- Updated README and build scripts to reflect new features and requirements.
2026-06-04 03:08:17 +02:00
UNITRONIX a31d91753c feat(agent-client): wire runtime branding into SolidJS UI + fix Windows target
App.tsx now loads the per-deployment branding profile (get_branding IPC) during boot and applies it to the document: primary/accent colors map onto the existing --accent CSS variables, product name becomes the document title, and an optional logo data URL becomes the favicon. New src/lib/branding.ts exposes loadBranding()/getBranding() with safe fallbacks to built-in BetterDesk defaults so unbranded developer builds still render.

install-build-toolchain.sh now installs the x86_64-pc-windows-msvc Rust target instead of windows-gnu, because the build worker cross-compiles Windows installers via cargo-xwin (MSVC ABI). The previous gnu target caused every windows/exe build to fail with 'Target x86_64-pc-windows-msvc is not installed'.

This commit was made possible thanks to Insolve.
2026-05-31 01:25:39 +02:00
UNITRONIX 760c0e933d feat(agent-client): alpha bundle generator + cross-platform build pipeline
Generator UI: web-nodejs/views/generator.ejs + public/js/generator.js + public/css/generator.css. Logo upload up to 10 MB, 16 MB body parser, branding form (product name, colors, server URL, etc.), per-branding hash deduplication.

Build pipeline: web-nodejs/services/agentBundleService.js (queue API + branding hash) and agentBuildWorker.js (DB-backed queue, 5s poll, concurrency 1, 30 min timeout). Spawns 'cargo tauri build --bundles <fmt> [--target <triple>] [--runner cargo-xwin]' per platform under systemd User=root. Loads /etc/betterdesk/build.env at module top so BUILD_USER/CARGO_HOME/PATH survive empty service env. Uses absolute CARGO_BIN/NPM_BIN paths to avoid PATH-resolution issues. Artifact path resolution honors profile.target presence (no triple subdir when omitted).

Toolchain installer: scripts/install-build-toolchain.sh (Rust + targets + cargo-tauri + cargo-xwin + mingw + makensis + dpkg-deb + rpmbuild + appimagetool + pnpm + node), writes /etc/betterdesk/build.env, 12-tool verification. Wired into betterdesk.sh menu as option B with post-install rsync of agent source to /opt/BetterDeskConsole/agent-source/.

Agent download page: web-nodejs/views/agent-download.ejs + public/css/agent-download.css for end-user installer downloads per platform/format with live status.

Branding scaffold (Tauri side): betterdesk-agent-client/src-tauri/src/branding.rs (Branding struct + OnceLock cache + BETTERDESK_AGENT_BRANDING env override + BaseDirectory::Resource resolve). resources/branding.json (dev skeleton). lib.rs registers module + get_branding command. commands.rs exposes get_branding IPC. tauri.conf.json declares resources/branding.json. Frontend integration of get_branding is intentionally pending — alpha.

Database: web-nodejs/services/database.js + dbAdapter.js add agent_bundle_builds + agent_bundles tables with full PostgreSQL + SQLite parity.

i18n: en.json + pl.json + zh-TW.json get ~75 new keys covering generator wizard, build status, download page, and toolchain installer messages.

Validated end-to-end on prod (Ubuntu 24.04, 4-core, PostgreSQL): linux/x64/AppImage built successfully (83.7 MB, 283s) for branding hash 25e2f242. linux/deb in progress, rpm + windows/exe queued.

Known follow-ups (NOT in this commit): SolidJS invoke('get_branding') wiring in App.tsx, betterdesk.ps1 toolchain menu mirror, reset-password.js PostgreSQL support, Docker decision.

This commit was made possible thanks to Insolve.
2026-05-29 07:15:45 +02:00
UNITRONIX 8d952e4ba1 Add password auth helpers; remove legacy dev scripts
Add a new auth package implementing password hashing/verification (PBKDF2-HMAC-SHA256), a random-string generator, and unit tests. Update .gitignore to catch additional sensitive filenames and to ignore legacy dev scripts, migrations, templates and build artifacts. Remove many legacy/dev helper scripts (dev_modules/, scripts/legacy/, build_windows.sh, migrations/, templates/) and add web-nodejs reset-password scripts and a session secret placeholder. Changes consolidate authentication utilities and clean up old/unused development tooling and noise in the repo.
2026-03-02 07:59:24 +01:00
UNITRONIX e855f5786d Add Go server and security audit; update web console
Add a new betterdesk-server Go codebase (server, api, auth, db, relay, signal, metrics, audit, ratelimit, proto, tools, tests) and related deployment/migration scripts. Add a comprehensive SECURITY_AUDIT_2026-03-01 report and .gitattributes; update copilot-instructions (ALL-IN-ONE v2.4.0), README, VERSION, Dockerfiles, scripts, docker-compose and entrypoint. Large updates to web-nodejs (translations, routes, services, frontend assets and middleware) and numerous new utilities; remove legacy Flask web files and archive hbbs-patch-v2 artifacts. Prepares repository for PostgreSQL support, DB migration tooling and the new Go server as the production backend.
2026-03-02 00:43:04 +01:00