mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-11-23 17:42:09 +00:00
1c291db101
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)
Important AI Notes
Notes migrated into the repository (2026-06-03) so agents and contributors have versioned, in-repo context. Original scope: external Copilot memory (/memories/repo/).
Index
| File | Topic |
|---|---|
| betterdesk-api-port-consolidation.md | Go API :21114 (default) + Node :21121 backward-compat proxy — issue #160, installers, client config. Ports table and firewall profiles now live in ../CONNECTION_PORTS.md |
| betterdesk-go-centralization.md | Help-request + chat: agents → Go (CDAP + REST), panel as read-proxy |
| betterdesk-server-deploy-paths.example.md | Production deploy paths template — copy to docs/private/ (gitignored) for operator notes |
| betterdesk-update-flow.md | Panel self-update, Go rebuild after GitHub update (#158) |
| betterdesk-go-toolchain.md | Go build conventions |
| betterdesk-node-toolchain.md | Node/npm local toolchain path |
| betterdesk-enrollment.md | Device enrollment |
| betterdesk-i18n-audit.md | i18n checks |
| agent-client-roadmap-2026-05-27.md | Agent client phases |
| agent-build-windows-sidecar.md | Windows agent build |
| agent-build-worker-fix.md | Agent build worker |
| agent-client-lib-modules.md | Agent lib modules |
| installer-tui-and-protocol-tests.md | Installer TUI / protocol tests |
| installer-tui-modernization.md | Installer TUI UI |
| rdclient-protobuf-enum-encoding.md | rdclient protobuf |
| rdclient-webcodecs-keyframe.md | WebCodecs keyframes |
When changing API ports, RustDesk client login, or console .env, read betterdesk-api-port-consolidation.md first.
Operator-only runbooks (real hostnames, SSH users, deploy commands) live in docs/private/ — that directory is gitignored; start from the *.example.md templates in this folder.