Commit b0cb03c
committed
Add remote_desktop host and viewer (headless)
A new utils/remote_desktop module lets one machine stream its screen and
receive input from another. The wire format is a length-prefixed framing
on raw TCP (no extra deps), starting with an HMAC-SHA256
challenge/response handshake; viewers that fail auth are dropped before
they can see a frame.
Host: capture loop encodes JPEG frames at the configured fps/quality and
broadcasts them to authenticated viewers via a shared latest-frame slot
+ Condition, so a slow viewer drops frames instead of blocking the rest.
Viewer input messages are JSON, validated against an allowlist, and
applied through the existing wrapper helpers (lazy-imported so the
viewer side stays platform-agnostic).
Defaults bind to 127.0.0.1 — exposing this to untrusted networks should
be paired with an SSH tunnel or TLS front-end. Tests cover the protocol,
auth, the dispatch allowlist, and a full localhost host<->viewer
round-trip including auth failure and graceful shutdown.1 parent 1fde3cb commit b0cb03c
9 files changed
Lines changed: 1134 additions & 0 deletions
File tree
- je_auto_control/utils/remote_desktop
- test/unit_test/headless
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments