Skip to content

Repository files navigation

English | 中文

Remote Desktop Control

A Java / Netty based remote desktop control application with real-time screen sharing and remote input. Built on the client-server-client relay model, with automatic P2P direct connection for LAN scenarios.

Based on Dayon — a remote desktop assistant. Re-architected into a client-server-client relay model with P2P direct connection support.

For higher frame rate requirements, check out my streaming-based remote desktop project: a-da

Features

# Feature Description
1 Real-time Control Remote desktop with minimal latency
2 Customizable Capture Adjustable tick interval, color/grayscale mode
3 Cross-platform Java-based, runs on Windows / macOS / Linux
4 Clipboard Sharing Bidirectional text & file transfer (HTTP chunked upload)
5 Multi-monitor Select and switch between different screens
6 LAN P2P Direct Screen data & input bypass the relay server on LAN; transparent auto-fallback to relay on failure
7 Zstd Compression Configurable level 1–9; level 1 for LAN, higher for WAN

Architecture

                         ┌────────────────────────────────┐
                         │ MySQL (Clipboard / File Meta)  │
                         └───────────┬─────────┬──────────┘
                                     │         │
                         ┌────────────────────────────────┐
                         │          Server HTTP API       │
                         │          FileController        │
                         └───────────┬─────────┬──────────┘
                                     │         │
                                HTTP upload/download
                                     │         │
┌──────────────┐                   ┌─┴──────────┴─┐                   ┌──────────────┐
│  Controller  │ ◄───────────────► │    Server    │ ◄───────────────► │  Controlled  │
│              │ signaling + relay │   (Relay)    │ signaling + relay │              │
│              │                   │              │                   │              │
│ • render     │                   │ • register   │                   │ • capture    │
│ • input      │                   │ • route      │                   │ • compress   │
│ • P2P        │                   │ • pair       │                   │ • execute    │
│              │                   │              │                   │ • P2P        │
└──────┬───────┘                   └──────────────┘                   └──────┬───────┘
       │                                                                     │
       └─────────────────────────────────────────────────────────────────────┤
          P2P(LAN)screen / input / clipboard text — auto fallback to relay
                                                                             │ Socket
                                                                             ▼
                                                                       ┌────────────┐
                                                                       │   Robots   │
                                                                       │(lock scrn) │
                                                                       └────────────┘

  Robots is used only on Windows lock screen, called by Controlled via Socket.
  Clipboard: text over Netty (relay or P2P); file over HTTP (upload/download
  chunks via FileController, only the file ID is notified through Netty).

Screenshots

Launcher

launcher

Remote Session

screen monitor

Settings

capture settings compress settings clipboard

Environment

  • Java 8 or higher
  • Maven for dependency management
  • MySQL for clipboard & file metadata (Server only)

Quick Start

1. Clone & Build

git clone https://github.com/SpringStudent/remote-desktop-control
cd remote-desktop-control
mvn clean install

2. Run Server

Import remote-desktop-control.sql into MySQL, then edit application.properties:

# Database
spring.datasource.url=jdbc:mysql://localhost:3306/remote_desktop_control
spring.datasource.username=root
spring.datasource.password=your_password

# Netty
netty.server.host=0.0.0.0
netty.server.port=54321
java -jar server/target/server-1.0.0.jar

3. Run Client

Via command line arguments or an external config file:

# config.properties
serverIp=192.168.0.110
serverPort=54321
clipboardServer=http://192.168.0.110:12345/remote-desktop-control
robotPort=55678
# Optional — P2P direct connection; omit to auto-detect LAN address & random port
p2pServerIp=192.168.1.100
p2pServerPort=55432
java -DconfigFile=/path/to/config.properties -jar client/target/RemoteClient.jar

Demo

Bilibili Video

Roadmap

  • HTTP-based clipboard transfer
  • Multi-monitor switching
  • Internationalization (i18n)

FAQ

Why does the controlled machine not respond to input?

Run both the controller and the controlled client as Administrator. Some applications on the controlled side cannot be manipulated without elevated privileges.

Why are some keys not working correctly?

Set the input language preference on the controller to "English (United States)" for the best control experience.

How stable is this project?

The stability has been verified in production environments and is ready for reliable use.

Windows lock screen — no screen capture or input?

java.awt.Robot cannot work on the Windows lock screen. Use windows-lock-helper and the Robots module as a workaround. The Robots service is only needed on Windows and only for lock screen scenarios.

About

⭐Java+Netty+Swing实现类似teamviewer|向日葵|ToDesk的远程桌面控制项目,可支持P2P和中继模式,非常适合自建使用

Resources

Stars

53 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages