mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-09-11 13:49:03 +00:00
dc6b6c088e
Phases 1-4 of the Go-server centralization plan plus optional-TLS transport. Go server: - db: HelpRequest model + SQLite/PostgreSQL stores (help_requests_*.go), GetDeviceOrgID. - cdap: handleHelpRequest/handleChatMessage handlers, SendChatToDevice delivery. - api: REST help endpoints (help_handlers.go), publish help_request/chat_message events. Node.js panel: - bd-api.routes.js: drop local in-memory Maps, proxy all help/chat/notification endpoints to the Go server (read-proxy) with status/id/timestamp normalization. Agent (native Go + Tauri sidecar): - config.go/agent.go: optional EnforceTLS, ServerCertPin (SPKI pin), TLSInsecureSkipVerify with env overlays and dialOptions() cert pinning via VerifyPeerCertificate. - HTTP (ws://) stays a fully supported transport: TLS enforcement is an explicit operator opt-in (never auto-derived from the URL scheme). The agent logs a warning recommending wss:// for untrusted networks instead of blocking the connection. - config.rs/sidecar.rs: propagate enforce_tls + server_cert_pin from AgentConfig through SidecarConfig to the Go agent config; warn on plaintext ws:// to remote hosts. This commit was made possible thanks to Insolve.