# GuruConnect Remote desktop solution similar to ScreenConnect, integrated with GuruRMM. ## Project Overview GuruConnect provides remote screen control and backstage tools for Windows systems. It's designed to be fast, secure, and enterprise-ready. ## Architecture ``` ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ Dashboard │◄───────►│ GuruConnect │◄───────►│ GuruConnect │ │ (React) │ WSS │ Server (Rust) │ WSS │ Agent (Rust) │ └─────────────────┘ └─────────────────┘ └─────────────────┘ ``` ## Directory Structure - `agent/` - Windows remote desktop agent (Rust) - `server/` - Relay server (Rust + Axum) - `dashboard/` - Web viewer (React, to be integrated with GuruRMM) - `proto/` - Protobuf protocol definitions ## Building ### Prerequisites - Rust 1.75+ (install via rustup) - Windows SDK (for agent) - protoc (Protocol Buffers compiler) ### Build Commands ```bash # Build all (from workspace root) cargo build --release # Build agent only cargo build -p guruconnect-agent --release # Build server only cargo build -p guruconnect-server --release ``` ### Cross-compilation (Agent for Windows) From Linux build server: ```bash # Install Windows target rustup target add x86_64-pc-windows-msvc # Build (requires cross or appropriate linker) cross build -p guruconnect-agent --target x86_64-pc-windows-msvc --release ``` ## Development ### Running the Server ```bash # Development cargo run -p guruconnect-server # With environment variables DATABASE_URL=postgres://... JWT_SECRET=... cargo run -p guruconnect-server ``` ### Testing the Agent The agent must be run on Windows: ```powershell # Run from Windows .\target\release\guruconnect-agent.exe ``` ## Protocol Uses Protocol Buffers for efficient message serialization. See `proto/guruconnect.proto` for message definitions. Key message types: - `VideoFrame` - Screen frames (raw+zstd, VP9, H264) - `MouseEvent` - Mouse input - `KeyEvent` - Keyboard input - `SessionRequest/Response` - Session management ## Encoding Strategy | Scenario | Encoding | |----------|----------| | LAN (<20ms RTT) | Raw BGRA + Zstd + dirty rects | | WAN + GPU | H264 hardware | | WAN - GPU | VP9 software | ## Key References - RustDesk source: `~/claude-projects/reference/rustdesk/` - GuruRMM: `~/claude-projects/gururmm/` - Plan: `~/.claude/plans/shimmering-wandering-crane.md` ## Phase 1 MVP Goals 1. DXGI screen capture with GDI fallback 2. Raw + Zstd encoding with dirty rectangle detection 3. Mouse and keyboard input injection 4. WebSocket relay through server 5. Basic React viewer ## Security Considerations - All connections use TLS - JWT authentication for dashboard users - API key authentication for agents - Session audit logging - Optional session recording (Phase 4)