Release v1.3.4

This commit is contained in:
yuanyuanxiang
2026-05-20 15:15:08 +02:00
parent d808462fe1
commit 6e743ada0b
14 changed files with 889 additions and 1592 deletions

1
.gitignore vendored
View File

@@ -93,3 +93,4 @@ nul
server/go/web/assets/index.html server/go/web/assets/index.html
server/go/users.json server/go/users.json
server/go/build/ server/go/build/
server/go/.claude/settings.json

771
ReadMe.md
View File

@@ -12,9 +12,9 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release">
</a> </a>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Platform"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/language-C%2B%2B17-orange?style=flat-square&logo=cplusplus" alt="Language"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
<img src="https://img.shields.io/badge/IDE-VS2019%2B-purple?style=flat-square&logo=visualstudio" alt="IDE"> <img src="https://img.shields.io/badge/language-C%2B%2B17%20%2F%20Go-orange?style=flat-square&logo=cplusplus" alt="Language">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License"> <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License">
</p> </p>
@@ -29,10 +29,7 @@
> [!WARNING] > [!WARNING]
> **重要法律声明** > **重要法律声明**
> >
> 本软件**仅供教育目的及授权使用场景**,包括 > 本软件**仅供教育目的及授权使用场景**组织内远程 IT 管理、经授权的渗透测试与安全研究、个人设备管理与技术学习。
> - 在您的组织内进行远程 IT 管理
> - 经授权的渗透测试和安全研究
> - 个人设备管理和技术学习
> >
> **未经授权访问计算机系统属违法行为。** 使用者须对遵守所有适用法律承担全部责任。开发者对任何滥用行为概不负责。 > **未经授权访问计算机系统属违法行为。** 使用者须对遵守所有适用法律承担全部责任。开发者对任何滥用行为概不负责。
@@ -41,13 +38,13 @@
## 目录 ## 目录
- [项目简介](#项目简介) - [项目简介](#项目简介)
- [免责声明](#免责声明) - [本版本亮点:全平台闭环](#本版本亮点全平台闭环)
- [合规与反滥用](#合规与反滥用)
- [功能特性](#功能特性) - [功能特性](#功能特性)
- [技术亮点](#技术亮点) - [全平台支持](#全平台支持)
- [系统架构](#系统架构) - [系统架构](#系统架构)
- [快速开始](#快速开始) - [快速开始](#快速开始)
- [用户文档](#用户文档) - [用户文档](#用户文档)
- [客户端支持](#客户端支持)
- [更新日志](#更新日志) - [更新日志](#更新日志)
- [相关项目](#相关项目) - [相关项目](#相关项目)
- [联系方式](#联系方式) - [联系方式](#联系方式)
@@ -56,25 +53,9 @@
## 项目简介 ## 项目简介
**SimpleRemoter** 是一个功能完整的远程控制解决方案,基于经典的 Gh0st 框架重构,采用现代 C++17 开发。项目始于 2019 年,经过持续迭代已发展为支持 **Windows + Linux + macOS** 三平台的企业级远程管理工具 **SimpleRemoter** 是一个端到端跨平台的远程控制解决方案。
### 核心能力 项目核心基于经典 **Gh0st 架构**,最早始于 2019 年 1 月。历经 7 年持续迭代——从 IOCP 通信内核重构、x264 视频级编码、V2 文件传输协议、多层授权体系,到 Linux 与 macOS 客户端的引入——本版本最终完成**客户端 + 服务端的全平台闭环**三大桌面操作系统Windows / Linux / macOS在任一侧都可作为受控端或主控端。
| 类别 | 功能 |
|------|------|
| **远程桌面** | 实时屏幕控制、多显示器支持、H.264 编码、自适应质量 |
| **文件管理** | 双向传输、断点续传、C2C 传输、SHA-256 校验 |
| **终端管理** | 交互式 Shell、ConPTY/PTY 支持、现代 Web 终端 |
| **系统管理** | 进程/服务/窗口管理、注册表浏览、会话控制 |
| **媒体采集** | 摄像头监控、音频监听、键盘记录 |
| **网络功能** | SOCKS 代理、FRP 穿透、端口映射 |
### 适用场景
- **企业 IT 运维**:批量管理内网设备,远程故障排查
- **远程办公**:安全访问办公电脑,文件同步传输
- **安全研究**:渗透测试、红队演练、安全审计
- **技术学习**网络编程、IOCP 模型、加密传输实践
**原始来源:** [zibility/Remote](https://github.com/zibility/Remote) | **起始日期:** 2019.1.1 **原始来源:** [zibility/Remote](https://github.com/zibility/Remote) | **起始日期:** 2019.1.1
@@ -82,36 +63,73 @@
--- ---
## 免责声明 ## 本版本亮点:全平台闭环
**请在使用本软件前仔细阅读以下声明:** 本项目长期以 **C++ MFC 主控**`YAMA.exe`)为核心交付形态——经典 Gh0st 架构、IOCP 高性能内核、完整的远程桌面 / 文件 / 进程 / 媒体功能栈、多层授权体系、品牌定制——**至今仍是主要使用的主控**。MFC 主控内置了基于 WebSocket 的 Web 远程桌面服务,从 v1.3.1 起就已经支持**任意平台的浏览器**远控被管设备(手机/平板/Linux/macOS 桌面均可)。
1. **合法用途**:本项目仅供合法的技术研究、学习交流和授权的远程管理使用。严禁将本软件用于未经授权访问他人计算机系统、窃取数据、监控他人隐私等任何违法行为 本版本v1.3.4)补上了最后一块拼图——**Go 主控**:一个**功能简单、聚焦于"远程桌面 + 远程终端 + 多用户分级"** 的轻量服务端,跨 Windows / Linux / macOS 编译运行。它的定位**不是替代 MFC**,而是为那些**不便于跑 Windows VPS** 的用户提供一个原生的 Linux/macOS 主控落点——例如纯 Linux 服务器、ARM Mac 长驻、嵌入式主控箱等场景
2. **使用者责任**:使用者必须遵守所在国家/地区的法律法规。因使用本软件而产生的任何法律责任,由使用者自行承担。 ### 两种主控形态如何选择
3. **无担保声明**:本软件按"现状"提供,不附带任何明示或暗示的担保,包括但不限于适销性、特定用途适用性的担保。 | 形态 | GUI | 功能覆盖 | 平台 | 定位 |
|---|---|---|---|---|
| **C++ MFC 主控** (`YAMA.exe`) | 原生 Windows GUI + 内置 Web 服务 | ✅ **全部功能** | Windows | **主推方案**。日常运维、文件管理、媒体采集、多层授权、品牌定制等都用它 |
| **Go 主控**(新) | Web UI任何浏览器 | 远程桌面 + 远程终端 + 多用户 | Windows / Linux / macOS | **补充方案**。需要"零 Windows 依赖"的纯 Linux/macOS 主控部署 |
4. **免责条款**:开发者不对因使用、误用或无法使用本软件而造成的任何直接、间接、偶然、特殊或后果性损害承担责任。 > [!TIP]
> 两种主控**用的是同一套客户端**——可以混搭,例如一台 Windows MFC 主控 + 一台 Linux Go 主控并行管理同一批设备群。
5. **版权声明**:本项目采用 MIT 协议开源,允许自由使用、修改和分发,但必须保留原始版权声明。 ### Go 主控的核心能力v1.3.4 新增)
**继续使用本软件即表示您已阅读、理解并同意上述所有条款。** - **远程桌面**H.264 流通过 WebSocket 直发浏览器WebCodecs 硬解1080P @ 20fps 流畅
- **远程终端**xterm.js + ConPTY/PTY支持调整尺寸、Tab 补全
- **多用户体系**:管理员 / 普通用户分级、Challenge-Response 登录、不透明 token、按设备组授权
- **生产部署**Nginx 反代 + Let's Encrypt + Keyboard Lock + 全屏控制、防止 ESC / F11 误退出
- **故意保持轻量**:不包含文件管理、媒体采集、注册表、服务管理等 MFC 主控专属功能——这些请走 MFC 主控
### 全平台支持矩阵
| | **客户端 (受控端)** | **主控端** |
|---|---|---|
| **Windows** | ✅ 完整功能 | ✅ MFC `YAMA.exe`(推荐)/ Go |
| **Linux** (X11) | ✅ 屏幕 + 终端 + 文件 + 剪贴板 | ✅ Go |
| **macOS** (Intel + Apple Silicon) | ✅ 屏幕 + 终端 + 文件 + 剪贴板 | ✅ Go |
---
## 合规与反滥用
本项目长期坚持「明确的合规姿态」立场。本版本进一步收紧反滥用边界。
### 内置技术措施
源代码层面构筑多道独立可验证的反滥用屏障,详见 [反滥用技术措施清单](./docs/Compliance_TechnicalMeasures.md)
- **入站连接 IP 段校验**:试用版若被部署到公网会触发可见告警 latch
- **监听端口上限**:试用版限制 ≤ 2 个监听端口,防多租户中转改造
- **应用层 RTT 反代理**LAN 内 RTT 阈值检测,反向代理 / 隧道会被识别
- **多层授权架构**V2 ECDSA 离线 + V1 在线 + 试用版分级,每一层限制独立
- **Web 主控认证**:强制 Challenge-Response 登录、登录限流、不透明 token、操作可审计
### 合规文档
| 文档 | 内容 |
|---|---|
| 📖 [反滥用与合规使用政策](./docs/Compliance_AntiAbuse.md) | 完整的发行方-使用方责任划分 |
| 📖 [反滥用技术措施清单](./docs/Compliance_TechnicalMeasures.md) | 每一道屏障的源代码位置、设计动机、已知局限 |
> [!IMPORTANT] > [!IMPORTANT]
> **网络连接与隐私声明** > **使用本软件即视为您已阅读、理解并接受上述合规文档全部条款。** 如您不能或不愿接受任一条款,请立即停止使用并销毁本软件副本。
>
> 主控程序(服务端)会根据授权状态与授权服务器进行网络通信: ### 网络连接与隐私
>
> | 版本类型 | 连接行为 | | 版本类型 | 连接行为 |
> |---------|---------| |---|---|
> | 试用版本 | 维持与授权服务器的持续连接 | | 试用版本 | 维持与授权服务器的持续连接 |
> | V1/V2 授权版本 | 启动时连接验证,通过后断开 | | V1/V2 授权版本 | 启动时连接验证,通过后断开 |
> | V2 离线授权版本 | 无需连接授权服务器 | | V2 离线授权版本 | 无需连接授权服务器 |
>
> 除获得离线授权外,主控程序会与授权服务器进行必要的数据交互(如检测破解行为、验证授权有效性)。 除获得离线授权外,主控程序会与授权服务器进行必要的数据交互(如检测破解行为、验证授权有效性)。
>
> **使用本软件即表示您接受主控程序与授权服务器之间的数据传输。如您不同意,请勿使用本软件。**
--- ---
@@ -121,240 +139,149 @@
![远程桌面](./images/Remote.jpg) ![远程桌面](./images/Remote.jpg)
- **多种截图方式**GDI兼容性强、DXGI高性能、虚拟桌面后台运行 - **多种屏幕捕获**GDI / DXGI / 虚拟桌面Windows、X11 + XShmLinux、CGDisplayStreammacOS
- **智能压缩算法** - **智能压缩**DIFF 差分SSE2 优化)/ RGB565节省 50% 带宽)/ **H.264**视频级压缩x264 + VideoToolbox + WebCodecs/ 灰度模式
- DIFF 差分算法 - SSE2 优化,仅传输变化区域 - **自适应质量**:根据 RTT 自动调节帧率5-30 FPS、分辨率、压缩算法
- RGB565 算法 - 节省 50% 带宽 - **多显示器**:多屏切换 + 多屏上墙
- H.264 编码 - 视频级压缩,适合高帧率场景 - **跨设备文件拖拽**Ctrl+C/V 跨设备复制粘贴文件
- 灰度模式 - 极低带宽消耗 - **Web 远程桌面**:浏览器直接访问,手机/平板可用([配置指南](./docs/WebHTTPS.md)
- **自适应质量**:根据网络 RTT 自动调整帧率5-30 FPS、分辨率和压缩算法
- **多显示器**:支持多屏切换和多屏上墙显示 ![Web远程桌面](./images/WebRemote.png)
- **隐私屏幕**:被控端屏幕可隐藏,支持锁屏状态下控制
- **文件拖拽**Ctrl+C/V 跨设备复制粘贴文件
- **Web 远程桌面**:通过浏览器访问远程桌面,支持手机/平板([配置指南](./docs/WebHTTPS.md)
### 文件管理 ### 文件管理
![文件管理](./images/FileManage.jpg) ![文件管理](./images/FileManage.jpg)
- **V2 传输协议**全新设计,支持大文件(>4GB - **V2 传输协议**支持 >4GB 大文件、断点续传、SHA-256 校验
- **断点续传**:网络中断后自动恢复,状态持久化
- **C2C 传输**:客户端之间直接传输,无需经过主控 - **C2C 传输**:客户端之间直接传输,无需经过主控
- **完整性校验**SHA-256 哈希验证,确保文件完整 - **批量操作**:搜索、压缩、批量传输
- **批量操作**:支持文件搜索、压缩、批量传输
### 终端管理 ### 终端管理
![终端管理](./images/Console.jpg) ![终端管理](./images/LinuxClient.png)
- **交互式 Shell**完整的命令行体验,支持 Tab 补全 - **交互式 Shell**Tab 补全、ANSI 转义、调整尺寸
- **ConPTY 技术**Windows 10+ 原生伪终端支持 - **现代终端**Windows ConPTY、Linux/macOS PTY
- **现代 Web 终端**基于 WebView2 + xterm.jsv1.2.7+ - **Web 终端**xterm.js + WebSocket跟原生体验一致
- **终端尺寸调整**:自适应窗口大小
### 进程与窗口管理
| 进程管理 | 窗口管理 |
|---------|---------|
| ![进程](./images/Process.jpg) | ![窗口](./images/Window.jpg) |
- **进程管理**查看进程列表、CPU/内存占用、启动/终止进程
- **代码注入**:向目标进程注入 DLL需管理员权限
- **窗口控制**:最大化/最小化/隐藏/关闭窗口
### 媒体功能
| 视频管理 | 语音管理 |
|---------|---------|
| ![视频](./images/Video.jpg) | ![语音](./images/Voice.jpg) |
- **摄像头监控**:实时视频流,支持分辨率调整
- **音频监听**:远程声音采集,支持双向语音
- **键盘记录**:在线/离线记录模式
### 其他功能 ### 其他功能
- **服务管理**:查看和控制 Windows 服务 | 模块 | 能力 |
- **注册表浏览**:只读方式浏览注册表内容 |---|---|
- **会话控制**:远程注销/关机/重启 | **进程管理** | 进程列表、CPU/内存占用、终止、DLL 注入 |
- **SOCKS 代理**:通过客户端建立代理隧道 | **窗口管理** | 最大化/最小化/隐藏/关闭 |
- **FRP 穿透**:内置 FRP 支持,轻松穿透内网 | **媒体采集** | 摄像头、双向语音、键盘记录 |
- **代码执行**:远程执行 DLL支持热更新 | **系统控制** | 服务管理、注册表、会话注销/关机 |
| **网络功能** | SOCKS 代理、FRP 穿透、端口映射 |
| **代码执行** | 远程执行 DLL、内存加载、热更新 |
--- ---
## 技术亮点 ## 全平台支持
### 高性能网络架构 ### Windows 客户端
``` **系统要求**Windows 7 SP1 及以上
┌─────────────────────────────────────────────────────────┐ **功能完整性**:✅ 全部功能支持
│ IOCP 通信模型 │
├─────────────────────────────────────────────────────────┤
│ • I/O 完成端口Windows 最高效的异步 I/O 模型 │
│ • 单主控支持 10,000+ 并发连接 │
│ • 支持 TCP / UDP / KCP 三种传输协议 │
│ • 自动分块处理大数据包(最大 128KB 发送缓冲) │
└─────────────────────────────────────────────────────────┘
```
### 自适应质量控制 ### Linux 客户端v1.2.5+
基于 RTTRound-Trip Time的智能质量调整系统 **系统要求**
- 显示服务器X11/Xorg暂不支持 Wayland
- 必需库libX11推荐库libXtstXTest 扩展、libXss空闲检测
| RTT 延迟 | 质量等级 | 帧率 | 分辨率 | 压缩算法 | 适用场景 | | 功能 | 状态 | 实现 |
|---------|---------|------|--------|---------|---------| |---|---|---|
| < 30ms | Ultra | 25 FPS | 原始 | DIFF | 局域网办公 | | 远程桌面 | ✅ | X11 屏幕捕获 + libx264 H.264 硬件编码 |
| 30-80ms | High | 20 FPS | 原始 | RGB565 | 一般办公 | | 远程终端 | ✅ | PTY 交互式 Shell |
| 80-150ms | Good | 20 FPS | ≤1080p | H.264 | 跨网/视频 | | 文件管理 | ✅ | V2 协议、双向传输、大文件 |
| 150-250ms | Medium | 15 FPS | ≤900p | H.264 | 跨网办公 | | 进程管理 | ✅ | 列表 + 终止 |
| 250-400ms | Low | 12 FPS | ≤720p | H.264 | 较差网络 | | 剪贴板同步 | ✅ | xclip / xsel 外部工具,支持文件 URI |
| > 400ms | Minimal | 8 FPS | ≤540p | H.264 | 极差网络 | | 心跳/RTT | ✅ | RFC 6298 RTT 估算 |
| 守护进程 | ✅ | 双 fork 守护化 |
- **零额外开销**:复用心跳包计算 RTT **编译**`cd linux && cmake . && make`
- **快速降级**2 次检测即触发,响应网络波动
- **谨慎升级**5 次稳定后才提升质量
- **冷却机制**:防止频繁切换
### V2 文件传输协议 ### macOS 客户端v1.3.2+
```cpp **系统要求**
// 77 字节协议头 + 文件名 + 数据载荷 - macOS 10.15 (Catalina) 及以上
struct FileChunkPacketV2 { - 架构Intel (x64) 和 Apple Silicon (arm64) 通用二进制
uint8_t cmd; // COMMAND_SEND_FILE_V2 = 85 - 系统权限:屏幕录制、辅助功能、完全磁盘访问
uint64_t transferID; // 传输会话 ID
uint64_t srcClientID; // 源客户端 ID (0=主控端)
uint64_t dstClientID; // 目标客户端 ID (0=主控端, C2C)
uint32_t fileIndex; // 文件编号 (0-based)
uint32_t totalFiles; // 总文件数
uint64_t fileSize; // 文件大小(支持 >4GB
uint64_t offset; // 当前块偏移
uint64_t dataLength; // 本块数据长度
uint64_t nameLength; // 文件名长度
uint16_t flags; // 标志位 (FFV2_LAST_CHUNK 等)
uint16_t checksum; // CRC16 校验(可选)
uint8_t reserved[8]; // 预留扩展
// char filename[nameLength]; // UTF-8 相对路径
// uint8_t data[dataLength]; // 文件数据
};
```
**特性** | 功能 | 状态 | 实现 |
- 大文件支持uint64_t 突破 4GB 限制) |---|---|---|
- 断点续传(状态持久化到 `%TEMP%\FileTransfer\` | 远程桌面 | ✅ | CGDisplayStream + VideoToolbox H.264 硬件编码 |
- SHA-256 完整性校验 | 键鼠控制 | ✅ | CGEvent支持双击、拖拽 |
- C2C 直传(客户端到客户端) | 远程终端 | ✅ | PTY 交互式 Shellzsh/bash |
- V1/V2 协议兼容 | 文件管理 | ✅ | V2 协议、大文件 |
| 进程管理 | ✅ | proc_listpids + 终止 |
| 剪贴板同步 | ✅ | NSPasteboard支持文件 URL + NSFilenamesPboardType |
| 守护模式 | ✅ | `-d` 后台运行、电源管理、空闲检测 |
### 屏幕传输优化 **编译**`cd macos && ./build.sh`
- **SSE2 指令集**:像素差分计算硬件加速 ### Go 主控v1.3.4+
- **多线程并行**:线程池分块处理屏幕数据
- **滚动检测**:识别滚动场景,减少 50-80% 带宽
- **H.264 编码**:基于 x264GOP 控制,视频级压缩
### 安全机制 **系统要求**Go 1.21+(仅编译时);二进制运行无依赖
| 层级 | 措施 | | 能力 | 实现 |
|------|------| |---|---|
| **传输加密** | AES-256 数据加密,可配置 IV | | 远程桌面 | H.264 → WebSocket → WebCodecs1080P @ 20fps |
| **身份验证** | 签名验证 + HMAC 认证 | | 远程终端 | xterm.js + PTY/ConPTY 透明转发 |
| **授权控制** | 序列号绑定IP/域名),多级授权 | | 多用户 | Challenge-Response + 不透明 token + 按组授权 |
| **文件校验** | SHA-256 完整性验证 | | 部署 | Nginx 反代 / Let's Encrypt / systemd unit / `/etc/environment` |
| **会话隔离** | Session 0 独立处理 |
### 依赖库 **编译**`cd server/go && go build -o server_linux_amd64 ./cmd`
| 库 | 版本 | 用途 |
|----|------|------|
| zlib | 1.3.1 | 通用压缩 |
| zstd | 1.5.7 | 高速压缩 |
| x264 | 0.164 | H.264 编码 |
| libyuv | 190 | YUV 转换 |
| HPSocket | 6.0.3 | 网络 I/O |
| jsoncpp | 1.9.6 | JSON 解析 |
--- ---
## 系统架构 ## 系统架构
### 全平台拓扑
``` ```
┌───────────────────────────────────────────────────────────────────────────── ┌────────────────────────────────────────────────────────┐
多层授权架构 (Multi-Layer Authorization) 主控层
├─────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
┌───────────────────── ┌──────────────────┐ ┌──────────────────┐ │
│ 超级管理员 │ │ C++ MFC 主控 │ │ Go 主控
(授权服务器) │ │ YAMA.exe (Win/Linux/Mac) │
│ Super Admin │ Windows only Web UI 全平台 │
└────────┬───────────┘ └────────┬─────────┘ └────────┬─────────
│ │ │ └────────────┼──────────────────────────┼─────────────────┘
┌──────────────┼──────────────┐
V2 授权 │ V2 授权 │ V2 授权 │ TCP (自定义二进制协议) │ TCP (设备) + WS (浏览器)
│ (ECDSA) │ (ECDSA) │ (ECDSA) │ └────────┬─────────────────┘
│ ▼ ▼ ▼
┌───────────┐ ┌──────────┐ ┌───────────┐ │ ┌────────────────────────────
│ 第一层 A │ 第一层 B │ │ 第一层 C ◄── 独立运营
│ Layer-1 A │ │ Layer-1 B │ │ Layer-1 C │ 完全隔离 │ ┌─────────┐ ┌─────────┐ ┌─────────┐
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ Windows │ Linux macOS
│ │ 客户端 │ │ 客户端 │ 客户端
│ ┌────────┴────────┐ │ ┌──────┴──────┐ │ (DXGI) │ (X11) │ (CG)
│ │ V1 授权 │ │ │ V1 授权 └─────────┘ └─────────┘ └─────────┘
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ... ┌──────────┐ ┌──────────┐ │
│ │ 下级 A1 │ │ 下级 A2 │ │ 下级 C1 │ │ 下级 C2 │ │
│ │ Master │ │ Master │ │ Master │ │ Master │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ 客户端 │ │ 客户端 │ │ 客户端 │ │ 客户端 │ │
│ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │
├─────────────────────────────────────────────────────────────────────────────┤
│ 授权类型 验证方式 特点 │
│ ───────────────────────────────────────────────────────────────────────── │
│ V2 授权 ECDSA P-256 签名 支持离线验证,下级连接数限制 │
│ V1 授权 HMAC + 在线验证 连接上级服务器验证 │
│ 试用版 在线验证 功能受限,需保持连接 │
└─────────────────────────────────────────────────────────────────────────────┘
``` ```
### 架构优势 ### 多层授权(简化视图)
| 特性 | 说明 | ```
|------|------| 超级管理员(授权服务器)
| **层级控制** | 超级用户可管理任意主控程序,支持无限层级 | │ V2 授权 (ECDSA P-256)
| **完全隔离** | 不同第一层用户的授权、数据、客户端完全隔离 |
| **独立运营** | 第一层用户可独立定价、发放授权,打造专属品牌 | 第一层主控 ──┬── 第一层主控 ──┬── 第一层主控 ◄── 独立运营 / 完全隔离
| **水平扩展** | 单 Master 支持 10,000+ 客户端,多层架构可达百万级 | │ V1 │ V1 │ V1
| **离线支持** | V2 授权支持完全离线验证,无需依赖上游服务 | ▼ ▼ ▼
下级主控 → 客户端 (10,000+) → 设备群
```
### 主控程序Server | 授权 | 验证 | 特点 |
|---|---|---|
| V2 授权 | ECDSA P-256 签名 | 离线验证,下级连接数限制 |
| V1 授权 | HMAC + 在线验证 | 连接上级服务器验证 |
| 试用版 | 在线验证 | 功能受限、连接限制(详见 [合规文档](./docs/Compliance_AntiAbuse.md) |
主控程序 **YAMA.exe** 提供图形化管理界面: 完整说明:[多层授权方案](./docs/MultiLayerLicense.md)
![主界面](./images/Yama.jpg)
- 基于 IOCP 的高性能服务端
- 客户端分组管理
- 实时状态监控RTT、地理位置、活动窗口
- 一键生成客户端
### 受控程序Client
![客户端生成](./images/TestRun.jpg)
**运行形式**
| 类型 | 说明 |
|------|------|
| `ghost.exe` | 独立可执行文件,无外部依赖 |
| `TestRun.exe` + `ServerDll.dll` | 分离加载,支持内存加载 DLL |
| Windows 服务 | 后台运行,支持锁屏控制 |
| Linux 客户端 | 跨平台支持v1.2.5+ |
| macOS 客户端 | 跨平台支持v1.3.2+ |
--- ---
@@ -365,61 +292,33 @@ struct FileChunkPacketV2 {
无需编译,下载即用: 无需编译,下载即用:
1. **下载发布版** - 从 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下载最新版本 1. **下载发布版** - 从 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下载最新版本
2. **启动主控** - 运行 `YAMA.exe`,输入授权信息(见下方试用口令) 2. **启动主控** - 运行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`,输入授权信息
3. **生成客户端** - 点击工具栏「生成」按钮,配置服务器 IP 和端口 3. **生成客户端** - 工具栏「生成」配置服务器 IP 和端口
4. **部署客户端** - 将生成的客户端复制到目标机器运行 4. **部署客户端** - 复制到目标机器运行
5. **开始控制** - 客户端上线后双击即可打开远程桌面 5. **开始控制** - 客户端上线后双击远程桌面
> [!TIP] > [!TIP]
> 首次测试建议在同一台机器上运行主控和客户端,使用 `127.0.0.1` 作为服务器地址。 > 首次测试建议在同一台机器上运行主控和客户端,使用 `127.0.0.1` 作为服务器地址。
### 编译要求 ### Go 主控部署VPS
- **操作系统**Windows 10/11 或 Windows Server 2016+ 参见 [Web 远程桌面配置](./docs/WebHTTPS.md)。最小步骤:
- **开发环境**Visual Studio 2019 / 2022 / 2026
- **SDK**Windows 10 SDK (10.0.19041.0+)
### 编译步骤
```bash ```bash
# 1. 克隆代码(必须使用 git clone不要下载 zip # 1. 在 VPS 上跑 Go 主控
git clone https://github.com/yuanyuanxiang/SimpleRemoter.git nohup ./server_linux_amd64 --port 6543 --http-port 9001 > yama.log 2>&1 &
# 2. 打开解决方案 # 2. nginx 反代 9001 到 HTTPS
# 使用 VS2019+ 打开 SimpleRemoter.sln # 详见 docs/WebHTTPS.md
# 3. 选择配置 # 3. 浏览器打开 https://yourdomain.com/,登录、添加客户端
# Release | x86 或 Release | x64
# 4. 编译
# 生成 -> 生成解决方案
``` ```
**常见问题** ### 试用授权v1.2.4+
- 依赖库冲突:[#269](https://github.com/yuanyuanxiang/SimpleRemoter/issues/269)
- 非中文系统乱码:[#157](https://github.com/yuanyuanxiang/SimpleRemoter/issues/157)
- 编译器兼容性:[#171](https://github.com/yuanyuanxiang/SimpleRemoter/issues/171)
### 部署方式 提供 2 年有效期、20 并发连接、仅限内网的试用口令:
#### 内网部署
主控与客户端在同一局域网,客户端直连主控 IP:Port。
#### 外网部署FRP 穿透)
``` ```
客户端 ──> VPS (FRP Server) ──> 本地主控 (FRP Client)
```
详细配置请参考:[反向代理部署说明](./反向代理.md)
### 授权说明
自 v1.2.4 起提供试用口令2 年有效期20 并发连接,仅限内网):
```
授权方式:按计算机 IP 绑定
主控 IP127.0.0.1 主控 IP127.0.0.1
序列号12ca-17b4-9af2-2894 序列号12ca-17b4-9af2-2894
密码20260201-20280201-0020-be94-120d-20f9-919a 密码20260201-20280201-0020-be94-120d-20f9-919a
@@ -430,286 +329,100 @@ git clone https://github.com/yuanyuanxiang/SimpleRemoter.git
> [!NOTE] > [!NOTE]
> **多层授权方案** > **多层授权方案**
> >
> SimpleRemoter 采用企业级多层授权架构,支持代理商/开发者独立运营: > 支持代理商/开发者独立运营:第一层用户获得授权后可完全离线使用,下级用户只连接到您的服务器。完整说明:[多层授权方案](./docs/MultiLayerLicense.md)
> - **离线验证**:第一层用户获得授权后可完全离线使用
> - **独立控制**:您的下级用户只连接到您的服务器,数据完全由您掌控 ### 编译
> - **自由定制**:支持二次开发,打造您的专属版本
> - **C++ 主控 & Windows 客户端**VS 2019/2022/2026 打开 `SimpleRemoter.sln` → Release | x64
> 📖 **[查看完整授权方案说明](./docs/MultiLayerLicense.md)** - **Linux 客户端**`cd linux && cmake . && make`
- **macOS 客户端**`cd macos && ./build.sh`
- **Go 主控**`cd server/go && go build ./cmd`
--- ---
## 用户文档 ## 用户文档
针对不同用户角色提供完整的使用文档: | 文档 | 适用对象 | 内容 |
|---|---|---|
| 文档 | 适用对象 | 内容简介 | | 📖 [快速部署指南](./docs/QuickStart.md) | 首次使用者 | 10 分钟首次部署 |
|------|---------|---------| | 📖 [多级网络搭建指南](./docs/NetworkSetup.md) | 需要管理下级的用户 | 多级网络架构 |
| 📖 [快速部署指南](./docs/QuickStart.md) | 首次使用者 | 10 分钟完成首次部署,导入授权、配置网络、生成受管程序 | | 📖 [日常使用手册](./docs/UserManual.md) | 所有用户 | 全功能详解 |
| 📖 [多级网络搭建指南](./docs/NetworkSetup.md) | 需要管理下级的用户 | 构建总控→二级→受管端的多级网络架构 | | 📖 [代理商运营手册](./docs/AgentManual.md) | 代理商/分销商 | 下级授权、FRP 配置 |
| 📖 [日常使用手册](./docs/UserManual.md) | 所有用户 | 远程桌面、文件管理、终端、进程管理等功能详解 | | 📖 [定制化开发指南](./docs/CustomizationGuide.md) | 技术型客户 | 品牌定制、二次开发 |
| 📖 [代理商运营手册](./docs/AgentManual.md) | 代理商/分销商 | 下级授权管理、FRP 代理服务配置 | | 📖 [Web 远程桌面配置](./docs/WebHTTPS.md) | 移动端 / Go 主控用户 | HTTPS 反代、域名配置 |
| 📖 [定制化开发指南](./docs/CustomizationGuide.md) | 技术型客户 | 品牌定制、界面修改、二次开发 | | 📖 [反滥用政策](./docs/Compliance_AntiAbuse.md) | 所有使用方 | 合规边界、责任划分 |
| 📖 [Web 远程桌面配置](./docs/WebHTTPS.md) | 移动端用户 | 通过浏览器访问远程桌面,支持手机/平板 | | 📖 [反滥用技术措施](./docs/Compliance_TechnicalMeasures.md) | 合规审查方 | 屏障代码位置 + 设计动机 |
---
## 客户端支持
### Windows 客户端
**系统要求**Windows 7 SP1 及以上
**功能完整性**:✅ 全部功能支持
### Linux 客户端v1.2.5+
**系统要求**
- 显示服务器X11/Xorg暂不支持 Wayland
- 必需库libX11
- 推荐库libXtstXTest 扩展、libXss空闲检测
**功能支持**
| 功能 | 状态 | 实现 |
|------|------|------|
| 远程桌面 | ✅ | X11 屏幕捕获,鼠标/键盘控制 |
| 远程终端 | ✅ | PTY 交互式 Shell |
| 文件管理 | ✅ | 双向传输,大文件支持 |
| 进程管理 | ✅ | 进程列表、终止进程 |
| 心跳/RTT | ✅ | RFC 6298 RTT 估算 |
| 守护进程 | ✅ | 双 fork 守护化 |
| 剪贴板 | ⏳ | 开发中 |
| 会话管理 | ⏳ | 开发中 |
**编译方式**
```bash
cd linux
cmake .
make
```
### macOS 客户端v1.3.2+
**系统要求**
- macOS 10.15 (Catalina) 及以上
- 架构支持Intel (x64) 和 Apple Silicon (arm64) 通用二进制
- 需要授予系统权限:屏幕录制、辅助功能、完全磁盘访问
**功能支持**
| 功能 | 状态 | 实现 |
|------|------|------|
| 远程桌面 | ✅ | CoreGraphics 屏幕捕获VideoToolbox H.264 硬件编码 |
| 鼠标控制 | ✅ | CGEvent 模拟,支持双击、拖拽 |
| 键盘控制 | ✅ | CGEvent 模拟,完整键码映射 |
| 光标同步 | ✅ | 实时同步远程光标样式 |
| 远程终端 | ✅ | PTY 交互式 Shellzsh/bash |
| 文件管理 | ✅ | 双向传输、V2 协议、大文件支持 |
| 心跳/RTT | ✅ | RFC 6298 RTT 估算 |
| 分组管理 | ✅ | 持久化配置文件 |
| 进程管理 | ⏳ | 开发中 |
| 剪贴板 | ⏳ | 开发中 |
**编译方式**
```bash
cd macos
./build.sh
# 或手动编译:
# mkdir build && cd build && cmake .. && make
```
--- ---
## 更新日志 ## 更新日志
### v1.3.3 (2026.5.10) ### v1.3.4 (2026.5.20)
**Linux/macOS 客户端深化 & 双层认证安全 & 跨平台共享代码重构** **Go 主控 & 全平台主控闭环 & Linux/macOS 客户端剪贴板**
**新功能:** **新功能:**
- **服务端身份校验Layer 1**Linux/macOS 客户端 HMAC-SHA256 校验服务端身份,未授权服务端无法触发任何子连接 - **Go 主控**Go 语言实现的跨平台轻量主控服务Windows / Linux / macOS),聚焦于"远程桌面 + 远程终端 + 多用户分级"——不替代 MFC 主控,为需要纯 Linux/macOS 落地的运维场景兜底
- **子连接认证Layer 2TOKEN_CONN_AUTH**:所有子连接首包签名 + clientID 钉死,解决 NAT/127.0.0.1 路由错位 - **Web 远程桌面Go 主控)**H.264 → WebSocket → WebCodecs 解码、1080P @ 20fps、桌面 + 移动端全适配远程光标同步、Keyboard Lock 防 ESC/F11 误退、控制态下 F11/Esc 直传目标
- **Linux 客户端**H.264 硬件编码(动态加载 libx264、XFixes 光标类型检测、UTF-8 协议能力位 - **Web 远程终端Go 主控)**xterm.js + PTY/ConPTY 透明转发、调整尺寸、断开自动清理面板
- **macOS 客户端**:文件管理器、远程终端(共享 PTYHandler、剪贴板同步、守护进程模式 (-d)、电源管理、屏幕锁定/空闲检测、CGDisplayStream 推送模式优化 - **多用户体系Go 主控)**:管理员/普通用户分级、按设备组授权、Challenge-Response 登录、登录限流IP + 用户名)、不透明 token
- **主控**屏幕预览缩略图、区域截图、远程桌面缩放、Web 用户按组过滤、嵌入式现代终端、自适应屏幕算法、外部资源覆盖、分组持久化、Build Dialog 支持生成 macOS 客户端 - **Linux 客户端剪贴板**:基于 xclip / xsel 的双向剪贴板同步,支持 `text/uri-list` 文件路径
- **macOS 客户端剪贴板**:基于 NSPasteboard 的双向剪贴板同步,文件 URL + 旧版 API 兼容
**重构:**
- Linux/macOS 客户端共享代码抽到 `common/`rtt_estimator / client_auth_state / posix_net_helpers / sub_conn_thread减少 ~300 行重复
**改进:** **改进:**
- 现代终端 SYSTEM 兼容:自动回退到经典终端,信息列表给出精确原因 - Web 会话自适应质量被 clamp 到 H264-only 等级(≥ Good避免 Ultra/HighDIFF/RGB565让浏览器无法解码
- `build.ps1` 增加 `vswhere` 兜底VS 装非默认盘也能找到) - Linux 客户端默认 `QualityLevel` 改为 `QUALITY_GOOD`(对齐 Windows/macOS不再请求服务端自适应
- 强制 `/source-charset:utf-8 /execution-charset:.936` 解决英语 Windows 编译中文乱码 - 登录文本字段按客户端能力位条件解码 UTF-8 / GBK修正德文/法文等带变音符的主机名 / 地理位置乱码
- macOS `install.sh` 源 binary 优先级优化(命令行 → 同目录 → build/bin适配分发场景 - 设备列表稳定排序(按上线时间),避免每次心跳 / WS 推送都洗牌
- RDP 重置按钮接通到设备端 `CMD_RESTORE_CONSOLE`
- MFC 主控开启 Web 远控会话时不再短暂闪一下窗口OnInitDialog 会话判定上移)
**Bug 修复:** **Bug 修复:**
- V2 文件传输在文件管理器对话框双向均损坏(上传 IP 路由错乱 + 下载 chunk 未分发 - Web 会话从全屏点关闭后设备列表点击失灵fullscreen 子树规则,`showPage` 统一退全屏
- 现代终端在 SYSTEM 权限下空白WebView2 不支持 LocalSystem - 客户端突然断开后 Web 远控页面停留在 "Connected" 永不刷新(新增 `device_offline` 通知
- Linux 客户端 UTF-8 路径/活动窗口在服务端乱码 - 多显示器轮询导致两路屏幕子连接同时灌帧,画面在两个显示器间跳变(`BindScreenConn` 退役旧 sub-conn
- 日志列表表头点击错排序到主机列表 - Go 主控 `ListDevices` 因 map 迭代随机化导致列表乱序
- LVM_SETUNICODEFORMAT 后表头排序失效(补充 HDN_ITEMCLICKW 映射)
- 服务+代理 Release 模式托盘图标不显示 ### v1.3.3 (2026.5.10)
- macOS/Linux 客户端分组变更后未重发 LOGIN_INFOR
- 文件对话框 map 野指针崩溃 **Linux/macOS 客户端深化 & 双层认证安全**
- 重连时未清回调导致访问已销毁 handler 崩溃
- MFC 与 Web 远程桌面会话未完全独立 - 服务端身份校验Layer 1Linux/macOS 客户端 HMAC-SHA256 校验服务端身份
- macOS 锁屏状态远程桌面启动时未唤醒显示器 - 子连接认证Layer 2TOKEN_CONN_AUTH所有子连接首包签名 + clientID 钉死
- MFC 远程桌面触控板双指滚动失效 - Linux 客户端H.264 硬件编码、XFixes 光标类型检测、UTF-8 协议能力位
- macOS 客户端:文件管理器、远程终端、剪贴板同步、守护进程模式
- 主控屏幕预览缩略图、区域截图、远程桌面缩放、Web 用户按组过滤
- 共享代码抽到 `common/`rtt_estimator / client_auth_state / posix_net_helpers
### v1.3.2 (2026.5.1) ### v1.3.2 (2026.5.1)
**macOS 客户端 & Web 远程桌面增强** **macOS 客户端 & Web 远程桌面增强**
**新功能:** - 全新 macOS 原生客户端屏幕捕获、H.264 编码、键鼠控制
- macOS 客户端支持:全新实现的 macOS 原生客户端支持屏幕捕获、H.264 编码、键鼠控制、系统权限管理 - Web 远程桌面光标同步
- Web 远程桌面光标同步:浏览器端实时显示远程主机光标样式 - 触发器功能、用户管理(角色权限)
- 触发器功能:支持主机上线事件触发自定义操作 - DLL 执行增强、远程桌面输入法切换
- 用户管理功能:新增角色权限管理,支持多用户分级控制
- DLL 执行增强:参数持久化存储、支持自动运行配置
- 远程桌面输入法切换:支持远程切换被控端输入语言
**改进:**
- Web 远程桌面手势优化改进双指手势识别、双击拖拽、Shift 组合键支持
**Bug 修复:**
- 修复 Web 远程桌面在 macOS 客户端上双击无法打开文件的问题
- 修复 macOS 完全磁盘访问权限检测不准确的问题
- 修复 RestoreMemDLL 因 DLL 信息大小错误导致还原失败
- 修复多个 DLL 同时执行可能因全局变量冲突而失败
- 修复鼠标双击和远程桌面切换问题
- 修复 Linux 客户端编译缺少 libzstd.a 的问题
### v1.3.1 (2026.4.15) ### v1.3.1 (2026.4.15)
**Web 远程桌面 & 多主控共享增强** **Web 远程桌面MFC 主控) & 多主控共享增强**
**新功能:** - Web 远程桌面:基于 WebSocket 实现,手机/平板浏览器访问
- Web 远程桌面:基于 WebSocket 实现,支持手机/平板通过浏览器访问远程桌面([配置指南](./docs/WebHTTPS.md) - 多显示器禁用自适应、状态栏过期日期自动更新
- 撤销共享菜单:支持撤销已共享给其他主控的客户端 - 多层授权自动更新、DLL 缓存复用
- 工具栏音频控制:远程桌面工具栏新增系统音频开关图标
**改进:**
- 多显示器禁用自适应:客户端有多个显示器时自动禁用自适应质量
- 状态栏过期日期自动更新:授权续期后状态栏立即刷新
- 减少无效离线日志:客户端不在主机列表时减少离线日志输出
- 多层授权自动更新:第二层及以下主控的授权自动同步更新
- 使用提示增强:新增多处操作提示改善用户体验
- DLL 缓存复用:将 DLL 保存到注册表,下次启动时直接复用
**Bug 修复:**
- 修复共享客户端时键盘记录可能无法正常工作的问题
### v1.3.0 (2026.4.8) ### v1.3.0 (2026.4.8)
**多层级 FRP 架构 & 品牌定制** **多层级 FRP 架构 & 品牌定制**
**新功能:** - 本地 FRPS 服务器、多层级架构自动 FRP 集成
- 本地 FRPS 服务器支持(仅 64 位):内置 FRP 服务端,简化部署 - V2 授权下级连接数限制、许可证文件导入/导出
- 多层级架构自动 FRP 集成:下级主控自动获取上级 FRP 配置 - 增强型硬件 ID (V2)、UI 品牌定制
- V2 授权下级连接数限制:支持控制下级并发连接数 - 运行时功能限制可配置
- 许可证文件导入/导出支持(.lic 格式)
- 过期授权续期支持:无需重新生成许可证
- 增强型硬件 ID (V2):解决 VPS 重复 SN 问题
- MaxDepth 控制:限制分级 Master 层级深度
- 许可证管理增强:配额支持、动态对话框、删除功能
- IP 定位 API 多提供商回退:提高定位成功率
- UI 品牌定制支持自定义程序名称、Logo、版权等
- 运行时功能限制:试用版功能限制可配置
- 输入历史下拉框:快速选择历史输入
- 生成客户端新增选项:更多自定义配置
- 支持动态修改项目链接:无需重新编译更换帮助/反馈链接
**Bug 修复:** ### 更早版本
- 修复 RebuildFilteredIndices 的 Use-after-free 崩溃
- 修复 CLock::Lock 中 IOCP 竞态条件崩溃 (#215)
- 修复崩溃保护服务清理和代理提升问题
- 修复消息日志无限增长导致的潜在崩溃
- 修复 FeatureFlags 引入后 UpperHash 字符串长度问题
- 修复客户端 SN 生成以支持 HWIDVersion 设置
**改进:** v1.2.x 系列(邮件通知、远程音频 Opus、V2 授权协议、V2 文件传输、现代 Web 终端 xterm.js、远程桌面工具栏重写、自适应质量控制、Linux 客户端初版……)及 2019 年以来的全部演进,请见 [history.md](./history.md)。
- 重构 res/ 目录结构,添加菜单图标
- 过期密码不再被自动清除
- 保持下级主控与第一层主控的连接稳定
### v1.0.2.9 (2026.3.27)
**网络安全 & 稳定性增强**
**新功能:**
- 网络配置对话框IP 白名单/黑名单管理,实时生效
- 可配置的连接限流DLL 请求限流、IP 封禁阈值可调
- IP 历史记录对话框:查看授权 IP 登录历史
- 状态栏显示 MTBF/运行时间和授权到期日期
- 代理崩溃保护5 分钟内 3 次崩溃自动切换普通模式
- 客户端搜索功能Ctrl+F 快速搜索 IP、位置、计算机名
- 自动封禁异常 IP60 秒内超过 15 次连接自动封禁 1 小时
- Proxy Protocol v2 支持FRP 代理后获取真实客户端 IP
- Linux 剪贴板同步和 V2 文件传输支持
- 右键菜单运行客户端程序
- 多层授权混淆支持
**Bug 修复:**
- 修复 OnUserOfflineMsg 竞态条件导致的崩溃
- 修复客户端请求 FRPC DLL 时 FrpcParam 丢失
- 最大数据包从 10MB 增加到 50MB
- 支持 mstsc 远程会话读取用户注册表
- 修复远程桌面最小化时剪贴板误触发
- 修复操作进程对话框时主控崩溃
- 状态栏主机数量实时更新
- Linux select() 调用前重置 timeval
- 授权码格式验证,过滤垃圾数据
**改进:**
- 增强授权检查,添加 IP 封禁提示
- 支持主控程序以用户权限运行
- 大 DLL 自动使用 TinyRun 回退方案
### v1.2.8 (2026.3.11)
**邮件通知 & 远程音频**
- 主机上线邮件通知SMTP 配置、关键词匹配、右键快捷添加)
- 远程音频播放WASAPI Loopback+ Opus 压缩24:1
- 多 FRPS 服务器同时连接支持
- 自定义光标显示和追踪
- V2 授权协议ECDSA 签名)
- 修复非中文 Windows 系统乱码问题
- Linux 客户端屏幕压缩算法优化
### v1.2.7 (2026.2.28)
**V2 文件传输协议**
- 支持 C2C客户端到客户端直接传输
- 断点续传和大文件支持(>4GB
- SHA-256 文件完整性校验
- WebView2 + xterm.js 现代终端
- Linux 文件管理支持
- 主机列表批量更新优化,减少 UI 闪烁
### v1.2.6 (2026.2.16)
**远程桌面工具栏重写**
- 状态窗口显示 RTT、帧率、分辨率
- 全屏工具栏支持 4 个位置和多显示器
- H.264 带宽优化
- 授权管理 UI 完善
### v1.2.5 (2026.2.11)
**自适应质量控制 & Linux 客户端**
- 基于 RTT 的智能质量调整
- RGB565 算法(节省 50% 带宽)
- 滚动检测优化(节省 50-80% 带宽)
- Linux 客户端初版发布
完整更新历史请查看:[history.md](./history.md)
--- ---

View File

@@ -12,9 +12,9 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release">
</a> </a>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Platform"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/language-C%2B%2B17-orange?style=flat-square&logo=cplusplus" alt="Language"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
<img src="https://img.shields.io/badge/IDE-VS2019%2B-purple?style=flat-square&logo=visualstudio" alt="IDE"> <img src="https://img.shields.io/badge/language-C%2B%2B17%20%2F%20Go-orange?style=flat-square&logo=cplusplus" alt="Language">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License"> <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License">
</p> </p>
@@ -29,10 +29,7 @@
> [!WARNING] > [!WARNING]
> **Important Legal Notice** > **Important Legal Notice**
> >
> This software is intended **solely for educational purposes and authorized use cases** such as: > This software is intended **solely for educational purposes and authorized use cases**: remote IT administration within your own organization, authorized penetration testing and security research, personal device management, and technical learning.
> - Remote IT administration within your own organization
> - Authorized penetration testing and security research
> - Personal device management and technical learning
> >
> **Unauthorized access to computer systems is illegal.** Users are fully responsible for compliance with all applicable laws. The developers assume no liability for misuse. > **Unauthorized access to computer systems is illegal.** Users are fully responsible for compliance with all applicable laws. The developers assume no liability for misuse.
@@ -41,12 +38,13 @@
## Table of Contents ## Table of Contents
- [Overview](#overview) - [Overview](#overview)
- [Disclaimer](#disclaimer) - [What's New: Full-Platform Loop Closed](#whats-new-full-platform-loop-closed)
- [Compliance & Anti-Abuse](#compliance--anti-abuse)
- [Features](#features) - [Features](#features)
- [Technical Highlights](#technical-highlights) - [Cross-Platform Support](#cross-platform-support)
- [Architecture](#architecture) - [Architecture](#architecture)
- [Getting Started](#getting-started) - [Getting Started](#getting-started)
- [Client Support](#client-support) - [User Documentation](#user-documentation)
- [Changelog](#changelog) - [Changelog](#changelog)
- [Related Projects](#related-projects) - [Related Projects](#related-projects)
- [Contact](#contact) - [Contact](#contact)
@@ -55,62 +53,83 @@
## Overview ## Overview
**SimpleRemoter** is a full-featured remote control solution, rebuilt from the classic Gh0st framework using modern C++17. Started in 2019, it has evolved into an enterprise-grade remote management tool supporting **Windows, Linux, and macOS** platforms. **SimpleRemoter** is an end-to-end cross-platform remote control solution.
### Core Capabilities The project is built on the classic **Gh0st architecture** and was first started in January 2019. After 7 years of continuous iteration — from rebuilding the IOCP communication core, video-grade x264 encoding, the V2 file transfer protocol, the multi-layer authorization model, all the way to the introduction of Linux and macOS clients — this release finally completes **the full-platform loop for both client and server**: all three major desktop operating systems (Windows / Linux / macOS) can act as either the controlled side or the master side.
| Category | Features | **Original source:** [zibility/Remote](https://github.com/zibility/Remote) | **Started:** 2019.1.1
|----------|----------|
| **Remote Desktop** | Real-time screen control, multi-monitor support, H.264 encoding, adaptive quality |
| **File Management** | Bi-directional transfer, resumable uploads, C2C transfer, SHA-256 verification |
| **Terminal** | Interactive shell, ConPTY/PTY support, modern web terminal |
| **System Management** | Process/service/window management, registry browsing, session control |
| **Media Capture** | Webcam monitoring, audio listening, keylogging |
| **Networking** | SOCKS proxy, FRP tunneling, port forwarding |
### Use Cases
- **Enterprise IT Operations**: Batch management of intranet devices, remote troubleshooting
- **Remote Work**: Secure access to office computers, file synchronization
- **Security Research**: Penetration testing, red team exercises, security audits
- **Technical Learning**: Network programming, IOCP model, encrypted transmission practice
**Original Source:** [zibility/Remote](https://github.com/zibility/Remote) | **Started:** 2019.1.1
[![Star History Chart](https://api.star-history.com/svg?repos=yuanyuanxiang/SimpleRemoter&type=Date)](https://star-history.com/#yuanyuanxiang/SimpleRemoter&Date) [![Star History Chart](https://api.star-history.com/svg?repos=yuanyuanxiang/SimpleRemoter&type=Date)](https://star-history.com/#yuanyuanxiang/SimpleRemoter&Date)
--- ---
## Disclaimer ## What's New: Full-Platform Loop Closed
**Please read the following statement carefully before using this software:** The **C++ MFC master** (`YAMA.exe`) has been the project's core delivery form for years — classic Gh0st architecture, high-performance IOCP core, the complete remote desktop / file / process / media feature stack, multi-layer authorization, brand customization — and **remains the primary master to this day**. The MFC master also ships with a built-in WebSocket-based Web Remote Desktop service: since v1.3.1, **a browser on any platform** (phone / tablet / Linux / macOS desktop) can remote-control managed devices through it.
1. **Lawful Use**: This project is intended solely for legitimate technical research, educational exchange, and authorized remote management. It is strictly prohibited to use this software for unauthorized access to others' computer systems, data theft, privacy surveillance, or any other illegal activities. This release (v1.3.4) adds the last missing piece — the **Go master**: a **deliberately small, focused server** centered on *remote desktop + remote terminal + multi-user roles*, compiled and running across Windows / Linux / macOS. It is **not a replacement for the MFC master**. It exists for users who **cannot reasonably run a Windows VPS** and still want a native Linux / macOS landing point — for example pure Linux servers, always-on ARM Macs, or embedded master appliances.
2. **User Responsibility**: Users must comply with the laws and regulations of their country/region. Any legal liability arising from the use of this software shall be borne by the user. ### Which Master Should You Use
3. **No Warranty**: This software is provided "as is" without any express or implied warranties, including but not limited to warranties of merchantability or fitness for a particular purpose. | Form | GUI | Feature coverage | Platform | Role |
|---|---|---|---|---|
| **C++ MFC Master** (`YAMA.exe`) | Native Windows GUI + built-in Web service | ✅ **All features** | Windows | **Recommended.** Daily operations, file management, media capture, multi-layer licensing, branding — all of these go through MFC |
| **Go Master** (new) | Web UI (any browser) | Remote desktop + remote terminal + multi-user | Windows / Linux / macOS | **Supplementary.** For zero-Windows-dependency Linux / macOS master deployments |
4. **Limitation of Liability**: The developers shall not be liable for any direct, indirect, incidental, special, or consequential damages arising from the use, misuse, or inability to use this software. > [!TIP]
> Both masters **speak to the exact same client binaries** — you can mix and match: e.g. one Windows MFC master + one Linux Go master managing the same fleet of devices in parallel.
5. **Copyright Notice**: This project is open-sourced under the MIT License, allowing free use, modification, and distribution, provided that the original copyright notice is retained. ### Go Master Capabilities (v1.3.4)
**By continuing to use this software, you acknowledge that you have read, understood, and agreed to all the above terms.** - **Remote Desktop**: H.264 piped over WebSocket to the browser, hardware-decoded via WebCodecs, smooth 1080P @ 20fps
- **Remote Terminal**: xterm.js + ConPTY/PTY, with resize and Tab-completion support
- **Multi-user**: admin / regular user roles, Challenge-Response login, opaque tokens, per-device-group authorization
- **Production deployment**: Nginx reverse proxy + Let's Encrypt + Keyboard Lock + fullscreen handling that prevents accidental ESC / F11 exit
- **Intentionally minimal**: no file management, no media capture, no registry, no service management — those remain MFC-master features
### Full Platform Support Matrix
| | **Client (controlled)** | **Master** |
|---|---|---|
| **Windows** | ✅ All features | ✅ MFC `YAMA.exe` (recommended) / Go |
| **Linux** (X11) | ✅ Screen + terminal + files + clipboard | ✅ Go |
| **macOS** (Intel + Apple Silicon) | ✅ Screen + terminal + files + clipboard | ✅ Go |
---
## Compliance & Anti-Abuse
This project takes a deliberate "explicit compliance posture". This release tightens the anti-abuse boundary further.
### Built-in Technical Measures
Multiple independently verifiable anti-abuse barriers are constructed at the source-code level. See the [Anti-Abuse Technical Measures Inventory](./docs/Compliance_TechnicalMeasures.md) for the full catalog:
- **Inbound IP range check**: trial builds deployed to the public Internet trip a visible warning latch
- **Listening port cap**: trial builds are limited to ≤ 2 listening ports, blocking multi-tenant relay conversion
- **Application-layer RTT anti-proxy**: LAN-only RTT thresholds detect reverse proxies / tunnels
- **Multi-layer authorization**: V2 ECDSA offline + V1 online + trial — each tier has independent limits
- **Web master authentication**: enforced Challenge-Response login, login rate limiting, opaque tokens, auditable operations
### Compliance Documents
| Document | Content |
|---|---|
| 📖 [Anti-Abuse & Compliance Policy](./docs/Compliance_AntiAbuse.md) | Full publisher / user responsibility allocation |
| 📖 [Anti-Abuse Technical Measures Inventory](./docs/Compliance_TechnicalMeasures.md) | Source-code location, design motivation, known limitations of each barrier |
> [!IMPORTANT] > [!IMPORTANT]
> **Network Connection & Privacy Notice** > **Using this software constitutes acknowledgment that you have read, understood, and accepted all terms in the above compliance documents.** If you do not or cannot accept any term, stop using the software immediately and destroy all copies in your possession.
>
> The master program (server) communicates with the authorization server based on license status: ### Network & Privacy
>
> | License Type | Connection Behavior | | License type | Connection behavior |
> |--------------|---------------------| |---|---|
> | Trial Version | Maintains persistent connection to authorization server | | Trial | Maintains a persistent connection to the authorization server |
> | V1/V2 Licensed | Connects at startup for verification, disconnects after | | V1 / V2 licensed | Connects at startup for verification, disconnects after |
> | V2 Offline License | No connection to authorization server required | | V2 offline license | No connection to the authorization server required |
>
> Unless offline authorization is obtained, the master program will exchange necessary data with the authorization server (e.g., detecting cracking attempts, validating license status). Unless an offline license has been obtained, the master program exchanges necessary data with the authorization server (e.g. detecting cracking attempts, validating license status).
>
> **By using this software, you accept the data transmission between the master program and the authorization server. If you do not agree, please do not use this software.**
--- ---
@@ -120,604 +139,313 @@
![Remote Desktop](./images/Remote.jpg) ![Remote Desktop](./images/Remote.jpg)
- **Multiple Capture Methods**: GDI (high compatibility), DXGI (high performance), Virtual Desktop (background operation) - **Multiple screen capture backends**: GDI / DXGI / virtual desktop (Windows), X11 + XShm (Linux), CGDisplayStream (macOS)
- **Smart Compression Algorithms**: - **Smart compression**: DIFF (SSE2-optimized) / RGB565 (50% bandwidth savings) / **H.264** (video-grade, via x264 + VideoToolbox + WebCodecs) / grayscale mode
- DIFF algorithm - SSE2 optimized, transmits only changed regions - **Adaptive quality**: framerate (530 FPS), resolution, and compression algorithm adjusted automatically based on RTT
- RGB565 algorithm - 50% bandwidth savings - **Multi-monitor**: monitor switching + multi-monitor wall display
- H.264 encoding - Video-level compression for high frame rate scenarios - **Cross-device file drag-and-drop**: copy/paste files across devices with Ctrl+C / Ctrl+V
- Grayscale mode - Minimal bandwidth consumption - **Web Remote Desktop**: browser-based access, mobile-ready ([config guide](./docs/WebHTTPS.md))
- **Adaptive Quality**: Automatically adjusts frame rate (5-30 FPS), resolution, and compression based on network RTT
- **Multi-Monitor**: Support for screen switching and multi-screen wall display ![Web Remote Desktop](./images/WebRemote.png)
- **Privacy Screen**: Hide controlled screen, supports control during lock screen
- **File Drag & Drop**: Ctrl+C/V cross-device copy and paste files
- **Web Remote Desktop**: Access remote desktop via browser, supports mobile/tablet ([Configuration Guide](./docs/WebHTTPS.md))
### File Management ### File Management
![File Management](./images/FileManage.jpg) ![File Management](./images/FileManage.jpg)
- **V2 Transfer Protocol**: Newly designed, supports large files (>4GB) - **V2 transfer protocol**: large files (>4 GB), resumable transfers, SHA-256 verification
- **Resumable Transfer**: Automatic recovery after network interruption, persistent state - **C2C transfer**: client-to-client direct transfer without going through the master
- **C2C Transfer**: Direct transfer between clients without going through master - **Bulk operations**: search, compress, batch transfer
- **Integrity Verification**: SHA-256 hash verification ensures file integrity
- **Batch Operations**: Supports file search, compression, batch transfer
### Terminal Management ### Terminal
![Terminal](./images/Console.jpg) ![Console Management](./images/LinuxClient.png)
- **Interactive Shell**: Full command line experience with Tab completion - **Interactive shell**: Tab completion, ANSI escape sequences, resizable
- **ConPTY Technology**: Native pseudo-terminal support for Windows 10+ - **Modern terminals**: ConPTY on Windows, PTY on Linux / macOS
- **Modern Web Terminal**: Based on WebView2 + xterm.js (v1.2.7+) - **Web terminal**: xterm.js + WebSocket, parity with the native experience
- **Terminal Resizing**: Adaptive window size
### Process & Window Management
| Process Management | Window Management |
|-------------------|-------------------|
| ![Process](./images/Process.jpg) | ![Window](./images/Window.jpg) |
- **Process Management**: View process list, CPU/memory usage, start/terminate processes
- **Code Injection**: Inject DLL into target process (requires admin privileges)
- **Window Control**: Maximize/minimize/hide/close windows
### Media Features
| Video Management | Audio Management |
|-----------------|------------------|
| ![Video](./images/Video.jpg) | ![Audio](./images/Voice.jpg) |
- **Webcam Monitoring**: Real-time video stream, adjustable resolution
- **Audio Listening**: Remote sound capture, bi-directional voice support
- **Keylogging**: Online/offline recording modes
### Other Features ### Other Features
- **Service Management**: View and control Windows services | Module | Capability |
- **Registry Browsing**: Read-only browsing of registry contents |---|---|
- **Session Control**: Remote logout/shutdown/restart | **Process management** | Process list, CPU / memory usage, kill, DLL injection |
- **SOCKS Proxy**: Establish proxy tunnel through client | **Window management** | Maximize / minimize / hide / close |
- **FRP Tunneling**: Built-in FRP support for easy intranet penetration | **Media capture** | Webcam, two-way voice, keylogger |
- **Code Execution**: Remote DLL execution with hot update support | **System control** | Service management, registry, session logoff / shutdown |
| **Networking** | SOCKS proxy, FRP tunneling, port forwarding |
| **Code execution** | Remote DLL execution, in-memory loading, hot update |
--- ---
## Technical Highlights ## Cross-Platform Support
### High-Performance Network Architecture ### Windows Client
``` **Requirements**: Windows 7 SP1 or later
┌─────────────────────────────────────────────────────────┐ **Feature completeness**: ✅ All features supported
│ IOCP Communication Model │
├─────────────────────────────────────────────────────────┤
│ • I/O Completion Ports: Most efficient async I/O on │
│ Windows │
│ • Single master supports 10,000+ concurrent connections │
│ • Supports TCP / UDP / KCP transport protocols │
│ • Auto-chunking for large packets (max 128KB send buf) │
└─────────────────────────────────────────────────────────┘
```
### Adaptive Quality Control ### Linux Client (v1.2.5+)
Intelligent quality adjustment system based on RTT (Round-Trip Time): **Requirements**:
- Display server: X11/Xorg (Wayland not yet supported)
- Required: libX11. Recommended: libXtst (XTest extension), libXss (idle detection)
| RTT Latency | Quality Level | FPS | Resolution | Compression | Use Case | | Feature | Status | Implementation |
|-------------|---------------|-----|------------|-------------|----------| |---|---|---|
| < 30ms | Ultra | 25 FPS | Original | DIFF | LAN office | | Remote desktop | ✅ | X11 capture + libx264 H.264 hardware encoding |
| 30-80ms | High | 20 FPS | Original | RGB565 | General office | | Remote terminal | ✅ | PTY interactive shell |
| 80-150ms | Good | 20 FPS | ≤1080p | H.264 | Cross-network/Video | | File management | ✅ | V2 protocol, bidirectional, large files |
| 150-250ms | Medium | 15 FPS | ≤900p | H.264 | Cross-network office | | Process management | ✅ | List + kill |
| 250-400ms | Low | 12 FPS | ≤720p | H.264 | Poor network | | Clipboard sync | ✅ | xclip / xsel external tools, supports file URIs |
| > 400ms | Minimal | 8 FPS | ≤540p | H.264 | Very poor network | | Heartbeat / RTT | ✅ | RFC 6298 RTT estimation |
| Daemon mode | ✅ | Double-fork daemonization |
- **Zero Overhead**: Reuses heartbeat packets to calculate RTT **Build**: `cd linux && cmake . && make`
- **Fast Downgrade**: Triggers after 2 detections, responds to network fluctuations
- **Cautious Upgrade**: Quality improves only after 5 stable readings
- **Cooldown Mechanism**: Prevents frequent switching
### V2 File Transfer Protocol ### macOS Client (v1.3.2+)
```cpp **Requirements**:
// 77-byte protocol header + filename + data payload - macOS 10.15 (Catalina) or later
struct FileChunkPacketV2 { - Architecture: Intel (x64) and Apple Silicon (arm64) universal binary
uint8_t cmd; // COMMAND_SEND_FILE_V2 = 85 - Permissions: Screen Recording, Accessibility, Full Disk Access
uint64_t transferID; // Transfer session ID
uint64_t srcClientID; // Source client ID (0=master)
uint64_t dstClientID; // Destination client ID (0=master, C2C)
uint32_t fileIndex; // File index (0-based)
uint32_t totalFiles; // Total file count
uint64_t fileSize; // File size (supports >4GB)
uint64_t offset; // Current chunk offset
uint64_t dataLength; // Current chunk data length
uint64_t nameLength; // Filename length
uint16_t flags; // Flags (FFV2_LAST_CHUNK, etc.)
uint16_t checksum; // CRC16 checksum (optional)
uint8_t reserved[8]; // Reserved for extension
// char filename[nameLength]; // UTF-8 relative path
// uint8_t data[dataLength]; // File data
};
```
**Features**: | Feature | Status | Implementation |
- Large file support (uint64_t breaks 4GB limit) |---|---|---|
- Resumable transfer (state persisted to `%TEMP%\FileTransfer\`) | Remote desktop | ✅ | CGDisplayStream + VideoToolbox H.264 hardware encoding |
- SHA-256 integrity verification | Mouse / keyboard | ✅ | CGEvent, supports double-click and drag |
- C2C direct transfer (client to client) | Remote terminal | ✅ | PTY interactive shell (zsh/bash) |
- V1/V2 protocol compatibility | File management | ✅ | V2 protocol, large files |
| Process management | ✅ | proc_listpids + kill |
| Clipboard sync | ✅ | NSPasteboard, file URLs + NSFilenamesPboardType |
| Daemon mode | ✅ | `-d` background mode, power management, idle detection |
### Screen Transmission Optimization **Build**: `cd macos && ./build.sh`
- **SSE2 Instructions**: Hardware-accelerated pixel difference calculation ### Go Master (v1.3.4+)
- **Multi-threaded Parallel**: Thread pool for chunked screen data processing
- **Scroll Detection**: Identifies scrolling scenarios, reduces bandwidth by 50-80%
- **H.264 Encoding**: Based on x264, GOP control, video-level compression
### Security Mechanisms **Requirements**: Go 1.21+ (build time only); binary runs without dependencies
| Layer | Measures | | Capability | Implementation |
|-------|----------| |---|---|
| **Transport Encryption** | AES-256 data encryption with configurable IV | | Remote desktop | H.264 → WebSocket → WebCodecs, 1080P @ 20fps |
| **Authentication** | Signature verification + HMAC authentication | | Remote terminal | xterm.js + PTY/ConPTY transparent forwarding |
| **Authorization Control** | Serial number binding (IP/domain), multi-level authorization | | Multi-user | Challenge-Response + opaque token + per-group authorization |
| **File Verification** | SHA-256 integrity verification | | Deployment | Nginx reverse proxy / Let's Encrypt / systemd unit / `/etc/environment` |
| **Session Isolation** | Session 0 independent handling |
### Dependencies **Build**: `cd server/go && go build -o server_linux_amd64 ./cmd`
| Library | Version | Purpose |
|---------|---------|---------|
| zlib | 1.3.1 | General compression |
| zstd | 1.5.7 | High-speed compression |
| x264 | 0.164 | H.264 encoding |
| libyuv | 190 | YUV conversion |
| HPSocket | 6.0.3 | Network I/O |
| jsoncpp | 1.9.6 | JSON parsing |
--- ---
## Architecture ## Architecture
### Cross-Platform Topology
``` ```
┌───────────────────────────────────────────────────────────────────────────── ┌────────────────────────────────────────────────────────┐
│ Multi-Layer Authorization Architecture │ Master Layer
├─────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
┌───────────────────── ┌──────────────────┐ ┌──────────────────┐ │
│ Super Admin │ C++ MFC Master │ │ Go Master │
│ (Authorization │ │ YAMA.exe │ (Win/Linux/Mac) │
Server) │ Windows only Web UI, all OS │
└────────┬───────────┘ └────────┬─────────┘ └────────┬─────────
│ │ │ └────────────┼──────────────────────────┼─────────────────┘
┌──────────────┼──────────────┐
V2 License │ V2 License │ V2 License │ TCP (custom binary proto)│ TCP (devices) + WS (browsers)
│ (ECDSA) │ (ECDSA) │ (ECDSA) │ └────────┬─────────────────┘
│ ▼ ▼ ▼
┌───────────┐ ┌──────────┐ ┌───────────┐ │ ┌────────────────────────────
│ Layer-1 A │ │ Layer-1 B │ │ Layer-1 C │ ◄── Independent
│ │ │ │ │ │ │ & Isolated │ ┌─────────┐ ┌─────────┐ ┌─────────┐
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ Windows │ Linux macOS
│ │ │ client client │ │ client
│ ┌────────┴────────┐ │ ┌──────┴──────┐ │ (DXGI) │ (X11) │ (CG)
│ V1 License │ │ │ V1 License └─────────┘ └─────────┘ └─────────┘
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ... ┌──────────┐ ┌──────────┐ │
│ │ Sub A1 │ │ Sub A2 │ │ Sub C1 │ │ Sub C2 │ │
│ │ Master │ │ Master │ │ Master │ │ Master │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Clients │ │ Clients │ │ Clients │ │ Clients │ │
│ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │
├─────────────────────────────────────────────────────────────────────────────┤
│ License Type Verification Features │
│ ───────────────────────────────────────────────────────────────────────── │
│ V2 License ECDSA P-256 Signature Offline verify, connection limits │
│ V1 License HMAC + Online Verify Connects to upstream server │
│ Trial Online Verify Limited features, always connected │
└─────────────────────────────────────────────────────────────────────────────┘
``` ```
### Architecture Advantages ### Multi-Layer Authorization (simplified view)
| Feature | Description | ```
|---------|-------------| Super Admin (authorization server)
| **Hierarchical Control** | Super user manages any master, supports unlimited tiers | │ V2 license (ECDSA P-256)
| **Complete Isolation** | Different Layer-1 users have isolated licenses, data, and clients |
| **Independent Operation** | Layer-1 users can set pricing, issue licenses, build their brand | Layer-1 Master ──┬── Layer-1 Master ──┬── Layer-1 Master ◄── independent / fully isolated
| **Horizontal Scaling** | Single master supports 10,000+ clients, multi-layer scales to millions | │ V1 │ V1 │ V1
| **Offline Support** | V2 license supports full offline verification, no upstream dependency | ▼ ▼ ▼
Sub-master → Clients (10,000+) → Device fleet
```
### Master Program (Server) | License | Verification | Notes |
|---|---|---|
| V2 license | ECDSA P-256 signature | Offline verification, sub-master connection cap |
| V1 license | HMAC + online check | Connects to upstream for verification |
| Trial | Online check | Feature- and connection-limited (see [compliance docs](./docs/Compliance_AntiAbuse.md)) |
The master program **YAMA.exe** provides a graphical management interface: Full description: [Multi-Layer License](./docs/MultiLayerLicense.md)
![Main Interface](./images/Yama.jpg)
- High-performance server based on IOCP
- Client group management
- Real-time status monitoring (RTT, geolocation, active window)
- One-click client generation
### Controlled Program (Client)
![Client Generation](./images/TestRun.jpg)
**Runtime Forms**:
| Type | Description |
|------|-------------|
| `ghost.exe` | Standalone executable, no external dependencies |
| `TestRun.exe` + `ServerDll.dll` | Separate loading, supports in-memory DLL loading |
| Windows Service | Background operation, supports lock screen control |
| Linux Client | Cross-platform support (v1.2.5+) |
| macOS Client | Cross-platform support (v1.3.2+) |
--- ---
## Getting Started ## Getting Started
### 5-Minute Quick Start ### 5-Minute Walkthrough
No compilation required, download and run: No compilation required download and run:
1. **Download Release** - Get the latest version from [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 1. **Download a release** — grab the latest build from [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest)
2. **Launch Master** - Run `YAMA.exe` and enter the license info (see trial license below) 2. **Start the master** — run `YAMA.exe` (or `server_linux_amd64` on Linux), enter the license info
3. **Generate Client** - Click the "Generate" button in the toolbar, configure server IP and port 3. **Generate a client** — click *Build* in the toolbar, configure server IP / port
4. **Deploy Client** - Copy the generated client to the target machine and run it 4. **Deploy the client** — copy to the target machine and run it
5. **Start Control** - Once the client comes online, double-click to open remote desktop 5. **Take control** — once the client is online, double-click to open the remote desktop
> [!TIP] > [!TIP]
> For initial testing, run both master and client on the same machine using `127.0.0.1` as the server address. > For the first test, run both the master and the client on the same machine using `127.0.0.1` as the server address.
### Build Requirements ### Go Master Deployment (VPS)
- **Operating System**: Windows 10/11 or Windows Server 2016+ See the [Web Remote Desktop config](./docs/WebHTTPS.md). The minimum recipe:
- **Development Environment**: Visual Studio 2019 / 2022 / 2026
- **SDK**: Windows 10 SDK (10.0.19041.0+)
### Build Steps
```bash ```bash
# 1. Clone the repository (must use git clone, do not download as zip) # 1. Run the Go master on the VPS
git clone https://github.com/yuanyuanxiang/SimpleRemoter.git nohup ./server_linux_amd64 --port 6543 --http-port 9001 > yama.log 2>&1 &
# 2. Open the solution # 2. nginx reverse proxy: 9001 → HTTPS
# Open SimpleRemoter.sln with VS2019+ # See docs/WebHTTPS.md
# 3. Select configuration # 3. Open https://yourdomain.com/ in a browser, log in, add clients
# Release | x86 or Release | x64
# 4. Build
# Build -> Build Solution
``` ```
**Common Issues**: ### Trial License (v1.2.4+)
- Dependency library conflicts: [#269](https://github.com/yuanyuanxiang/SimpleRemoter/issues/269)
- Non-Chinese system garbled text: [#157](https://github.com/yuanyuanxiang/SimpleRemoter/issues/157)
- Compiler compatibility: [#171](https://github.com/yuanyuanxiang/SimpleRemoter/issues/171)
### Deployment Methods A trial credential is provided — 2-year validity, 20 concurrent connections, LAN-only:
#### Intranet Deployment
Master and clients are on the same LAN, clients connect directly to master IP:Port.
#### Internet Deployment (FRP Tunneling)
``` ```
Client ──> VPS (FRP Server) ──> Local Master (FRP Client) Master IP : 127.0.0.1
``` Serial : 12ca-17b4-9af2-2894
Password : 20260201-20280201-0020-be94-120d-20f9-919a
For detailed configuration, please refer to: [Reverse Proxy Deployment Guide](./反向代理.md) Token : 6015188620429852704
Valid : 2026-02-01 to 2028-02-01
### Authorization
Starting from v1.2.4, a trial password is provided (2-year validity, 20 concurrent connections, intranet only):
```
Authorization: Bound by computer IP
Master IP: 127.0.0.1
Serial: 12ca-17b4-9af2-2894
Password: 20260201-20280201-0020-be94-120d-20f9-919a
Verification: 6015188620429852704
Valid: 2026-02-01 to 2028-02-01
``` ```
> [!NOTE] > [!NOTE]
> **Multi-Layer Licensing** > **Multi-Layer Licensing**
> >
> SimpleRemoter uses an enterprise-grade multi-layer authorization architecture, supporting independent operation for agents/developers: > Supports independent operation by resellers / developers: Layer-1 users can operate fully offline once licensed, and their sub-users only connect to *your* server. Full description: [Multi-Layer License](./docs/MultiLayerLicense.md)
> - **Offline Verification**: First-layer users can operate completely offline after obtaining authorization
> - **Independent Control**: Your downstream users connect only to your server, with data fully under your control ### Build
> - **Free Customization**: Supports secondary development to create your own branded version
> - **C++ master & Windows client**: open `SimpleRemoter.sln` in VS 2019 / 2022 / 2026 → Release | x64
> 📖 **[View Full Licensing Documentation](./docs/MultiLayerLicense.md)** - **Linux client**: `cd linux && cmake . && make`
- **macOS client**: `cd macos && ./build.sh`
- **Go master**: `cd server/go && go build ./cmd`
--- ---
## Client Support ## User Documentation
### Windows Client | Document | Audience | Content |
|---|---|---|
**System Requirements**: Windows 7 SP1 and above | 📖 [Quick Start Guide](./docs/QuickStart.md) | First-time users | First-time deployment in 10 minutes |
| 📖 [Multi-Tier Network Setup](./docs/NetworkSetup.md) | Users managing sub-tiers | Multi-tier network architecture |
**Feature Completeness**: ✅ All features supported | 📖 [User Manual](./docs/UserManual.md) | All users | Complete feature walkthrough |
| 📖 [Reseller Operations Manual](./docs/AgentManual.md) | Resellers / distributors | Sub-licensing, FRP setup |
### Linux Client (v1.2.5+) | 📖 [Customization Guide](./docs/CustomizationGuide.md) | Technical customers | Branding, secondary development |
| 📖 [Web Remote Desktop Setup](./docs/WebHTTPS.md) | Mobile / Go-master users | HTTPS reverse proxy, domain config |
**System Requirements**: | 📖 [Anti-Abuse Policy](./docs/Compliance_AntiAbuse.md) | All users | Compliance boundaries, responsibility allocation |
- Display Server: X11/Xorg (Wayland not yet supported) | 📖 [Anti-Abuse Technical Measures](./docs/Compliance_TechnicalMeasures.md) | Compliance auditors | Source-code location and motivation for each barrier |
- Required: libX11
- Recommended: libXtst (XTest extension), libXss (idle detection)
**Feature Support**:
| Feature | Status | Implementation |
|---------|--------|----------------|
| Remote Desktop | ✅ | X11 screen capture, mouse/keyboard control |
| Remote Terminal | ✅ | PTY interactive shell |
| File Management | ✅ | Bi-directional transfer, large file support |
| Process Management | ✅ | Process list, terminate processes |
| Heartbeat/RTT | ✅ | RFC 6298 RTT estimation |
| Daemon Process | ✅ | Double fork daemonization |
| Clipboard | ⏳ | In development |
| Session Management | ⏳ | In development |
**Build Instructions**:
```bash
cd linux
cmake .
make
```
### macOS Client (v1.3.2+)
**System Requirements**:
- macOS 10.15 (Catalina) or later
- Architecture: Universal Binary (Intel x64 + Apple Silicon arm64)
- Required permissions: Screen Recording, Accessibility, Full Disk Access
**Feature Support**:
| Feature | Status | Implementation |
|---------|--------|----------------|
| Remote Desktop | ✅ | CoreGraphics screen capture, VideoToolbox H.264 hardware encoding |
| Mouse Control | ✅ | CGEvent simulation, supports double-click, drag |
| Keyboard Control | ✅ | CGEvent simulation, full keycode mapping |
| Cursor Sync | ✅ | Real-time remote cursor style synchronization |
| Remote Terminal | ✅ | PTY interactive shell (zsh/bash) |
| File Management | ✅ | Bidirectional transfer, V2 protocol, large file support |
| Heartbeat/RTT | ✅ | RFC 6298 RTT estimation |
| Group Management | ✅ | Persistent configuration file |
| Process Management | ⏳ | In development |
| Clipboard | ⏳ | In development |
**Build Instructions**:
```bash
cd macos
./build.sh
# Or manually:
# mkdir build && cd build && cmake .. && make
```
--- ---
## Changelog ## Changelog
### v1.3.3 (2026.5.10) ### v1.3.4 (2026.5.20)
**Linux/macOS Client Maturation & Two-Layer Auth & Cross-Platform Code Refactor** **Go master & full-platform master loop & Linux/macOS clipboard**
**New Features:** **New features:**
- **Server Identity Verification (Layer 1)**: Linux/macOS clients verify server via HMAC-SHA256; unauthorized server cannot trigger any sub-connection - **Go master**: cross-platform lightweight master service in Go (Windows / Linux / macOS), focused on *remote desktop + remote terminal + multi-user roles* — does not replace the MFC master, fills the gap for pure Linux/macOS deployments
- **Sub-Connection Auth (Layer 2, TOKEN_CONN_AUTH)**: All sub-connections sign first packet + clientID pinned, eliminates NAT/127.0.0.1 routing mismatches - **Web remote desktop (Go master)**: H.264 → WebSocket → WebCodecs decode, 1080P @ 20fps, desktop + mobile; remote cursor sync, Keyboard Lock to prevent accidental ESC/F11 exit, F11/Esc passed through to the remote when in control mode
- **Linux Client**: H.264 hardware encoding (dynamic libx264 loading), XFixes cursor type detection, UTF-8 protocol capability bit - **Web remote terminal (Go master)**: xterm.js + PTY/ConPTY transparent forwarding, resize, automatic terminal panel cleanup on disconnect
- **macOS Client**: File manager, remote terminal (shared PTYHandler), clipboard sync, daemon mode (-d), power management, screen lock/idle detection, CGDisplayStream push-mode optimization - **Multi-user (Go master)**: admin / regular user roles, per-device-group authorization, Challenge-Response login, login rate limiting (per-IP + per-username), opaque tokens
- **Master**: Screen preview thumbnail, region screenshot, remote desktop zoom, Web user group filtering, embedded modern terminal, adaptive screen algorithm, external resource override, group name persistence, Build Dialog support for generating macOS client - **Linux client clipboard**: bidirectional clipboard sync via xclip / xsel, supports `text/uri-list` file paths
- **macOS client clipboard**: bidirectional clipboard sync via NSPasteboard, file URLs + legacy API compatibility
**Refactor:**
- Linux/macOS client shared code extracted to `common/` (rtt_estimator / client_auth_state / posix_net_helpers / sub_conn_thread), ~300 lines duplication removed
**Improvements:** **Improvements:**
- Modern Terminal SYSTEM compatibility: auto fallback to classic terminal with precise reason in info list - Web session adaptive quality is clamped to H264-only levels (≥ Good); Ultra/High (DIFF/RGB565) would otherwise leave the browser unable to decode
- `build.ps1` adds `vswhere` fallback (finds VS installed on non-default drives) - Linux client default `QualityLevel` changed to `QUALITY_GOOD` (matching Windows / macOS) — no longer requests adaptive on the server side
- Force `/source-charset:utf-8 /execution-charset:.936` to fix Chinese garbling when compiling on English Windows - Login text fields decoded as UTF-8 / GBK depending on client capability bits, fixing mojibake in German / French hostnames and geo locations
- macOS `install.sh` source binary priority optimized (command-line → script dir → build/bin), better suits distribution scenarios - Device list now sorts stably (by online time), no longer reshuffles on every heartbeat / WS push
- RDP reset button wired through to `CMD_RESTORE_CONSOLE` on the device
- MFC master no longer briefly flashes its dialog when a Web session opens (session detection moved to the top of `OnInitDialog`)
**Bug Fixes:** **Bug fixes:**
- V2 file transfer broken in both directions in FileManager dialog (upload IP routing errors + download chunks not dispatched) - After closing a Web session from fullscreen, device-list clicks became unresponsive (browser fullscreen subtree rule, now exited centrally in `showPage`)
- Modern Terminal blank under SYSTEM (WebView2 does not support LocalSystem) - When a client crashed, the Web remote desktop page stayed on "Connected" forever (new `device_offline` notification)
- Linux client UTF-8 path/active-window garbled on server - Multi-monitor polling caused two screen sub-connections to push frames simultaneously, making the picture flip between monitors (old sub-conn now retired in `BindScreenConn`)
- Log list header click incorrectly sorted host list - Go master `ListDevices` order was randomized by map iteration
- Header sort broken after LVM_SETUNICODEFORMAT (HDN_ITEMCLICKW mapping added)
- Tray icon not showing in Release service+agent mode ### v1.3.3 (2026.5.10)
- macOS/Linux clients did not resend LOGIN_INFOR after group change
- File dialog map dangling pointer crashes **Linux/macOS client polish & two-layer authentication**
- Reconnect crash from not clearing callback before destruction
- MFC and Web remote desktop sessions not fully independent - Server identity check (Layer 1): Linux/macOS client verifies server identity with HMAC-SHA256
- macOS locked screen: display not woken on remote desktop start - Sub-connection auth (Layer 2, TOKEN_CONN_AUTH): every sub-connection's first packet is signed and pinned to its clientID
- MFC remote desktop touchpad two-finger scroll not working - Linux client: H.264 hardware encoding, XFixes cursor type detection, UTF-8 protocol capability bit
- macOS client: file manager, remote terminal, clipboard sync, daemon mode
- Master: screen preview thumbnails, region screenshot, remote desktop zoom, Web users filter by group
- Shared code factored into `common/` (rtt_estimator / client_auth_state / posix_net_helpers)
### v1.3.2 (2026.5.1) ### v1.3.2 (2026.5.1)
**macOS Client & Web Remote Desktop Enhancement** **macOS client & Web Remote Desktop enhancements**
**New Features:** - Brand-new native macOS client: screen capture, H.264 encoding, mouse/keyboard control
- macOS client support: Native macOS client with screen capture, H.264 encoding, keyboard/mouse control, system permission management - Web remote desktop cursor sync
- Web remote desktop cursor sync: Real-time display of remote host cursor style in browser - Trigger functionality, user management (role-based permissions)
- Trigger functionality: Support custom actions triggered by host online events - DLL execution enhancements, remote desktop input-method switching
- User management: Role-based permission management, multi-user hierarchical control
- DLL execution enhancements: Parameter persistence, auto-run configuration support
- Remote desktop input language switching: Support switching remote host input language
**Improvements:**
- Web remote desktop gesture optimization: Improved two-finger gesture recognition, double-tap drag, Shift key combination support
**Bug Fixes:**
- Fixed Web remote desktop double-click not working for macOS clients
- Fixed macOS Full Disk Access permission detection inaccuracy
- Fixed RestoreMemDLL failure due to incorrect DLL info size
- Fixed multiple DLLs execution failure due to global variable conflict
- Fixed mouse double-click and remote desktop switching issues
- Fixed Linux client build missing libzstd.a
### v1.3.1 (2026.4.15) ### v1.3.1 (2026.4.15)
**Web Remote Desktop & Multi-Master Sharing Enhancement** **Web Remote Desktop (MFC master) & multi-master sharing**
**New Features:** - Web remote desktop: WebSocket-based, accessible from phone / tablet browsers
- Web Remote Desktop: WebSocket-based implementation, access remote desktop via mobile/tablet browser ([Configuration Guide](./docs/WebHTTPS.md)) - Multi-monitor: adaptive disabled when multiple monitors are present; expiry date auto-refresh in the status bar
- Revoke sharing menu: Support revoking clients shared to other masters - Multi-layer license auto-update, DLL cache reuse
- Toolbar audio control: Added system audio toggle icon to remote desktop toolbar
**Improvements:**
- Disable adaptive quality for multi-monitor: Auto-disable when client has multiple monitors
- Status bar auto-refresh expiration date: Immediate refresh after license renewal
- Reduce invalid offline logs: Less logging when client not in host list
- Multi-layer authorization auto-update: Layer-2+ master authorizations sync automatically
- Enhanced usage tips: Added more operation hints for better UX
- DLL cache reuse: Save DLL to registry for reuse on next startup
**Bug Fixes:**
- Fixed keylogger may not work properly while sharing client to other master
### v1.3.0 (2026.4.8) ### v1.3.0 (2026.4.8)
**Multi-Tier FRP Architecture & UI Branding** **Multi-tier FRP & brand customization**
**New Features:** - Local FRPS server, multi-tier auto FRP integration
- Local FRPS server support (64-bit only): Built-in FRP server for simplified deployment - V2 license sub-master connection cap, license file import / export
- Multi-tier architecture automatic FRP integration: Downstream masters auto-acquire upstream FRP config - Enhanced hardware ID (V2), UI brand customization
- V2 authorization downstream connection limit: Control concurrent connections for downstream - Configurable runtime feature limits
- License file import/export support (.lic format)
- Expired authorization renewal support: No need to regenerate license
- Enhanced hardware ID (V2): Fix VPS duplicate SN issue
- MaxDepth control: Limit hierarchical master depth level
- License management enhancements: Quota support, dynamic dialog, delete functionality
- IP geolocation API multi-provider fallback: Improved location success rate
- UI branding customization: Support custom program name, logo, copyright, etc.
- Runtime feature limits: Configurable trial version restrictions
- Input history dropdown: Quick selection of previous inputs
- Client generation new options: More customization settings
- Dynamic project links: Change help/feedback URLs without recompiling
**Bug Fixes:** ### Earlier versions
- Fixed Use-after-free crash in RebuildFilteredIndices
- Fixed IOCP race condition crash in CLock::Lock (#215)
- Fixed crash protection service cleanup and agent elevation issue
- Fixed potential crash from unlimited message log growth
- Fixed UpperHash string length issue after FeatureFlags introduction
- Fixed client SN generation to support HWIDVersion setting
**Improvements:** The v1.2.x series (email notifications, remote audio via Opus, V2 license protocol, V2 file transfer, modern Web terminal with xterm.js, remote desktop toolbar rewrite, adaptive quality control, first Linux client, …) and the full evolution since 2019 are documented in [history.md](./history.md).
- Restructured res/ directory with menu icons
- Expired passwords no longer auto-cleared
- Maintain stable connection between downstream and Layer-1 master
### v1.0.2.9 (2026.3.27)
**Network Security & Stability Enhancement**
**New Features:**
- Network configuration dialog: IP whitelist/blacklist management, takes effect immediately
- Configurable rate limiting: DLL request limiting, adjustable IP ban thresholds
- IP history dialog: View license IP login history
- Status bar displays MTBF/runtime and license expiration date
- Agent crash protection: Auto-switch to normal mode after 3 crashes within 5 minutes
- Client search function: Ctrl+F to quickly search IP, location, computer name
- Auto-ban malicious IPs: Auto-ban for 1 hour if >15 connections within 60 seconds
- Proxy Protocol v2 support: Get real client IP behind FRP proxy
- Linux clipboard sync and V2 file transfer support
- Right-click menu to run client program on host
- Multi-layer authorization obfuscation support
**Bug Fixes:**
- Fixed race condition crash in OnUserOfflineMsg
- Fixed FrpcParam lost when client requests FRPC DLL
- Increased max packet size from 10MB to 50MB
- Support mstsc remote session for reading user registry
- Fixed clipboard false trigger when remote desktop minimized
- Fixed master crash when operating process dialog
- Status bar host count updates in real-time
- Reset timeval before each select() call on Linux
- Passcode format validation to filter garbage data
**Improvements:**
- Enhanced authorization check with IP ban notifications
- Support master program running with user privilege
- Large DLL auto-fallback to TinyRun
### v1.2.8 (2026.3.11)
**Email Notification & Remote Audio**
- Host online email notification (SMTP config, keyword matching, right-click quick add)
- Remote audio playback (WASAPI Loopback) + Opus compression (24:1)
- Multiple FRPS servers simultaneous connection support
- Custom cursor display and tracking
- V2 authorization protocol (ECDSA signature)
- Fixed garbled text on non-Chinese Windows systems
- Linux client screen compression algorithm optimization
### v1.2.7 (2026.2.28)
**V2 File Transfer Protocol**
- Support C2C (client-to-client) direct transfer
- Resumable transfer and large file support (>4GB)
- SHA-256 file integrity verification
- WebView2 + xterm.js modern terminal
- Linux file management support
- Host list batch update optimization, reduced UI flickering
### v1.2.6 (2026.2.16)
**Remote Desktop Toolbar Rewrite**
- Status window showing RTT, FPS, resolution
- Fullscreen toolbar supports 4 positions and multi-monitor
- H.264 bandwidth optimization
- License management UI improvements
### v1.2.5 (2026.2.11)
**Adaptive Quality Control & Linux Client**
- RTT-based intelligent quality adjustment
- RGB565 algorithm (50% bandwidth savings)
- Scroll detection optimization (50-80% bandwidth savings)
- Linux client initial release
For complete update history, see: [history.md](./history.md)
--- ---
## Related Projects ## Related Projects
- [HoldingHands](https://github.com/yuanyuanxiang/HoldingHands) - Full English interface remote control - [HoldingHands](https://github.com/yuanyuanxiang/HoldingHands) English-only remote control
- [Gh0st](https://github.com/yuanyuanxiang/Gh0st) - Classic Gh0st implementation - [Gh0st](https://github.com/yuanyuanxiang/Gh0st) Classic Gh0st implementation
--- ---
## Contact ## Contact
| Channel | Link | | Channel | Link |
|---------|------| |---|---|
| **QQ** | 962914132 | | **QQ** | 962914132 |
| **Telegram** | [@doge_grandfather](https://t.me/doge_grandfather) | | **Telegram** | [@doge_grandfather](https://t.me/doge_grandfather) |
| **Email** | [yuanyuanxiang163@gmail.com](mailto:yuanyuanxiang163@gmail.com) | | **Email** | [yuanyuanxiang163@gmail.com](mailto:yuanyuanxiang163@gmail.com) |
| **Issues** | [Report Issues](https://t.me/SimpleRemoter) | | **Issues** | [Report a bug](https://t.me/SimpleRemoter) |
| **PR** | [Contribute](https://git.simpleremoter.com/) | | **PR** | [Contribute](https://git.simpleremoter.com/) |
### Sponsorship ### Sponsor
This project originated from technical learning and personal interest. The author will update irregularly based on spare time. If this project has been helpful to you, please consider sponsoring: This project is a side-of-the-desk effort driven by technical curiosity. The author updates it in spare time. If it helps you, sponsorship is welcome:
[![Sponsor](https://img.shields.io/badge/Sponsor-Support%20This%20Project-ff69b4?style=for-the-badge)](https://github.com/yuanyuanxiang/yuanyuanxiang/blob/main/images/QR_Codes.jpg) [![Sponsor](https://img.shields.io/badge/Sponsor-Support%20This%20Project-ff69b4?style=for-the-badge)](https://github.com/yuanyuanxiang/yuanyuanxiang/blob/main/images/QR_Codes.jpg)

View File

@@ -12,9 +12,9 @@
<a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases"> <a href="https://github.com/yuanyuanxiang/SimpleRemoter/releases">
<img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release"> <img src="https://img.shields.io/github/v/release/yuanyuanxiang/SimpleRemoter?style=flat-square" alt="GitHub Release">
</a> </a>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Platform"> <img src="https://img.shields.io/badge/client-Windows%20%7C%20Linux%20%7C%20macOS-blue?style=flat-square" alt="Client Platforms">
<img src="https://img.shields.io/badge/language-C%2B%2B17-orange?style=flat-square&logo=cplusplus" alt="Language"> <img src="https://img.shields.io/badge/server-Windows%20%7C%20Linux%20%7C%20macOS-success?style=flat-square" alt="Server Platforms">
<img src="https://img.shields.io/badge/IDE-VS2019%2B-purple?style=flat-square&logo=visualstudio" alt="IDE"> <img src="https://img.shields.io/badge/language-C%2B%2B17%20%2F%20Go-orange?style=flat-square&logo=cplusplus" alt="Language">
<img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License"> <img src="https://img.shields.io/badge/license-MIT-green?style=flat-square" alt="License">
</p> </p>
@@ -29,10 +29,7 @@
> [!WARNING] > [!WARNING]
> **重要法律聲明** > **重要法律聲明**
> >
> 本軟**僅供教育目的及授權使用場景**,包括: > 本軟**僅供教育目的及授權使用情境**:組織內遠端 IT 管理、經授權的滲透測試與安全研究、個人裝置管理與技術學習。
> - 在您的組織內進行遠端 IT 管理
> - 經授權的滲透測試和安全研究
> - 個人設備管理和技術學習
> >
> **未經授權存取電腦系統屬違法行為。** 使用者須對遵守所有適用法律承擔全部責任。開發者對任何濫用行為概不負責。 > **未經授權存取電腦系統屬違法行為。** 使用者須對遵守所有適用法律承擔全部責任。開發者對任何濫用行為概不負責。
@@ -41,12 +38,13 @@
## 目錄 ## 目錄
- [專案簡介](#專案簡介) - [專案簡介](#專案簡介)
- [免責聲明](#免責聲明) - [本版本亮點:全平台閉環](#本版本亮點全平台閉環)
- [合規與反濫用](#合規與反濫用)
- [功能特性](#功能特性) - [功能特性](#功能特性)
- [技術亮點](#技術亮點) - [全平台支援](#全平台支援)
- [系統架構](#系統架構) - [系統架構](#系統架構)
- [快速開始](#快速開始) - [快速開始](#快速開始)
- [用戶端支援](#用戶端支援) - [使用者文件](#使用者文件)
- [更新日誌](#更新日誌) - [更新日誌](#更新日誌)
- [相關專案](#相關專案) - [相關專案](#相關專案)
- [聯絡方式](#聯絡方式) - [聯絡方式](#聯絡方式)
@@ -55,25 +53,9 @@
## 專案簡介 ## 專案簡介
**SimpleRemoter** 是一個功能完整的遠端控制解決方案,基於經典的 Gh0st 框架重構,採用現代 C++17 開發。專案始於 2019 年,經過持續迭代已發展為支援 **Windows + Linux + macOS** 三平台的企業級遠端管理工具 **SimpleRemoter** 是一個端到端跨平台的遠端控制解決方案。
### 核心能力 專案核心基於經典 **Gh0st 架構**,最早始於 2019 年 1 月。歷經 7 年持續迭代——從 IOCP 通訊核心重構、x264 視訊級編碼、V2 檔案傳輸協定、多層授權體系,到 Linux 與 macOS 用戶端的引入——本版本最終完成**用戶端 + 伺服端的全平台閉環**三大桌面作業系統Windows / Linux / macOS在任一側都可作為受控端或主控端。
| 類別 | 功能 |
|------|------|
| **遠端桌面** | 即時螢幕控制、多顯示器支援、H.264 編碼、自適應品質 |
| **檔案管理** | 雙向傳輸、斷點續傳、C2C 傳輸、SHA-256 校驗 |
| **終端管理** | 互動式 Shell、ConPTY/PTY 支援、現代 Web 終端 |
| **系統管理** | 程序/服務/視窗管理、登錄檔瀏覽、工作階段控制 |
| **媒體擷取** | 網路攝影機監控、音訊監聽、鍵盤記錄 |
| **網路功能** | SOCKS 代理、FRP 穿透、埠映射 |
### 適用場景
- **企業 IT 運維**:批次管理內網設備,遠端故障排查
- **遠端辦公**:安全存取辦公電腦,檔案同步傳輸
- **安全研究**:滲透測試、紅隊演練、安全稽核
- **技術學習**網路程式設計、IOCP 模型、加密傳輸實踐
**原始來源:** [zibility/Remote](https://github.com/zibility/Remote) | **起始日期:** 2019.1.1 **原始來源:** [zibility/Remote](https://github.com/zibility/Remote) | **起始日期:** 2019.1.1
@@ -81,36 +63,73 @@
--- ---
## 免責聲明 ## 本版本亮點:全平台閉環
**請在使用本軟件前仔細閱讀以下聲明:** 本專案長期以 **C++ MFC 主控**`YAMA.exe`)為核心交付形態——經典 Gh0st 架構、IOCP 高效能核心、完整的遠端桌面 / 檔案 / 程序 / 媒體功能堆疊、多層授權體系、品牌客製化——**至今仍是主要使用的主控**。MFC 主控內建了基於 WebSocket 的 Web 遠端桌面服務,從 v1.3.1 起就已經支援**任意平台的瀏覽器**遠控被管裝置(手機 / 平板 / Linux / macOS 桌面均可)。
1. **合法用途**:本專案僅供合法的技術研究、學習交流和授權的遠端管理使用。嚴禁將本軟件用於未經授權存取他人電腦系統、竊取資料、監控他人隱私等任何違法行為 本版本v1.3.4)補上了最後一塊拼圖——**Go 主控**:一個**功能簡潔、聚焦於「遠端桌面 + 遠端終端 + 多使用者分級」** 的輕量伺服端,跨 Windows / Linux / macOS 編譯執行。它的定位**不是取代 MFC**,而是為那些**不方便執行 Windows VPS** 的使用者提供原生的 Linux / macOS 主控落腳點——例如純 Linux 伺服器、ARM Mac 長駐、嵌入式主控盒等情境
2. **使用者責任**:使用者必須遵守所在國家/地區的法律法規。因使用本軟件而產生的任何法律責任,由使用者自行承擔。 ### 兩種主控形態如何選擇
3. **無擔保聲明**:本軟件按「現狀」提供,不附帶任何明示或暗示的擔保,包括但不限於適銷性、特定用途適用性的擔保。 | 形態 | GUI | 功能覆蓋 | 平台 | 定位 |
|---|---|---|---|---|
| **C++ MFC 主控** (`YAMA.exe`) | 原生 Windows GUI + 內建 Web 服務 | ✅ **全部功能** | Windows | **主推方案**。日常運維、檔案管理、媒體擷取、多層授權、品牌客製化等都用它 |
| **Go 主控**(新) | Web UI任何瀏覽器 | 遠端桌面 + 遠端終端 + 多使用者 | Windows / Linux / macOS | **補充方案**。需要「零 Windows 依賴」的純 Linux / macOS 主控部署 |
4. **免責條款**:開發者不對因使用、誤用或無法使用本軟件而造成的任何直接、間接、偶然、特殊或後果性損害承擔責任。 > [!TIP]
> 兩種主控**使用同一套用戶端**——可以混搭,例如一台 Windows MFC 主控 + 一台 Linux Go 主控並行管理同一批裝置群。
5. **版權聲明**:本專案採用 MIT 協議開源,允許自由使用、修改和分發,但必須保留原始版權聲明。 ### Go 主控的核心能力v1.3.4 新增)
**繼續使用本軟件即表示您已閱讀、理解並同意上述所有條款。** - **遠端桌面**H.264 流透過 WebSocket 直接推送瀏覽器WebCodecs 硬體解碼1080P @ 20fps 流暢
- **遠端終端**xterm.js + ConPTY/PTY支援調整尺寸、Tab 自動補全
- **多使用者體系**:管理員 / 一般使用者分級、Challenge-Response 登入、不透明 token、按裝置群授權
- **生產部署**Nginx 反向代理 + Let's Encrypt + Keyboard Lock + 全螢幕控制,防止 ESC / F11 誤退出
- **刻意保持輕量**:不包含檔案管理、媒體擷取、登錄檔、服務管理等 MFC 主控專屬功能——這些請走 MFC 主控
### 全平台支援矩陣
| | **用戶端 (受控端)** | **主控端** |
|---|---|---|
| **Windows** | ✅ 完整功能 | ✅ MFC `YAMA.exe`(推薦)/ Go |
| **Linux** (X11) | ✅ 螢幕 + 終端 + 檔案 + 剪貼簿 | ✅ Go |
| **macOS** (Intel + Apple Silicon) | ✅ 螢幕 + 終端 + 檔案 + 剪貼簿 | ✅ Go |
---
## 合規與反濫用
本專案長期堅持「明確的合規姿態」立場。本版本進一步收緊反濫用邊界。
### 內建技術措施
原始碼層面構築多道獨立可驗證的反濫用屏障,詳見 [反濫用技術措施清單](./docs/Compliance_TechnicalMeasures.md)
- **入站連線 IP 區段校驗**:試用版若被部署到公網會觸發可見告警 latch
- **監聽埠數量上限**:試用版限制 ≤ 2 個監聽埠,防多租戶中轉改造
- **應用層 RTT 反代理**LAN 內 RTT 閾值偵測,反向代理 / 隧道會被識別
- **多層授權架構**V2 ECDSA 離線 + V1 連線 + 試用版分級,每一層限制獨立
- **Web 主控驗證**:強制 Challenge-Response 登入、登入限流、不透明 token、操作可稽核
### 合規文件
| 文件 | 內容 |
|---|---|
| 📖 [反濫用與合規使用政策](./docs/Compliance_AntiAbuse.md) | 完整的發行方-使用方責任劃分 |
| 📖 [反濫用技術措施清單](./docs/Compliance_TechnicalMeasures.md) | 每一道屏障的原始碼位置、設計動機、已知侷限 |
> [!IMPORTANT] > [!IMPORTANT]
> **網路連線與隱私聲明** > **使用本軟體即視為您已閱讀、理解並接受上述合規文件全部條款。** 如您不能或不願接受任一條款,請立即停止使用並銷毀本軟體副本。
>
> 主控程式(伺服器端)會根據授權狀態與授權伺服器進行網路通訊: ### 網路連線與隱私
>
> | 版本類型 | 連線行為 | | 版本類型 | 連線行為 |
> |---------|---------| |---|---|
> | 試用版本 | 維持與授權伺服器的持續連線 | | 試用版本 | 維持與授權伺服器的持續連線 |
> | V1/V2 授權版本 | 啟動時連線驗證,通過後斷 | | V1/V2 授權版本 | 啟動時連線驗證,通過後斷 |
> | V2 離線授權版本 | 無需連線授權伺服器 | | V2 離線授權版本 | 無需連線授權伺服器 |
>
> 除獲得離線授權外,主控程式會與授權伺服器進行必要的資料互(如偵測破解行為、驗證授權有效性)。 除獲得離線授權外,主控程式會與授權伺服器進行必要的資料互(如偵測破解行為、驗證授權有效性)。
>
> **使用本軟體即表示您接受主控程式與授權伺服器之間的資料傳輸。如您不同意,請勿使用本軟體。**
--- ---
@@ -120,240 +139,149 @@
![遠端桌面](./images/Remote.jpg) ![遠端桌面](./images/Remote.jpg)
- **多種截圖方式**GDI相容性強、DXGI高效能、虛擬桌面背景執行 - **多種螢幕擷取**GDI / DXGI / 虛擬桌面Windows、X11 + XShmLinux、CGDisplayStreammacOS
- **智慧壓縮演算法** - **智慧壓縮**DIFF 差分SSE2 最佳化)/ RGB565節省 50% 頻寬)/ **H.264**視訊級壓縮x264 + VideoToolbox + WebCodecs/ 灰階模式
- DIFF 差分演算法 - SSE2 優化,僅傳輸變化區域 - **自適應品質**:根據 RTT 自動調節影格率5-30 FPS、解析度、壓縮演算法
- RGB565 演算法 - 節省 50% 頻寬 - **多顯示器**:多螢幕切換 + 多螢幕上牆
- H.264 編碼 - 視訊級壓縮,適合高幀率場景 - **跨裝置檔案拖曳**Ctrl+C/V 跨裝置複製貼上檔案
- 灰階模式 - 極低頻寬消耗 - **Web 遠端桌面**:瀏覽器直接存取,手機 / 平板可用([設定指南](./docs/WebHTTPS.md)
- **自適應品質**:根據網路 RTT 自動調整幀率5-30 FPS、解析度和壓縮演算法
- **多顯示器**:支援多螢幕切換和多螢幕牆顯示 ![Web遠端桌面](./images/WebRemote.png)
- **隱私螢幕**:被控端螢幕可隱藏,支援鎖定畫面狀態下控制
- **檔案拖放**Ctrl+C/V 跨設備複製貼上檔案
- **Web 遠端桌面**:透過瀏覽器存取遠端桌面,支援手機/平板([設定指南](./docs/WebHTTPS.md)
### 檔案管理 ### 檔案管理
![檔案管理](./images/FileManage.jpg) ![檔案管理](./images/FileManage.jpg)
- **V2 傳輸協定**全新設計,支援大檔案(>4GB - **V2 傳輸協定**支援 >4GB 大檔、斷點續傳、SHA-256 校驗
- **斷點續傳**:網路中斷後自動恢復,狀態持久化
- **C2C 傳輸**:用戶端之間直接傳輸,無需經過主控 - **C2C 傳輸**:用戶端之間直接傳輸,無需經過主控
- **完整性校驗**SHA-256 雜湊驗證,確保檔案完整 - **批次操作**:搜尋、壓縮、批次傳輸
- **批次操作**:支援檔案搜尋、壓縮、批次傳輸
### 終端管理 ### 終端管理
![終端管理](./images/Console.jpg) ![終端管理](./images/LinuxClient.png)
- **互動式 Shell**完整的命令列體驗,支援 Tab 補全 - **互動式 Shell**Tab 自動補全、ANSI escape、調整尺寸
- **ConPTY 技術**Windows 10+ 原生虛擬終端支援 - **現代終端**Windows ConPTY、Linux / macOS PTY
- **現代 Web 終端**基於 WebView2 + xterm.jsv1.2.7+ - **Web 終端**xterm.js + WebSocket與原生體驗一致
- **終端尺寸調整**:自適應視窗大小
### 程序與視窗管理
| 程序管理 | 視窗管理 |
|---------|---------|
| ![程序](./images/Process.jpg) | ![視窗](./images/Window.jpg) |
- **程序管理**檢視程序清單、CPU/記憶體佔用、啟動/終止程序
- **程式碼注入**:向目標程序注入 DLL需系統管理員權限
- **視窗控制**:最大化/最小化/隱藏/關閉視窗
### 媒體功能
| 視訊管理 | 音訊管理 |
|---------|---------|
| ![視訊](./images/Video.jpg) | ![音訊](./images/Voice.jpg) |
- **網路攝影機監控**:即時視訊串流,支援解析度調整
- **音訊監聽**:遠端聲音擷取,支援雙向語音
- **鍵盤記錄**:線上/離線記錄模式
### 其他功能 ### 其他功能
- **服務管理**:檢視和控制 Windows 服務 | 模組 | 能力 |
- **登錄檔瀏覽**:唯讀方式瀏覽登錄檔內容 |---|---|
- **工作階段控制**:遠端登出/關機/重新啟動 | **程序管理** | 程序清單、CPU / 記憶體佔用、終止、DLL 注入 |
- **SOCKS 代理**:透過用戶端建立代理通道 | **視窗管理** | 最大化 / 最小化 / 隱藏 / 關閉 |
- **FRP 穿透**:內建 FRP 支援,輕鬆穿透內網 | **媒體擷取** | 網路攝影機、雙向語音、鍵盤記錄 |
- **程式碼執行**:遠端執行 DLL支援熱更新 | **系統控制** | 服務管理、登錄檔、工作階段登出 / 關機 |
| **網路功能** | SOCKS 代理、FRP 穿透、埠映射 |
| **程式碼執行** | 遠端執行 DLL、記憶體載入、熱更新 |
--- ---
## 技術亮點 ## 全平台支援
### 高效能網路架構 ### Windows 用戶端
``` **系統需求**Windows 7 SP1 及以上
┌─────────────────────────────────────────────────────────┐ **功能完整性**:✅ 全部功能支援
│ IOCP 通訊模型 │
├─────────────────────────────────────────────────────────┤
│ • I/O 完成埠Windows 最高效的非同步 I/O 模型 │
│ • 單主控支援 10,000+ 並行連線 │
│ • 支援 TCP / UDP / KCP 三種傳輸協定 │
│ • 自動分塊處理大資料封包(最大 128KB 傳送緩衝) │
└─────────────────────────────────────────────────────────┘
```
### 自適應品質控制 ### Linux 用戶端v1.2.5+
基於 RTTRound-Trip Time的智慧品質調整系統 **系統需求**
- 顯示伺服器X11/Xorg暫不支援 Wayland
- 必需函式庫libX11推薦函式庫libXtstXTest 擴充、libXss閒置偵測
| RTT 延遲 | 品質等級 | 幀率 | 解析度 | 壓縮演算法 | 適用場景 | | 功能 | 狀態 | 實作 |
|---------|---------|------|--------|-----------|---------| |---|---|---|
| < 30ms | Ultra | 25 FPS | 原始 | DIFF | 區域網路辦公 | | 遠端桌面 | ✅ | X11 螢幕擷取 + libx264 H.264 硬體編碼 |
| 30-80ms | High | 20 FPS | 原始 | RGB565 | 一般辦公 | | 遠端終端 | ✅ | PTY 互動式 Shell |
| 80-150ms | Good | 20 FPS | ≤1080p | H.264 | 跨網/視訊 | | 檔案管理 | ✅ | V2 協定、雙向傳輸、大檔 |
| 150-250ms | Medium | 15 FPS | ≤900p | H.264 | 跨網辦公 | | 程序管理 | ✅ | 清單 + 終止 |
| 250-400ms | Low | 12 FPS | ≤720p | H.264 | 較差網路 | | 剪貼簿同步 | ✅ | xclip / xsel 外部工具,支援檔案 URI |
| > 400ms | Minimal | 8 FPS | ≤540p | H.264 | 極差網路 | | 心跳 / RTT | ✅ | RFC 6298 RTT 估算 |
| 常駐程序 | ✅ | 雙 fork 守護化 |
- **零額外開銷**:複用心跳封包計算 RTT **編譯**`cd linux && cmake . && make`
- **快速降級**2 次偵測即觸發,回應網路波動
- **謹慎升級**5 次穩定後才提升品質
- **冷卻機制**:防止頻繁切換
### V2 檔案傳輸協定 ### macOS 用戶端v1.3.2+
```cpp **系統需求**
// 77 位元組協定標頭 + 檔案名稱 + 資料載荷 - macOS 10.15 (Catalina) 及以上
struct FileChunkPacketV2 { - 架構Intel (x64) 和 Apple Silicon (arm64) 通用二進位檔
uint8_t cmd; // COMMAND_SEND_FILE_V2 = 85 - 系統權限:螢幕錄影、輔助功能、完整磁碟存取
uint64_t transferID; // 傳輸工作階段 ID
uint64_t srcClientID; // 來源用戶端 ID (0=主控端)
uint64_t dstClientID; // 目標用戶端 ID (0=主控端, C2C)
uint32_t fileIndex; // 檔案編號 (0-based)
uint32_t totalFiles; // 總檔案數
uint64_t fileSize; // 檔案大小(支援 >4GB
uint64_t offset; // 目前區塊位移
uint64_t dataLength; // 本區塊資料長度
uint64_t nameLength; // 檔案名稱長度
uint16_t flags; // 標誌位元 (FFV2_LAST_CHUNK 等)
uint16_t checksum; // CRC16 校驗(可選)
uint8_t reserved[8]; // 預留擴充
// char filename[nameLength]; // UTF-8 相對路徑
// uint8_t data[dataLength]; // 檔案資料
};
```
**特性** | 功能 | 狀態 | 實作 |
- 大檔案支援uint64_t 突破 4GB 限制) |---|---|---|
- 斷點續傳(狀態持久化到 `%TEMP%\FileTransfer\` | 遠端桌面 | ✅ | CGDisplayStream + VideoToolbox H.264 硬體編碼 |
- SHA-256 完整性校驗 | 鍵鼠控制 | ✅ | CGEvent支援雙擊、拖曳 |
- C2C 直傳(用戶端到用戶端) | 遠端終端 | ✅ | PTY 互動式 Shellzsh/bash |
- V1/V2 協定相容 | 檔案管理 | ✅ | V2 協定、大檔 |
| 程序管理 | ✅ | proc_listpids + 終止 |
| 剪貼簿同步 | ✅ | NSPasteboard支援檔案 URL + NSFilenamesPboardType |
| 常駐模式 | ✅ | `-d` 後台執行、電源管理、閒置偵測 |
### 螢幕傳輸優化 **編譯**`cd macos && ./build.sh`
- **SSE2 指令集**:像素差分計算硬體加速 ### Go 主控v1.3.4+
- **多執行緒並行**:執行緒池分塊處理螢幕資料
- **捲動偵測**:識別捲動場景,減少 50-80% 頻寬
- **H.264 編碼**:基於 x264GOP 控制,視訊級壓縮
### 安全機制 **系統需求**Go 1.21+(僅編譯時);二進位執行無依賴
| 層級 | 措施 | | 能力 | 實作 |
|------|------| |---|---|
| **傳輸加密** | AES-256 資料加密,可設定 IV | | 遠端桌面 | H.264 → WebSocket → WebCodecs1080P @ 20fps |
| **身分驗證** | 簽章驗證 + HMAC 認證 | | 遠端終端 | xterm.js + PTY/ConPTY 透明轉發 |
| **授權控制** | 序號綁定IP/網域),多級授權 | | 多使用者 | Challenge-Response + 不透明 token + 按群授權 |
| **檔案校驗** | SHA-256 完整性驗證 | | 部署 | Nginx 反向代理 / Let's Encrypt / systemd unit / `/etc/environment` |
| **工作階段隔離** | Session 0 獨立處理 |
### 相依套件 **編譯**`cd server/go && go build -o server_linux_amd64 ./cmd`
| 套件 | 版本 | 用途 |
|------|------|------|
| zlib | 1.3.1 | 通用壓縮 |
| zstd | 1.5.7 | 高速壓縮 |
| x264 | 0.164 | H.264 編碼 |
| libyuv | 190 | YUV 轉換 |
| HPSocket | 6.0.3 | 網路 I/O |
| jsoncpp | 1.9.6 | JSON 解析 |
--- ---
## 系統架構 ## 系統架構
### 全平台拓撲
``` ```
┌───────────────────────────────────────────────────────────────────────────── ┌────────────────────────────────────────────────────────┐
多層授權架構 (Multi-Layer Authorization) 主控層
├─────────────────────────────────────────────────────────────────────────────┤
│ │ │ │
┌───────────────────── ┌──────────────────┐ ┌──────────────────┐ │
│ 超級管理員 │ │ C++ MFC 主控 │ │ Go 主控
(授權伺服器) │ │ YAMA.exe (Win/Linux/Mac) │
│ Super Admin │ Windows only Web UI 全平台 │
└────────┬───────────┘ └────────┬─────────┘ └────────┬─────────
│ │ │ └────────────┼──────────────────────────┼─────────────────┘
┌──────────────┼──────────────┐
V2 授權 │ V2 授權 │ V2 授權 │ TCP (自訂二進位協定) │ TCP (裝置) + WS (瀏覽器)
│ (ECDSA) │ (ECDSA) │ (ECDSA) │ └────────┬─────────────────┘
│ ▼ ▼ ▼
┌───────────┐ ┌──────────┐ ┌───────────┐ │ ┌────────────────────────────
│ 第一層 A │ 第一層 B │ │ 第一層 C ◄── 獨立營運
│ Layer-1 A │ │ Layer-1 B │ │ Layer-1 C │ 完全隔離 │ ┌─────────┐ ┌─────────┐ ┌─────────┐
└─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ Windows │ Linux macOS
│ │ 用戶端 │ │ 用戶端 │ 用戶端
│ ┌────────┴────────┐ │ ┌──────┴──────┐ │ (DXGI) │ (X11) │ (CG)
│ │ V1 授權 │ │ │ V1 授權 └─────────┘ └─────────┘ └─────────┘
│ ▼ ▼ ▼ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ ... ┌──────────┐ ┌──────────┐ │
│ │ 下級 A1 │ │ 下級 A2 │ │ 下級 C1 │ │ 下級 C2 │ │
│ │ Master │ │ Master │ │ Master │ │ Master │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ 用戶端 │ │ 用戶端 │ │ 用戶端 │ │ 用戶端 │ │
│ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │ 10,000+ │ │
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │
│ │
├─────────────────────────────────────────────────────────────────────────────┤
│ 授權類型 驗證方式 特點 │
│ ───────────────────────────────────────────────────────────────────────── │
│ V2 授權 ECDSA P-256 簽名 支援離線驗證,下級連線數限制 │
│ V1 授權 HMAC + 線上驗證 連線上級伺服器驗證 │
│ 試用版 線上驗證 功能受限,需保持連線 │
└─────────────────────────────────────────────────────────────────────────────┘
``` ```
### 架構優勢 ### 多層授權(簡化視圖)
| 特性 | 說明 | ```
|------|------| 超級管理員(授權伺服器)
| **層級控制** | 超級使用者可管理任意主控程式,支援無限層級 | │ V2 授權 (ECDSA P-256)
| **完全隔離** | 不同第一層使用者的授權、資料、用戶端完全隔離 |
| **獨立營運** | 第一層使用者可獨立定價、發放授權,打造專屬品牌 | 第一層主控 ──┬── 第一層主控 ──┬── 第一層主控 ◄── 獨立營運 / 完全隔離
| **水平擴充** | 單 Master 支援 10,000+ 用戶端,多層架構可達百萬級 | │ V1 │ V1 │ V1
| **離線支援** | V2 授權支援完全離線驗證,無需依賴上游服務 | ▼ ▼ ▼
下級主控 → 用戶端 (10,000+) → 裝置群
```
### 主控程式Server | 授權 | 驗證 | 特點 |
|---|---|---|
| V2 授權 | ECDSA P-256 簽章 | 離線驗證、下級連線數限制 |
| V1 授權 | HMAC + 連線驗證 | 連接上級伺服器驗證 |
| 試用版 | 連線驗證 | 功能受限、連線限制(詳見 [合規文件](./docs/Compliance_AntiAbuse.md) |
主控程式 **YAMA.exe** 提供圖形化管理介面: 完整說明:[多層授權方案](./docs/MultiLayerLicense.md)
![主介面](./images/Yama.jpg)
- 基於 IOCP 的高效能伺服器
- 用戶端分組管理
- 即時狀態監控RTT、地理位置、活動視窗
- 一鍵產生用戶端
### 受控程式Client
![用戶端產生](./images/TestRun.jpg)
**執行形式**
| 類型 | 說明 |
|------|------|
| `ghost.exe` | 獨立可執行檔,無外部相依 |
| `TestRun.exe` + `ServerDll.dll` | 分離載入,支援記憶體載入 DLL |
| Windows 服務 | 背景執行,支援鎖定畫面控制 |
| Linux 用戶端 | 跨平台支援v1.2.5+ |
| macOS 用戶端 | 跨平台支援v1.3.2+ |
--- ---
@@ -363,62 +291,34 @@ struct FileChunkPacketV2 {
無需編譯,下載即用: 無需編譯,下載即用:
1. **下載發** - 從 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下載最新版本 1. **下載發** - 從 [Releases](https://github.com/yuanyuanxiang/SimpleRemoter/releases/latest) 下載最新版本
2. **啟動主控** - 執行 `YAMA.exe`,輸入授權資訊(見下方試用口令) 2. **啟動主控** - 執行 `YAMA.exe`(或 Linux 上的 `server_linux_amd64`,輸入授權資訊
3. **生用戶端** - 點擊工具列「產生」按鈕,設定伺服器 IP 和連接 3. **生用戶端** - 工具列「生成」設定伺服器 IP 和埠
4. **部署用戶端** - 將產生的用戶端複製到目標機器執行 4. **部署用戶端** - 複製到目標機器執行
5. **開始控制** - 用戶端上線後雙擊即可開啟遠端桌面 5. **開始控制** - 用戶端上線後雙擊遠端桌面
> [!TIP] > [!TIP]
> 首次測試建議在同一台機器上執行主控和用戶端,使用 `127.0.0.1` 作為伺服器位址。 > 首次測試建議在同一台機器上執行主控和用戶端,使用 `127.0.0.1` 作為伺服器位址。
### 編譯要求 ### Go 主控部署VPS
- **作業系統**Windows 10/11 或 Windows Server 2016+ 參見 [Web 遠端桌面設定](./docs/WebHTTPS.md)。最小步驟:
- **開發環境**Visual Studio 2019 / 2022 / 2026
- **SDK**Windows 10 SDK (10.0.19041.0+)
### 編譯步驟
```bash ```bash
# 1. 複製程式碼(必須使用 git clone不要下載 zip # 1. 在 VPS 上跑 Go 主控
git clone https://github.com/yuanyuanxiang/SimpleRemoter.git nohup ./server_linux_amd64 --port 6543 --http-port 9001 > yama.log 2>&1 &
# 2. 開啟方案 # 2. nginx 反代 9001 到 HTTPS
# 使用 VS2019+ 開啟 SimpleRemoter.sln # 詳見 docs/WebHTTPS.md
# 3. 選擇組態 # 3. 瀏覽器開啟 https://yourdomain.com/,登入、新增用戶端
# Release | x86 或 Release | x64
# 4. 編譯
# 建置 -> 建置方案
``` ```
**常見問題** ### 試用授權v1.2.4+
- 相依套件衝突:[#269](https://github.com/yuanyuanxiang/SimpleRemoter/issues/269)
- 非中文系統亂碼:[#157](https://github.com/yuanyuanxiang/SimpleRemoter/issues/157)
- 編譯器相容性:[#171](https://github.com/yuanyuanxiang/SimpleRemoter/issues/171)
### 部署方式 提供 2 年有效期、20 並發連線、僅限內網的試用口令:
#### 內網部署
主控與用戶端在同一區域網路,用戶端直連主控 IP:Port。
#### 外網部署FRP 穿透)
``` ```
用戶端 ──> VPS (FRP Server) ──> 本機主控 (FRP Client)
```
詳細設定請參考:[反向代理部署說明](./反向代理.md)
### 授權說明
自 v1.2.4 起提供試用口令2 年有效期20 並行連線,僅限內網):
```
授權方式:按電腦 IP 綁定
主控 IP127.0.0.1 主控 IP127.0.0.1
序號12ca-17b4-9af2-2894 序號12ca-17b4-9af2-2894
密碼20260201-20280201-0020-be94-120d-20f9-919a 密碼20260201-20280201-0020-be94-120d-20f9-919a
@@ -429,271 +329,100 @@ git clone https://github.com/yuanyuanxiang/SimpleRemoter.git
> [!NOTE] > [!NOTE]
> **多層授權方案** > **多層授權方案**
> >
> SimpleRemoter 採用企業級多層授權架構,支援代理商/開發者獨立運營: > 支援代理商 / 開發者獨立營運:第一層使用者獲得授權後可完全離線使用,下級使用者只連線到您的伺服器。完整說明:[多層授權方案](./docs/MultiLayerLicense.md)
> - **離線驗證**:第一層使用者獲得授權後可完全離線使用
> - **獨立控制**:您的下級使用者只連接到您的伺服器,資料完全由您掌控 ### 編譯
> - **自由定制**:支援二次開發,打造您的專屬版本
> - **C++ 主控 & Windows 用戶端**VS 2019/2022/2026 開啟 `SimpleRemoter.sln` → Release | x64
> 📖 **[查看完整授權方案說明](./docs/MultiLayerLicense.md)** - **Linux 用戶端**`cd linux && cmake . && make`
- **macOS 用戶端**`cd macos && ./build.sh`
- **Go 主控**`cd server/go && go build ./cmd`
--- ---
## 用戶端支援 ## 使用者文件
### Windows 用戶端 | 文件 | 適用對象 | 內容 |
|---|---|---|
**系統要求**Windows 7 SP1 及以上 | 📖 [快速部署指南](./docs/QuickStart.md) | 首次使用者 | 10 分鐘首次部署 |
| 📖 [多級網路搭建指南](./docs/NetworkSetup.md) | 需要管理下級的使用者 | 多級網路架構 |
**功能完整性**:✅功能支援 | 📖 [日常使用手冊](./docs/UserManual.md) | 所有使用者 | 全功能詳解 |
| 📖 [代理商營運手冊](./docs/AgentManual.md) | 代理商 / 經銷商 | 下級授權、FRP 設定 |
### Linux 用戶端v1.2.5+ | 📖 [客製化開發指南](./docs/CustomizationGuide.md) | 技術型客戶 | 品牌客製化、二次開發 |
| 📖 [Web 遠端桌面設定](./docs/WebHTTPS.md) | 行動端 / Go 主控使用者 | HTTPS 反代、網域設定 |
**系統要求** | 📖 [反濫用政策](./docs/Compliance_AntiAbuse.md) | 所有使用方 | 合規邊界、責任劃分 |
- 顯示伺服器X11/Xorg暫不支援 Wayland | 📖 [反濫用技術措施](./docs/Compliance_TechnicalMeasures.md) | 合規稽核方 | 屏障原始碼位置 + 設計動機 |
- 必需套件libX11
- 建議套件libXtstXTest 擴充、libXss閒置偵測
**功能支援**
| 功能 | 狀態 | 實作 |
|------|------|------|
| 遠端桌面 | ✅ | X11 螢幕擷取,滑鼠/鍵盤控制 |
| 遠端終端 | ✅ | PTY 互動式 Shell |
| 檔案管理 | ✅ | 雙向傳輸,大檔案支援 |
| 程序管理 | ✅ | 程序清單、終止程序 |
| 心跳/RTT | ✅ | RFC 6298 RTT 估算 |
| 常駐程式 | ✅ | 雙 fork 常駐化 |
| 剪貼簿 | ⏳ | 開發中 |
| 工作階段管理 | ⏳ | 開發中 |
**編譯方式**
```bash
cd linux
cmake .
make
```
### macOS 用戶端v1.3.2+
**系統要求**
- macOS 10.15 (Catalina) 及以上
- 架構支援Intel (x64) 和 Apple Silicon (arm64) 通用二進位
- 需要授予系統權限:螢幕錄製、輔助使用、完全磁碟存取
**功能支援**
| 功能 | 狀態 | 實作 |
|------|------|------|
| 遠端桌面 | ✅ | CoreGraphics 螢幕擷取VideoToolbox H.264 硬體編碼 |
| 滑鼠控制 | ✅ | CGEvent 模擬,支援雙擊、拖曳 |
| 鍵盤控制 | ✅ | CGEvent 模擬,完整鍵碼對應 |
| 游標同步 | ✅ | 即時同步遠端游標樣式 |
| 遠端終端 | ✅ | PTY 互動式 Shellzsh/bash |
| 檔案管理 | ✅ | 雙向傳輸、V2 協定、大檔案支援 |
| 心跳/RTT | ✅ | RFC 6298 RTT 估算 |
| 分組管理 | ✅ | 持久化設定檔 |
| 程序管理 | ⏳ | 開發中 |
| 剪貼簿 | ⏳ | 開發中 |
**編譯方式**
```bash
cd macos
./build.sh
# 或手動編譯:
# mkdir build && cd build && cmake .. && make
```
--- ---
## 更新日誌 ## 更新日誌
### v1.3.3 (2026.5.10) ### v1.3.4 (2026.5.20)
**Linux/macOS 用戶端深化 & 雙層認證安全 & 跨平台共享程式碼重構** **Go 主控 & 全平台主控閉環 & Linux/macOS 用戶端剪貼簿**
**新功能:** **新功能:**
- **服務端身分校驗Layer 1**Linux/macOS 用戶端 HMAC-SHA256 校驗服務端身分,未授權服務端無法觸發任何子連線 - **Go 主控**Go 語言實作的跨平台輕量主控服務Windows / Linux / macOS),聚焦於「遠端桌面 + 遠端終端 + 多使用者分級」——不取代 MFC 主控,為需要純 Linux/macOS 落地的運維情境兜底
- **子連線認證Layer 2TOKEN_CONN_AUTH**:所有子連線首包簽章 + clientID 鎖定,解決 NAT/127.0.0.1 路由錯位 - **Web 遠端桌面Go 主控)**H.264 → WebSocket → WebCodecs 解碼、1080P @ 20fps、桌面 + 行動端全適配遠端游標同步、Keyboard Lock 防 ESC/F11 誤退、控制態下 F11/Esc 直傳目標
- **Linux 用戶端**H.264 硬體編碼(動態載入 libx264、XFixes 游標類型偵測、UTF-8 協議能力位 - **Web 遠端終端Go 主控)**xterm.js + PTY/ConPTY 透明轉發、調整尺寸、中斷自動清理面板
- **macOS 用戶端**檔案管理員、遠端終端機(共享 PTYHandler、剪貼簿同步、守護程序模式 (-d)、電源管理、螢幕鎖定/閒置偵測、CGDisplayStream 推送模式最佳化 - **多使用者體系Go 主控)**:管理員 / 一般使用者分級、按裝置群授權、Challenge-Response 登入、登入限流IP + 使用者名)、不透明 token
- **主控**螢幕預覽縮圖、區域截圖、遠端桌面縮放、Web 使用者依群組過濾、嵌入式現代終端、自適應螢幕演算法、外部資源覆蓋、群組持久化、Build Dialog 支援產生 macOS 用戶端 - **Linux 用戶端剪貼簿**:基於 xclip / xsel 的雙向剪貼簿同步,支援 `text/uri-list` 檔案路徑
- **macOS 用戶端剪貼簿**:基於 NSPasteboard 的雙向剪貼簿同步,檔案 URL + 舊版 API 相容
**重構:**
- Linux/macOS 用戶端共享程式碼抽到 `common/`rtt_estimator / client_auth_state / posix_net_helpers / sub_conn_thread減少約 300 行重複
**改進:** **改進:**
- 現代終端 SYSTEM 相容:自動回退到經典終端,資訊列表給出精確原因 - Web 工作階段自適應品質被 clamp 到 H264-only 等級(≥ Good避免 Ultra/HighDIFF/RGB565讓瀏覽器無法解碼
- `build.ps1` 新增 `vswhere` 兜底VS 裝在非預設磁碟也能找到) - Linux 用戶端預設 `QualityLevel` 改為 `QUALITY_GOOD`(對齊 Windows/macOS不再請求伺服端自適應
- 強制 `/source-charset:utf-8 /execution-charset:.936` 解決英語 Windows 編譯中文亂碼 - 登入文字欄位按用戶端能力位條件解碼 UTF-8 / GBK修正德文 / 法文等帶變音符的主機名 / 地理位置亂碼
- macOS `install.sh` 來源 binary 優先順序最佳化(命令列 → 同目錄 → build/bin適配分發場景 - 裝置清單穩定排序(按上線時間),避免每次心跳 / WS 推播都洗牌
- RDP 重置按鈕接通到裝置端 `CMD_RESTORE_CONSOLE`
- MFC 主控開啟 Web 遠控工作階段時不再短暫閃一下視窗OnInitDialog 工作階段判定上移)
**Bug 修復:** **Bug 修復:**
- V2 檔案傳輸在檔案管理器對話方塊雙向均損壞(上傳 IP 路由錯亂 + 下載 chunk 未分發 - Web 工作階段從全螢幕點關閉後裝置清單點擊失靈fullscreen 子樹規則,`showPage` 統一退全螢幕
- 現代終端在 SYSTEM 權限下空白WebView2 不支援 LocalSystem - 用戶端突然中斷後 Web 遠控頁面停留在 "Connected" 永不更新(新增 `device_offline` 通知
- Linux 用戶端 UTF-8 路徑/作用視窗在服務端亂碼 - 多顯示器輪詢導致兩路螢幕子連線同時灌影格,畫面在兩個顯示器間跳變(`BindScreenConn` 退役舊 sub-conn
- 日誌列表表頭點擊錯誤排序到主機列表 - Go 主控 `ListDevices` 因 map 迭代隨機化導致清單亂序
- LVM_SETUNICODEFORMAT 後表頭排序失效(補充 HDN_ITEMCLICKW 對應)
- 服務+代理 Release 模式系統匣圖示不顯示 ### v1.3.3 (2026.5.10)
- macOS/Linux 用戶端群組變更後未重發 LOGIN_INFOR
- 檔案對話方塊 map 中野指標導致崩潰 **Linux/macOS 用戶端深化 & 雙層認證安全**
- 重連時未清回呼導致存取已銷毀 handler 崩潰
- MFC 與 Web 遠端桌面工作階段未完全獨立 - 伺服端身份校驗Layer 1Linux/macOS 用戶端 HMAC-SHA256 校驗伺服端身份
- macOS 鎖屏狀態遠端桌面啟動時未喚醒顯示器 - 子連線認證Layer 2TOKEN_CONN_AUTH所有子連線首封簽章 + clientID 釘死
- MFC 遠端桌面觸控板雙指捲動失效 - Linux 用戶端H.264 硬體編碼、XFixes 游標類型偵測、UTF-8 協定能力位
- macOS 用戶端:檔案管理器、遠端終端、剪貼簿同步、常駐程序模式
- 主控螢幕預覽縮圖、區域截圖、遠端桌面縮放、Web 使用者按群過濾
- 共用程式碼抽到 `common/`rtt_estimator / client_auth_state / posix_net_helpers
### v1.3.2 (2026.5.1) ### v1.3.2 (2026.5.1)
**macOS 用戶端 & Web 遠端桌面增強** **macOS 用戶端 & Web 遠端桌面增強**
**新功能:** - 全新 macOS 原生用戶端螢幕擷取、H.264 編碼、鍵鼠控制
- macOS 用戶端支援:全新實現的 macOS 原生用戶端支援螢幕擷取、H.264 編碼、鍵鼠控制、系統權限管理 - Web 遠端桌面游標同步
- Web 遠端桌面游標同步:瀏覽器端即時顯示遠端主機游標樣式 - 觸發器功能、使用者管理(角色權限)
- 觸發器功能:支援主機上線事件觸發自訂操作 - DLL 執行增強、遠端桌面輸入法切換
- 使用者管理功能:新增角色權限管理,支援多使用者分級控制
- DLL 執行增強:參數持久化儲存、支援自動執行設定
- 遠端桌面輸入法切換:支援遠端切換被控端輸入語言
**改進:**
- Web 遠端桌面手勢最佳化改進雙指手勢識別、雙擊拖曳、Shift 組合鍵支援
**Bug 修復:**
- 修復 Web 遠端桌面在 macOS 用戶端上雙擊無法開啟檔案的問題
- 修復 macOS 完全磁碟存取權限偵測不準確的問題
- 修復 RestoreMemDLL 因 DLL 資訊大小錯誤導致還原失敗
- 修復多個 DLL 同時執行可能因全域變數衝突而失敗
- 修復滑鼠雙擊和遠端桌面切換問題
- 修復 Linux 用戶端編譯缺少 libzstd.a 的問題
### v1.3.1 (2026.4.15) ### v1.3.1 (2026.4.15)
**Web 遠端桌面 & 多主控共享增強** **Web 遠端桌面MFC 主控)& 多主控共享增強**
**新功能:** - Web 遠端桌面:基於 WebSocket 實作,手機 / 平板瀏覽器存取
- Web 遠端桌面:基於 WebSocket 實現,支援手機/平板透過瀏覽器存取遠端桌面([設定指南](./docs/WebHTTPS.md) - 多顯示器停用自適應、狀態列到期日期自動更新
- 撤銷共享選單:支援撤銷已共享給其他主控的用戶端 - 多層授權自動更新、DLL 快取重用
- 工具列音訊控制:遠端桌面工具列新增系統音訊開關圖示
**改進:**
- 多顯示器停用自適應:用戶端有多個顯示器時自動停用自適應品質
- 狀態列過期日期自動更新:授權續期後狀態列立即重新整理
- 減少無效離線日誌:用戶端不在主機清單時減少離線日誌輸出
- 多層授權自動更新:第二層及以下主控的授權自動同步更新
- 使用提示增強:新增多處操作提示改善使用者體驗
- DLL 快取復用:將 DLL 儲存到登錄檔,下次啟動時直接復用
**Bug 修復:**
- 修復共享用戶端時鍵盤記錄可能無法正常運作的問題
### v1.3.0 (2026.4.8) ### v1.3.0 (2026.4.8)
**多層級 FRP 架構 & 品牌定制** **多層級 FRP 架構 & 品牌客製化**
**新功能:** - 本機 FRPS 伺服器、多層級架構自動 FRP 整合
- 本地 FRPS 伺服器支援(僅 64 位元):內建 FRP 伺服端,簡化部署 - V2 授權下級連線數限制、授權檔匯入 / 匯出
- 多層級架構自動 FRP 整合:下級主控自動取得上級 FRP 設定 - 增強型硬體 ID (V2)、UI 品牌客製化
- V2 授權下級連線數限制:支援控制下級並發連線數 - 執行時功能限制可設定
- 許可證檔案匯入/匯出支援(.lic 格式)
- 過期授權續期支援:無需重新產生許可證
- 增強型硬體 ID (V2):解決 VPS 重複 SN 問題
- MaxDepth 控制:限制分級 Master 層級深度
- 許可證管理增強:配額支援、動態對話框、刪除功能
- IP 定位 API 多提供商回退:提高定位成功率
- UI 品牌定制支援自訂程式名稱、Logo、版權等
- 執行時功能限制:試用版功能限制可設定
- 輸入歷史下拉框:快速選擇歷史輸入
- 產生用戶端新增選項:更多自訂設定
- 支援動態修改專案連結:無需重新編譯更換說明/回饋連結
**Bug 修復:** ### 更早版本
- 修復 RebuildFilteredIndices 的 Use-after-free 崩潰
- 修復 CLock::Lock 中 IOCP 競態條件崩潰 (#215)
- 修復崩潰保護服務清理和代理提升問題
- 修復訊息日誌無限增長導致的潛在崩潰
- 修復 FeatureFlags 引入後 UpperHash 字串長度問題
- 修復用戶端 SN 產生以支援 HWIDVersion 設定
**改進:** v1.2.x 系列(郵件通知、遠端音訊 Opus、V2 授權協定、V2 檔案傳輸、現代 Web 終端 xterm.js、遠端桌面工具列重寫、自適應品質控制、Linux 用戶端初版……)及 2019 年以來的全部演進,請見 [history.md](./history.md)。
- 重構 res/ 目錄結構,新增選單圖示
- 過期密碼不再被自動清除
- 保持下級主控與第一層主控的連線穩定
### v1.0.2.9 (2026.3.27)
**網路安全 & 穩定性增強**
**新功能:**
- 網路設定對話框IP 白名單/黑名單管理,即時生效
- 可設定的連線限流DLL 請求限流、IP 封禁閾值可調
- IP 歷史記錄對話框:檢視授權 IP 登入歷史
- 狀態列顯示 MTBF/執行時間和授權到期日期
- 代理崩潰保護5 分鐘內 3 次崩潰自動切換一般模式
- 用戶端搜尋功能Ctrl+F 快速搜尋 IP、位置、電腦名稱
- 自動封禁異常 IP60 秒內超過 15 次連線自動封禁 1 小時
- Proxy Protocol v2 支援FRP 代理後取得真實用戶端 IP
- Linux 剪貼簿同步和 V2 檔案傳輸支援
- 右鍵選單執行用戶端程式
- 多層授權混淆支援
**Bug 修復:**
- 修復 OnUserOfflineMsg 競態條件導致的崩潰
- 修復用戶端請求 FRPC DLL 時 FrpcParam 遺失
- 最大資料封包從 10MB 增加到 50MB
- 支援 mstsc 遠端工作階段讀取使用者登錄檔
- 修復遠端桌面最小化時剪貼簿誤觸發
- 修復操作程序對話框時主控崩潰
- 狀態列主機數量即時更新
- Linux select() 呼叫前重設 timeval
- 授權碼格式驗證,過濾垃圾資料
**改進:**
- 增強授權檢查,新增 IP 封禁提示
- 支援主控程式以使用者權限執行
- 大型 DLL 自動使用 TinyRun 回退方案
### v1.2.8 (2026.3.11)
**郵件通知 & 遠端音訊**
- 主機上線郵件通知SMTP 配置、關鍵字匹配、右鍵快捷添加)
- 遠端音訊播放WASAPI Loopback+ Opus 壓縮24:1
- 多 FRPS 伺服器同時連接支援
- 自訂游標顯示和追蹤
- V2 授權協定ECDSA 簽名)
- 修復非中文 Windows 系統亂碼問題
- Linux 用戶端螢幕壓縮演算法優化
### v1.2.7 (2026.2.28)
**V2 檔案傳輸協定**
- 支援 C2C用戶端到用戶端直接傳輸
- 斷點續傳和大檔案支援(>4GB
- SHA-256 檔案完整性校驗
- WebView2 + xterm.js 現代終端
- Linux 檔案管理支援
- 主機清單批次更新優化,減少 UI 閃爍
### v1.2.6 (2026.2.16)
**遠端桌面工具列重寫**
- 狀態視窗顯示 RTT、幀率、解析度
- 全螢幕工具列支援 4 個位置和多顯示器
- H.264 頻寬優化
- 授權管理 UI 完善
### v1.2.5 (2026.2.11)
**自適應品質控制 & Linux 用戶端**
- 基於 RTT 的智慧品質調整
- RGB565 演算法(節省 50% 頻寬)
- 捲動偵測優化(節省 50-80% 頻寬)
- Linux 用戶端初版發佈
完整更新歷史請檢視:[history.md](./history.md)
--- ---

View File

@@ -13,7 +13,7 @@
#undef APSTUDIO_READONLY_SYMBOLS #undef APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// 中文(简体,中国) resources // 中文(简体,中国) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
@@ -88,7 +88,7 @@ IDR_WAVE WAVE "Res\\msg.wav"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,3 FILEVERSION 1,0,3,4
PRODUCTVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
@@ -106,7 +106,7 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "FUCK THE UNIVERSE" VALUE "CompanyName", "FUCK THE UNIVERSE"
VALUE "FileDescription", "A GHOST" VALUE "FileDescription", "A GHOST"
VALUE "FileVersion", "1.0.3.3" VALUE "FileVersion", "1.0.3.4"
VALUE "InternalName", "ServerDll.dll" VALUE "InternalName", "ServerDll.dll"
VALUE "LegalCopyright", "Copyright (C) 2019-2026" VALUE "LegalCopyright", "Copyright (C) 2019-2026"
VALUE "OriginalFilename", "ServerDll.dll" VALUE "OriginalFilename", "ServerDll.dll"
@@ -132,7 +132,7 @@ IDI_ICON_MAIN ICON "Res\\ghost.ico"
IDI_ICON_MSG ICON "Res\\msg.ico" IDI_ICON_MSG ICON "Res\\msg.ico"
#endif // 中文(简体,中国) resources #endif // 中文(简体,中国) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

Binary file not shown.

View File

@@ -651,6 +651,68 @@ Release v1.1.4
* 修复: 屏幕缩放时远程控制坐标不正确 * 修复: 屏幕缩放时远程控制坐标不正确
* 修复: CShellDlg::OnCtlColor 中的 GDI 画刷泄漏 * 修复: CShellDlg::OnCtlColor 中的 GDI 画刷泄漏
**2026.02.28**
发布版本 v1.2.7
本版本引入支持 C2C 的 V2 文件传输协议,集成现代 Web 终端,并扩展 Linux 客户端能力。
* 功能: V2 文件传输协议,支持大于 4GB 的文件
* 功能: C2C客户端到客户端直接传输无需经过主控中转
* 功能: 断点续传,状态持久化到 `%TEMP%\FileTransfer\`
* 功能: SHA-256 文件完整性校验
* 功能: 基于 WebView2 + xterm.js 的现代 Web 终端
* 功能: Linux 客户端新增文件管理支持
* 改进: 主机列表批量更新,减少 UI 闪烁
* 改进: V1/V2 协议共存与自动识别
* 改进: 77 字节 V2 包头预留扩展字段
* 修复: 文件对话框释放阶段的若干稳定性问题
**2026.03.11**
发布版本 v1.2.8
本版本新增主机上线邮件通知、远程音频播放、V2 授权协议,并改进多 FRPS 支持。
* 功能: 主机上线邮件通知SMTP 配置、关键词匹配、右键快捷添加)
* 功能: 远程音频播放WASAPI Loopback+ Opus 压缩(约 24:1
* 功能: 多 FRPS 服务器同时连接支持
* 功能: 自定义光标显示和追踪
* 功能: V2 授权协议,采用 ECDSA 签名
* 改进: Linux 客户端屏幕压缩算法调优
* 改进: 非中文 Windows 主机的编码强化
* 修复: 非中文 Windows 系统乱码问题
**2026.03.27**
发布版本 v1.2.9
本版本强化网络安全新增连接限流、IP 白/黑名单,加固代理崩溃恢复,并带来 Linux 剪贴板同步及 V2 文件传输。
* 功能: 网络配置对话框IP 白/黑名单实时生效
* 功能: 可配置的连接限流DLL 请求限流、IP 封禁阈值可调)
* 功能: IP 历史记录对话框,查看授权 IP 登录历史
* 功能: 状态栏显示 MTBF/运行时间和授权到期日期
* 功能: 代理崩溃保护——5 分钟内 3 次崩溃自动切换普通模式
* 功能: 客户端搜索Ctrl+F快速搜索 IP、位置、计算机名
* 功能: 自动封禁异常 IP——60 秒内超过 15 次连接自动封禁 1 小时
* 功能: Proxy Protocol v2 支持FRP 代理后获取真实客户端 IP
* 功能: Linux 剪贴板同步和 V2 文件传输支持
* 功能: 右键菜单运行客户端程序
* 功能: 多层授权混淆支持
* 改进: 增强授权检查,添加 IP 封禁提示
* 改进: 支持主控程序以用户权限运行
* 改进: 大 DLL 自动使用 TinyRun 回退方案
* 改进: 最大数据包从 10MB 提升到 50MB
* 改进: mstsc 远程会话可读取用户注册表
* 改进: 授权码格式验证,过滤垃圾数据
* 修复: OnUserOfflineMsg 竞态条件导致主控崩溃
* 修复: 客户端请求 FRPC DLL 时 FrpcParam 丢失
* 修复: 远程桌面最小化时剪贴板误触发
* 修复: 操作进程对话框时主控崩溃
* 修复: 状态栏主机数量实时更新
* 修复: Linux `select()` 调用前未重置 timeval
--- ---
[English, since 2025] [English, since 2025]
@@ -1061,3 +1123,65 @@ This release focuses on optimizing remote desktop toolbar experience, enhancing
* Fix: Race condition causes Linux client crash * Fix: Race condition causes Linux client crash
* Fix: Incorrect remote control coordinates when screen is scaled * Fix: Incorrect remote control coordinates when screen is scaled
* Fix: GDI brush leak in CShellDlg::OnCtlColor * Fix: GDI brush leak in CShellDlg::OnCtlColor
**2026.02.28**
Release v1.2.7
This release introduces the V2 file transfer protocol with C2C support, integrates a modern Web terminal, and extends Linux client capabilities.
* Feature: V2 file transfer protocol with support for files larger than 4GB
* Feature: C2C (client-to-client) direct file transfer, no master relay required
* Feature: Resumable file transfer with state persistence under `%TEMP%\FileTransfer\`
* Feature: SHA-256 file integrity verification
* Feature: Modern Web terminal based on WebView2 + xterm.js
* Feature: Linux client adds file management support
* Improve: Batch host list updates to reduce UI flicker
* Improve: V1/V2 protocol coexistence and auto-detection
* Improve: 77-byte V2 packet header with reserved fields for future extension
* Fix: Misc stability improvements around file dialog teardown
**2026.03.11**
Release v1.2.8
This release adds host online email notifications, enables remote audio playback, introduces the V2 license protocol, and improves multi-FRPS support.
* Feature: Host online email notification (SMTP configuration, keyword matching, right-click quick-add)
* Feature: Remote audio playback via WASAPI Loopback + Opus compression (~24:1 ratio)
* Feature: Multi-FRPS server simultaneous connection support
* Feature: Custom cursor display and tracking
* Feature: V2 license protocol with ECDSA signature
* Improve: Linux client screen compression algorithm tuning
* Improve: Encoding hardening for non-Chinese Windows hosts
* Fix: Mojibake on non-Chinese Windows systems
**2026.03.27**
Release v1.2.9
This release strengthens network security, adds connection rate limiting, introduces IP whitelisting / blacklisting, hardens proxy crash recovery, and brings Linux clipboard sync and V2 file transfer.
* Feature: Network configuration dialog with IP whitelist / blacklist, applied in real time
* Feature: Configurable connection rate limiting (DLL request throttle, IP ban threshold)
* Feature: IP history dialog showing authorized-IP login history
* Feature: Status bar displays MTBF / uptime and license expiry date
* Feature: Proxy crash protection — auto-fallback to direct mode after 3 crashes within 5 minutes
* Feature: Client search (Ctrl+F) — quick filter by IP, location, computer name
* Feature: Auto-ban abnormal IPs — 60s / 15-connection threshold triggers a 1-hour ban
* Feature: Proxy Protocol v2 support — recover real client IP behind FRP
* Feature: Linux clipboard sync and V2 file transfer support
* Feature: Right-click menu to run client program
* Feature: Multi-layer license obfuscation
* Improve: Authorization check tightened with IP ban hints
* Improve: Master can run with normal user privileges
* Improve: Large DLLs automatically fall back to TinyRun
* Improve: Max packet size raised from 10MB to 50MB
* Improve: mstsc remote sessions can read user registry hive
* Improve: Authorization code format validation, filters garbage input
* Fix: OnUserOfflineMsg race condition causing master crash
* Fix: FrpcParam lost when client requests FRPC DLL
* Fix: Minimized remote desktop falsely triggering clipboard handling
* Fix: Master crash when operating on the process dialog
* Fix: Status bar host count now updates in real time
* Fix: Linux `select()` timeval not being reset before each call

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 125 KiB

BIN
images/WebRemote.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

View File

@@ -246,6 +246,7 @@
<None Include="..\..\x64\Release\ServerDll.dll" /> <None Include="..\..\x64\Release\ServerDll.dll" />
<None Include="..\..\x64\Release\TestRun.exe" /> <None Include="..\..\x64\Release\TestRun.exe" />
<None Include="..\..\x64\Release\TinyRun.dll" /> <None Include="..\..\x64\Release\TinyRun.dll" />
<None Include="..\web\index.html" />
<None Include="lang\en_US.ini" /> <None Include="lang\en_US.ini" />
<None Include="lang\zh_TW.ini" /> <None Include="lang\zh_TW.ini" />
<None Include="res\1.cur" /> <None Include="res\1.cur" />

View File

@@ -331,6 +331,7 @@
<None Include="lang\zh_TW.ini" /> <None Include="lang\zh_TW.ini" />
<None Include="res\3rd\TerminalModule_x64.dll" /> <None Include="res\3rd\TerminalModule_x64.dll" />
<None Include="..\..\macos\ghost" /> <None Include="..\..\macos\ghost" />
<None Include="..\web\index.html" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Text Include="..\..\ReadMe.md" /> <Text Include="..\..\ReadMe.md" />

View File

@@ -46,7 +46,7 @@
// 程序版本号 [建议格式: X.Y.Z] // 程序版本号 [建议格式: X.Y.Z]
// 影响:关于对话框、标题栏 // 影响:关于对话框、标题栏
#define BRAND_VERSION "1.3.3" #define BRAND_VERSION "1.3.4"
// 启动画面名称 [建议大写,更有 Logo 感] // 启动画面名称 [建议大写,更有 Logo 感]
// 影响:启动画面 Logo 文字(大号艺术字体渲染) // 影响:启动画面 Logo 文字(大号艺术字体渲染)