A complete remote desktop solution with relay server, client, and server components for Windows.
This project provides a full-featured VNC (Virtual Network Computing) system that allows remote control of Windows machines through a WebSocket relay server. The system consists of three main components working together.
- Real-time screen sharing - Live screen capture and streaming from target machine at 45 FPS
- Smooth rendering - Optimized frame rate for fluid screen updates
- Automatic resolution detection - Adapts to target screen resolution automatically
- High-quality display - JPEG encoding with compression for efficient transfer
- On-demand screenshots - Capture screenshots instantly with F2 hotkey or button click
- High-quality images - 95% JPEG quality for detailed screenshots
- Automatic saving - Screenshots automatically saved to "Target Files" folder on client
- Timestamped filenames - Each screenshot saved with date/time stamp (e.g.,
Screenshot_2024-01-15_14-30-45.jpg)
- Live webcam feed - Real-time camera streaming from target machine
- Multiple camera support - Automatically detects and uses available cameras
- Separate camera window - Dedicated popup window for camera view
- MJPEG streaming - Efficient streaming protocol at 15 FPS
- Toggle control - Enable/disable camera with button or F4 hotkey
- Real-time keystroke logging - Captures all keyboard input on target machine
- Text detection and buffering - Intelligently groups keystrokes into readable text
- Timestamped entries - Each keystroke logged with precise timestamps
- Special key recognition - Detects and logs special keys (Enter, Backspace, Tab, etc.)
- Auto-save functionality - Keylogs automatically saved when logging stops
- Toggle control - Start/stop keylogger with button or F3 hotkey
- Saved to client - All keylogs saved to "Target Files" folder on your machine
- Full mouse movement - Precise cursor positioning with coordinate conversion
- Left/Right/Middle click support - Complete mouse button control
- Click and drag - Support for mouse down, move, and release actions
- Mouse toggle - Enable/disable mouse control with visual indicator (F1 hotkey)
- Virtual mouse clicks - Click at specific coordinates without moving cursor (F5 hotkey)
- Complete keyboard input forwarding - All keys and key combinations supported
- Modifier key support - Shift, Ctrl, Alt key combinations work correctly
- Unicode character input - Full character set support including international characters
- Real-time key transmission - Instant keyboard input with keydown/keyup events
- Hotkey support - F1 (Mouse), F2 (Screenshot), F3 (Keylog), F4 (Camera), F5 (Virtual Mouse), ESC (Close)
- Automatic reconnection - Auto-reconnects if connection is lost (up to 999 retries)
- Memory optimization - Aggressive memory management for long-running sessions
- Self-contained executables - No dependencies required on target machine
- Multiple .NET version support - Compatible with .NET Framework 4.8 through .NET 9
Before compiling or using any component, you MUST configure the relay server connection:
- Edit
client.cs- Replace"Your Relay IP"with your relay server IP address and0with your relay port number - Edit
server.cs- Replace"Your Relay IP"with your relay server IP address and0with your relay port number
- Purpose: Central WebSocket relay server that routes communication between client and server
- Location: Run on your VPS or public server
- Usage:
python3 relay.pyorpython relay.py - Port: Default 8080 (configurable in the file)
- Why Important: Without this running, client and server cannot communicate. This is the bridge between them.
- Purpose: Windows Forms GUI application that displays and controls the remote desktop
- Compilation: Use
ClientCompile.batto compile on your development machine - Output:
client.exe(run on your controller machine) - Why Important: This is what you use to view and control the remote machine. Must be compiled with your relay IP/port configured.
- Purpose: Runs on target machine, captures screen, handles input, sends data to relay
- Compilation: Use
ServerCompile.bat(for testing) orVTServerCompile.bat(for target deployment) - Output:
server.exe(run on target Windows machine) - Why Important: This captures the screen and executes your commands on the target machine.
- Purpose: Compiles
client.cstoclient.exeon your development machine - When to Use: When you need to build the client application
- Requirements: .NET SDK installed on your machine
- Output: Creates
client.exein the same directory - Why Important: You need this to create the client executable you'll use to connect.
- Purpose: Compiles
server.cstoserver.exefor testing on your development machine - When to Use: For testing and development on your own machine
- Requirements: .NET SDK installed on your machine
- Output: Creates
server.exein the same directory - Why Important: Use this to test the server before deploying to target machines.
- Purpose: Compiles
server.cstoserver.exefor deployment on target machines - When to Use: When you need to compile the server on or for the target machine
- Requirements: .NET SDK or runtime on target machine
- Output: Creates
server.exein the same directory - Why Important: This is the version you transfer to target machines to compile the server.
This folder contains different compiler variations for different .NET versions:
- Purpose: Compiles for .NET Framework 4.8 (older Windows compatibility)
- When to Use: For target machines with older Windows or only .NET Framework installed
- Why Important: Maximum compatibility with older Windows systems
- Purpose: Compiles for .NET 6
- When to Use: If target machine has .NET 6 installed
- Why Important: Alternative if .NET 7/8 not available
- Purpose: Compiles for .NET 7 (tested version)
- When to Use: Recommended for .NET 7 environments
- Why Important: Tested and verified working version
- Purpose: Compiles for .NET 8 (tested version)
- When to Use: Recommended for .NET 8 environments
- Why Important: Latest tested version with performance improvements
- Purpose: Compiles for .NET 9
- When to Use: For cutting-edge .NET 9 installations
- Why Important: Latest .NET version support
-
Open
client.csin a text editor -
Find:
private const string RELAY_HOST = "Your Relay IP"; -
Replace
"Your Relay IP"with your actual relay server IP (e.g.,"192.168.1.100") -
Find:
private const int RELAY_PORT = 0; -
Replace
0with your relay port number (e.g.,8080) -
Repeat steps 1-5 for
server.cs
python3 relay.pyThe relay will start on 0.0.0.0:8080 (listens on all interfaces, port 8080).
On your development machine:
ClientCompile.batThis creates client.exe which you run on your controller machine.
Option A - For Testing (on your machine):
ServerCompile.batOption B - For Target Deployment:
- Transfer
server.csand appropriateVTServerCompile.batto target machine - Run the
VTServerCompile.baton the target machine - This creates
server.exeon the target
- Start Relay:
python3 relay.py(on VPS/server) - Start Server: Run
server.exeon target Windows machine - Start Client: Run
client.exeon your controller machine - Control: Use the client GUI to view and control the remote desktop
- Python 3.x
websocketslibrary:pip install websockets
- Windows operating system
- .NET 7.0 or higher SDK (for compilation)
- Compiled
client.exeruns standalone
- Windows operating system
- .NET 7.0+ SDK (for compilation) OR appropriate .NET runtime
- Compiled
server.exeruns standalone (self-contained)
| File | Purpose | When to Use |
|---|---|---|
relay.py |
WebSocket relay server | Always - must run on VPS/server |
client.cs |
Client source code | Compile to create client.exe |
server.cs |
Server source code | Compile to create server.exe |
ClientCompile.bat |
Compile client | When building client on dev machine |
ServerCompile.bat |
Compile server (testing) | When testing on your machine |
VTServerCompile.bat |
Compile server (deployment) | When compiling on target machine |
VTServerCompilers/* |
Alternative compilers | When target has different .NET version |
- Configure IP/Port: You MUST edit
client.csandserver.csbefore compilation - Relay First: Always start the relay server before client or server
- Firewall: Ensure relay server port (default 8080) is open
- Permissions: Server may need elevated permissions for some features
- Network: Client and server must be able to reach the relay server
This project is provided as-is for educational and utility purposes.