Open-source remote desktop — a fast, secure, self-hosted alternative to AnyDesk & RustDesk
| Capability | Status | Detail |
|---|---|---|
| 💻 Screen capture | Done | DXGI (Windows), multi-monitor, dirty rectangle detection (64x64 tiles) |
| 📡 P2P transport | Done | WebRTC with ICE/STUN, NAT traversal, data channel |
| 📶 Signaling server | Done | Self-hosted WebSocket broker for peer discovery & SDP relay |
| 📹 Video encoding | Done | H.264 (NVENC/QSV/AMF) with FFmpeg or fallback JPEG |
| 🐭 Input injection | Done | Mouse move/click, keyboard via enigo (Windows/macOS/Linux) |
| 🎨 Flutter UI | Done | Single-screen AnyDesk-like UX — peer ID, connect field, remote view, accept/deny dialog |
| 🔗 Rust ↔ Flutter bridge | Done | Raw C FFI with event polling, frame buffer, accept/deny flow |
| 🆔 ID system | Done | Persistent 9-digit peer ID stored in %APPDATA%/chronodesk |
| :locked: Encryption | Ready | AEAD via ring (chacha20-poly1305) — wired, key exchange pending |
| 📋 File transfer | Planning | Planned over WebRTC data channel |
| 🌐 Remote audio | Planning | Planned via WebRTC audio tracks |
┌──────────────────────────────────────────────────────────────┐
│ CHRONODESK (Flutter App) │
│ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Flutter UI (home_screen.dart) │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────────────┐ │ │
│ │ │ Peer ID │ │ Connect │ │ Remote Screen │ │ │
│ │ │ Display │ │ Field │ │ (RawImage from RGBA) │ │ │
│ │ └──────────┘ └──────────┘ └──────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ FFI (C ABI) │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Rust Engine (chronodesk.dll) │ │
│ │ ┌────────────┐ ┌──────────┐ ┌────────────────────┐ │ │
│ │ │ Event │ │ Frame │ │ WebRTC Transport │ │ │
│ │ │ Queue │ │ Buffer │ │ (webrtc crate) │ │ │
│ │ └────────────┘ └──────────┘ └────────────────────┘ │ │
│ │ ┌────────────┐ ┌──────────┐ ┌────────────────────┐ │ │
│ │ │ Screen │ │ Video │ │ Signaling Client │ │ │
│ │ │ Capture │ │ Encoder │ │ (WebSocket) │ │ │
│ │ └────────────┘ └──────────┘ └────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ WebSocket │
└───────────────────────────┼──────────────────────────────────┘
│
┌───────┴────────┐
│ Signaling Srv │
│ ws://:21116/ws │
└────────────────┘
WebRTC P2P
┌─────────────────┐
│ ICE / STUN │
│ DTLS / SCTP │
│ Data Channel │
└─────────────────┘
Protocol flow:
- App starts → Rust loads peer ID (persistent 9-digit), connects to signaling server
- Enter remote ID → create WebRTC offer → send via signaling server
- Remote receives connection request → accept/deny dialog shown
- On accept → WebRTC handshake completes → P2P data channel opens
- Host captures screen, encodes frames, sends over data channel
- Viewer receives frames, decodes to RGBA, renders via Flutter
RawImage - Input events flow Viewer → Host over data channel
- Rust 1.83+ (
rustup install stable) - Flutter 3.x (for the UI)
- Visual Studio Build Tools (Windows) or CMake (Linux/macOS)
cargo run --bin signaling-serverThe server listens at ws://<host>:21116/ws.
# Build the Rust DLL
cargo build --lib
# Copy it to the Flutter release directory
copy target\debug\chronodesk.dll chronodesk_flutter\build\windows\x64\runner\Release\
# Build & run Flutter
cd chronodesk_flutter
flutter pub get
flutter run -d windowsThe app launches with your 9-digit peer ID. Enter another peer's ID and click Connect.
macOS / Linux: Replace
.dllwith.dylib/.soand adjust paths accordingly.
# Debug DLL
cargo build --lib
# Release DLL
cargo build --release --lib
# With FFmpeg H.264 support
cargo build --release --features ffmpeg --libOutput: target/debug/chronodesk.dll (or .so/.dylib)
cd chronodesk_flutter
flutter pub get
flutter build windows # or macos / linux# Signaling server
cargo build --bin signaling-server
# CLI engine (legacy host/client modes)
cargo buildchronodesk/
├── src/ # Rust core engine
│ ├── lib.rs # Library exports
│ ├── ffi.rs # C FFI exports (ID system, event queue, frame buffer)
│ ├── bin/signaling.rs # WebSocket signaling server
│ ├── capture.rs # Screen capture (xcap DXGI)
│ ├── crypto.rs # AEAD encryption (ring)
│ ├── input.rs # Input injection (enigo)
│ ├── video.rs # Video encoding (ffmpeg/JPEG)
│ ├── protocol.rs # Data channel message protocol
│ ├── main.rs # CLI entrypoint (legacy)
│ └── network/
│ ├── transport.rs # WebRTC PeerConnection
│ └── signaling.rs # Signaling client (WebSocket)
├── chronodesk_flutter/ # Flutter UI
│ ├── lib/
│ │ ├── main.dart
│ │ └── src/
│ │ ├── app.dart # App root (single screen)
│ │ ├── screens/
│ │ │ └── home_screen.dart # AnyDesk-like single-screen UX
│ │ └── ffi/
│ │ └── native.dart # Raw C FFI bindings
│ ├── windows/ # Windows runner
│ └── pubspec.yaml
├── server/ # Server infrastructure (future)
├── docs/ # Documentation
├── .github/ # CI/CD workflows
└── Dockerfile # Signaling server container
| Component | Technology |
|---|---|
| Core engine | Rust — performance, safety, memory efficiency |
| P2P transport | WebRTC via webrtc crate — ICE, STUN, DTLS, SCTP |
| Screen capture | xcap — DXGI (Windows), CoreGraphics (macOS), X11/PipeWire (Linux) |
| Video encoding | FFmpeg (NVENC/QSV/AMF) or libjpeg fallback |
| Input injection | enigo — cross-platform input simulation |
| Encryption | ring — AEAD (ChaCha20-Poly1305) |
| UI | Flutter — Material Design 3, native performance |
| Bridge | Raw C FFI — event polling, RGBA frame buffer, JSON event queue |
- Core P2P connectivity & signaling
- Screen capture & video encoding
- Input injection
- Flutter UI with remote screen viewer
- Rust ↔ Flutter FFI bridge with event system
- End-to-end encryption (key exchange)
- File transfer over data channel
- Audio streaming
- Clipboard sync
- TURN server for restrictive NATs
- Headless mode for servers
- Mobile clients (iOS/Android)
Contributions are welcome! See CONTRIBUTING.md for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
Found a vulnerability? Read SECURITY.md and report responsibly.
This project is licensed under the GNU Affero General Public License v3.0 — see LICENSE.
© 2026 CHRONODESK Contributors