惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Jina AI
Jina AI
V
Vulnerabilities – Threatpost
Security Latest
Security Latest
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
H
Help Net Security
Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
L
LINUX DO - 最新话题
A
Arctic Wolf
博客园_首页
S
Securelist
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Cyberwarzone
Cyberwarzone
小众软件
小众软件
T
Threatpost
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
NISL@THU
NISL@THU
Forbes - Security
Forbes - Security
博客园 - 聂微东
F
Fortinet All Blogs
Simon Willison's Weblog
Simon Willison's Weblog
H
Heimdal Security Blog
罗磊的独立博客
S
Security @ Cisco Blogs
B
Blog
T
Troy Hunt's Blog
Engineering at Meta
Engineering at Meta
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Hacker News
The Hacker News
The Last Watchdog
The Last Watchdog
Hacker News - Newest:
Hacker News - Newest: "LLM"
I
Intezer
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
The Cloudflare Blog
S
Schneier on Security
月光博客
月光博客
L
LINUX DO - 热门话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

好好学习的郝

ClawdBot(OpenClaw)试用记录 编程辅助工具 Codex 入门篇 编程辅助工具 Claude Code 入门篇 Claude API 中转服务 Claude Relay Service LLM 接口管理和分发系统 New API 好好学Git:Git Submodule详解 编程辅助工具Cursor入门篇 好好学Golang:Golang问题记录 One API配置自定义渠道 FastAPI入门篇 好好学Docker:使用Docker安装配置AList 好好学Docker:容器指标查看工具ctop 好好学Linux:Ubuntu18 升级到 Ubuntu22 好好学Docker:使用Docker安装配置FileBrowser 邮箱配置中的SPF、DKIM、DMARC记录 One API 开发环境配置 LLM 接口管理和分发系统 One API 好好学K8S:K8S中的Leader Election机制 好好学Golang:Viper库
好好学Docker:自建RustDesk Server
本文作者: 好好学习的郝 · 2024-11-09 · via 好好学习的郝

RustDesk 是一款开源的远程桌面软件,是 TeamViewer、向日葵的替代软件,提供了高效、安全的远程访问解决方案。

相关文档:

2. 安装RustDesk Client

2.1. Ubuntu22中安装RustDesk Client

本节中,我们在 Ubuntu22 中安装支持 Wayland 的 RustDesk Client。

1、下载 RustDesk Client 安装包

1
wget https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.3.3-x86_64.deb

2、安装 RustDesk Client

1
apt install -fy ./rustdesk-1.3.3-x86_64.deb

3、启动 RustDesk Client
在图形化界面中,启动RustDesk Client,记录下ID和密码用于远程控制。
建议设置一个固定的密码,并设置开机自动启动。

2.2. MacOS中安装 RustDesk Client

1、下载 RustDesk Client 安装包

1
wget https://github.com/rustdesk/rustdesk/releases/download/nightly/rustdesk-1.3.3-x86_64.dmg

2、安装 RustDesk Client
双击 dmg 文件,拖拽安装

3、启动 RustDesk Client

3. 使用RustDesk进行远程操作

在两台设备上安装并启动 RustDesk Client,然后就可以像Teamviewer一样,输入对方的ID和密码,进行远程控制了。

RustDesk首次建立连接后会提示 请选择要分享的画面(对端操作) ,也就是说必须要求对端操作才能开始远程。
对端选择屏幕并记住选择后,后续再建立连接就不需要对端操作了。

注意:使用RustDesk远程时,哪怕对端已经锁屏息屏,也可以唤醒并进行远程,相当于本地操作远程屏幕。

重启主机后再次连接,会提示 不支持使用 Wayland 登录界面 ,说明RustDesk对 Wayland 的支持并不好。详情参考:Login screen using Wayland is not supported yet.

4. 自建RustDesk Server

4.1. 为什么需要自建RustDesk Server?

以上,我们已经可以使用RustDesk Client,为什么还需要自建RustDesk Server?
两个原因:

  • 由于被诈骗分子频繁使用,该项目现已暂停国内服务。
  • 使用默认的RustDesk Server,稳定性和隐私性不能保证。

因此,自建RustDesk Server还是有必要的。

4.2. 基于Docker搭建RustDesk Server

参考文档:

1、准备软件目录

1
mkdir -p /opt/rustdesk/data

2、准备 docker-compose.yml

1
2
cd /opt/rustdesk/
vim docker-compose.yml

写入如下内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
services:
hbbs:
container_name: hbbs
image: rustdesk/rustdesk-server:1.1.12
command: hbbs
volumes:
- /opt/rustdesk/data:/root
network_mode: "host"

depends_on:
- hbbr
restart: unless-stopped

hbbr:
container_name: hbbr
image: rustdesk/rustdesk-server:1.1.12
command: hbbr
volumes:
- /opt/rustdesk/data:/root
network_mode: "host"
restart: unless-stopped

3、启动 RustDesk Server

1
docker-compose up -d

4、查看 RustDesk Server 状态

1
2
3
4
docker-compose ps
docker ps | grep rustdesk
docker logs hbbs
docker logs hbbr

5、获取服务器Key

1
docker logs hbbs

可以在日志中看到一个Key,记录下来。

4.3. 开放端口

hbbs默认监听端口:

  • 21114(TCP):用于 Web 控制台,仅在 Pro 版本中可用
  • 21115(TCP):用于 NAT 类型测试
  • 21116(TCP/UDP):UDP 用于 ID 注册和心跳服务,TCP 用于 TCP 打孔和连接服务
  • 21118(TCP):用于支持Web客户端,可选禁用

hbbr默认监听端口:

  • 21117(TCP):用于 Relay 服务
  • 21119(TCP):用于支持Web客户端,可选禁用

5. 配置使用Rust Server

假设 Rust Server 的IP地址为 8.136.12.13

1、打开Rust Client设置页面

2、网络,解锁网络设置

  • ID服务器:填入 8.136.13.58:21116
  • 中继服务器:填入 8.136.13.58:21117
  • Key:填入【基于Docker搭建RustDesk Server】一节中获取到的Key。