Initial implementation: relay server + common protocol + client stub
This commit is contained in:
commit
7285a33cff
17 changed files with 926 additions and 0 deletions
10
crates/client/Cargo.toml
Normal file
10
crates/client/Cargo.toml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[package]
|
||||
name = "helios-client"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# Phase 2 — Windows client (not yet implemented)
|
||||
# See README.md in this crate for the planned implementation.
|
||||
|
||||
[dependencies]
|
||||
helios-common = { path = "../common" }
|
||||
32
crates/client/README.md
Normal file
32
crates/client/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# helios-client (Phase 2 — not yet implemented)
|
||||
|
||||
This crate will contain the Windows remote-control client for `helios-remote`.
|
||||
|
||||
## Planned Features
|
||||
|
||||
- Connects to the relay server via WebSocket (`wss://`)
|
||||
- Sends a `Hello` message on connect with an optional display label
|
||||
- Handles incoming `ServerMessage` commands:
|
||||
- `ScreenshotRequest` → captures the primary display (Windows GDI or `windows-capture`) and responds with base64 PNG
|
||||
- `ExecRequest` → runs a shell command in a persistent `cmd.exe` / PowerShell session and returns stdout/stderr/exit-code
|
||||
- `ClickRequest` → simulates a mouse click via `SendInput` Win32 API
|
||||
- `TypeRequest` → types text via `SendInput` (virtual key events)
|
||||
- Persistent shell session so `cd C:\Users` persists across `exec` calls
|
||||
- Auto-reconnect with exponential backoff
|
||||
- Configurable via environment variables or a `client.toml` config file
|
||||
|
||||
## Planned Tech Stack
|
||||
|
||||
| Crate | Purpose |
|
||||
|---|---|
|
||||
| `tokio` | Async runtime |
|
||||
| `tokio-tungstenite` | WebSocket client |
|
||||
| `serde_json` | Protocol serialization |
|
||||
| `windows` / `winapi` | Screen capture, mouse/keyboard input |
|
||||
| `base64` | PNG encoding for screenshots |
|
||||
|
||||
## Build Target
|
||||
|
||||
```
|
||||
cargo build --target x86_64-pc-windows-gnu
|
||||
```
|
||||
7
crates/client/src/main.rs
Normal file
7
crates/client/src/main.rs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// helios-client — Phase 2 (not yet implemented)
|
||||
// See crates/client/README.md for the planned implementation.
|
||||
|
||||
fn main() {
|
||||
eprintln!("helios-client is not yet implemented. See crates/client/README.md.");
|
||||
std::process::exit(1);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue