Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![CI Build](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/msbuild.yml/badge.svg)](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/msbuild.yml)
[![Render PlantUML Diagrams](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/plantuml-render.yml/badge.svg)](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/plantuml-render.yml)
[![Package Status](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/package.yml/badge.svg)](https://github.com/SwartzMss/SimpleRustDesk/actions/workflows/package.yml)


SimpleRustDesk 是一个远程桌面控制系统示例项目,参考 RustDesk 的设计思想,展示了如何构建一个完整的远程控制框架。系统通过信令交互和数据中继,实现被控端与控制端之间的远程连接与数据传输,主要包含以下模块:
Expand All @@ -29,6 +28,15 @@ SimpleRustDesk 是一个远程桌面控制系统示例项目,参考 RustDesk

![鼠标键盘控制 UML](diagrams/output/MouseKeyInput.svg)

## 文件传输-从控制端复制示意图 (ctrlcFromControl.puml)

![ctrlcFromControl](./diagrams/ctrlcFromControl.png)

## 文件传输-从被控制端复制示意图 (ctrlcFromServer.puml)

![ctrlcFromServer](./diagrams/ctrlcFromServer.png)


## 注意事项

- 本项目为示例性质,主要展示远程控制系统的整体架构和基本实现。
Expand Down
17 changes: 17 additions & 0 deletions RendezvousProto/proto/rendezvous.proto
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ message InputControlEvent {
}
}

message ClipboardEvent {
oneof event {
TextContent text = 1;
FileContent file = 2;
}
}

message TextContent {
string text_data = 1;
}

message FileContent {
bytes file_data = 1;
string file_name = 2;
}


message InpuVideoFrame{
bytes data = 1;
Expand Down Expand Up @@ -87,6 +103,7 @@ message RendezvousMessage {
PunchHoleSent punch_hole_sent = 8;
InpuVideoFrame inpuVideoFrame = 9;
InputControlEvent inputControlEvent = 10;
ClipboardEvent clipboardEvent =11;

}
}
27 changes: 27 additions & 0 deletions diagrams/ctrlcFromControl.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@startuml
actor "控制端用户" as UserC
actor "被控制的DeskServer用户" as UserS

participant "RemoteClipboard (DeskControl)" as RC_C
participant "RelayManager (DeskControl)" as RM_C
participant "RelayServer" as Network
participant "NetworkWorker (DeskServer)" as NW_S
participant "RemoteClipboard (DeskServer)" as RC_S
participant "系统" as System

== 控制端发送剪贴板数据 ==
UserC -> RC_C: 按 Ctrl+C
RC_C-> RC_C: eventFilter() 捕获 Ctrl+C
RC_C -> RC_C: 读取本地剪贴板数据
RC_C -> RM_C: sendClipboardMessage(ClipboardEvent)
RM_C -> Network: 传输 ClipboardEvent

== 被控制端接收剪贴板数据 ==
Network -> NW_S: 转发 ClipboardEvent
NW_S -> RC_S: 发射 clipboardMessageReceived(ClipboardEvent)
RC_S -> RC_S: receiveClipboardData(ClipboardEvent)\n更新系统剪贴板数据

== 被控制端粘贴操作 ==
UserS -> RC_S: 按 Ctrl+V
RC_S -> System: 粘贴更新后的剪贴板数据
@enduml
27 changes: 27 additions & 0 deletions diagrams/ctrlcFromServer.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@startuml
actor "被控制的DeskServer" as UserS
actor "控制端DeskControl" as UserC

participant "DeskServer" as DS
participant "RemoteClipboard (DeskServer)" as RC_S
participant "RelayManager(DeskServer)" as PC_S
participant "RelayServer" as Network
participant "NetworkWorker(DeskControl)" as PC_C
participant "RemoteClipboard (DeskControl)" as RC_C

== DeskServer 发送剪贴板数据 ==
UserS -> DS: 按 Ctrl+C
DS -> RC_S: eventFilter() 捕获 Ctrl+C
RC_S -> RC_S: 读取本地剪贴板数据
RC_S -> PC_S: sendClipboardMessage(ClipboardEvent)
PC_S -> Network: 传输 ClipboardEvent

== DeskControl 接收剪贴板数据 ==
Network -> PC_C: 接收 ClipboardEvent
PC_C -> RC_C: 发射 clipboardMessageReceived(ClipboardEvent)
RC_C -> RC_C: receiveClipboardData(ClipboardEvent)\n系统剪贴板数据更新

== DeskControl 粘贴操作 ==
UserC -> RC_C: 按 Ctrl+V
RC_C-> System: 粘贴更新后的剪贴板数据
@enduml
1 change: 1 addition & 0 deletions diagrams/output/ctrlcFromControl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading