# 远程连接项目 **Repository Path**: liao1230/remote-connection-project ## Basic Information - **Project Name**: 远程连接项目 - **Description**: 做一个和向日葵软件一样的远程操控桌面和传输文件,再多扩展 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-24 - **Last Updated**: 2026-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 远程桌面项目(RustDesk 二次开发,自包含版) > 目标:在家里 Windows 上远程控制公司 Mac 的桌面。 > 选型:RustDesk(开源)+ 官方/自建中继 + 直连模式。 ## 两个 Gitee 仓库的分工 | 仓库 | 管什么 | 地址 | |------|--------|------| | **本仓库** `remote-connection-project` | 客户端 + 源码 + 文档 + 跑通指南 | gitee.com/liao1230/remote-connection-project | | **后端仓库** `remote-connection-to-backend` | 自建后端部署(hbbs/hbbr)+ 后端扩展模块 | gitee.com/liao1230/remote-connection-to-backend | 两条路: - **路 A(官方中继, 零服务器)**: 用本仓库 `build/bin` 预编译包, 照 [notes/快速上手.md](notes/快速上手.md) 立刻跑通 - **路 B(自建后端, 需租云服务器)**: 本仓库出客户端, 后端仓库出服务器部署, 照 [notes/路B-自建后端.md](notes/路B-自建后端.md) ## 目录 ``` ├─ rustdesk/ ← RustDesk 客户端源码(自包含, 可改) ├─ hbb_common/ ← 中继核心库( ★ 唯一可编辑来源 ) ├─ rustdesk/libs/hbb_common/ ← 编译副本( 自动从顶层同步, 别手改 ) ├─ build/bin/ ← 本地缓存 1.4.9 预编译包( 不入 git ) ├─ notes/ │ ├─ 快速上手.md ← 10 分钟跑通(路 A 默认, 零服务器) │ ├─ 项目说明.md ← 总览 │ ├─ 模块扩展指南.md ← 你要"扩展模块"看这个 │ ├─ 路B-自建后端.md ← 需租云服务器, 数据完全私密 │ ├─ 下载预编译.ps1 ← 一条命令拉回 1.4.9 安装包 │ ├─ 网络恢复续编译.md ← 网络通后补齐编译(含镜像源章节) │ ├─ 同步上游.ps1 + .md ← 一键同步上游新代码 │ ├─ cargo-mirror.toml ← 清华 TUNA cargo 镜像配置 │ ├─ enable-mirror.ps1 ← 启用镜像(cargo TUNA + git 加速) │ └─ disable-mirror.ps1 ← 停用镜像 └─ README.md ← 本文件 ``` ## hbb_common 单一来源原则 顶层 `hbb_common/` 是**唯一可编辑来源**。 `rustdesk/libs/hbb_common/` 是编译副本, 由 `同步上游.ps1` 自动从顶层拷入。 **永远只改顶层**, 不要直接改 `rustdesk/libs/hbb_common/`。 ## 快速开始 1. **跑通链路(不依赖编译, 路 A)**: - 家里 Win 双击 `build/bin/rustdesk-1.4.9-x86_64.exe` - 公司 Mac 装 `build/bin/rustdesk-1.4.9-x86_64.dmg` - 照 [notes/快速上手.md](notes/快速上手.md) 填 ID + 密码, 默认走官方中继 - 安装包丢了就跑 `notes/下载预编译.ps1` 2. **扩展模块**: - 看 [notes/模块扩展指南.md](notes/模块扩展指南.md) - 最小骨架: 新建 `rustdesk/src/<模块>/` + `lib.rs` 加 `pub mod` + UI 挂入口 3. **自建后端(路 B)**: - 客户端填服务器 IP + key, 见 [notes/路B-自建后端.md](notes/路B-自建后端.md) - 服务器部署: 去后端仓库 `remote-connection-to-backend`, `docker compose up -d` 4. **同步上游 / 离线编译**: - 同步上游: `notes/同步上游.ps1` - 离线编译: `notes/enable-mirror.ps1` 后 `cargo build --locked --release --features inline` - 用完 `notes/disable-mirror.ps1` 还原 ## 当前状态 | 项 | 状态 | |----|------| | 源码 | 自包含 embed, clone 即得完整 | | 预编译 | build/bin 有 1.4.9( 不入 git ) | | 文档 | 10 份( 快速上手/项目说明/扩展/路B/下载/续编译/同步/镜像x3 ) | | 镜像源 | 已配( TUNA + gitclone, 可开关 ) | | 编译 | 未做( GitHub 网络不稳, 镜像可用 ) | | 后端部署 | 在后端仓库 `remote-connection-to-backend` | ## 卡点 这台 Windows 对 GitHub 443 时通时不通, 导致 `cargo build` 拉不到 C 依赖 ( chromium.googlesource 的 libwebm )。已配好国内镜像源兜底: - `cargo-mirror.toml` — 清华 TUNA( 可达, HTTP 200 ) - `enable-mirror.ps1` — 启用( TUNA + gitclone.com 加速 ) - `disable-mirror.ps1` — 停用( 还原官方源 ) 断点续编命令: [notes/网络恢复续编译.md](notes/网络恢复续编译.md)。