update zh-tw translation

This commit is contained in:
5idereal
2023-07-13 18:47:05 +08:00
committed by GitHub
parent 1b9a14bbe4
commit e76e59cb6a
21 changed files with 505 additions and 175 deletions

View File

@@ -1,5 +1,5 @@
---
title: 自建服務
title: 自架伺服
weight: 5
pre: "<b>2. </b>"
chapter: true
@@ -7,8 +7,8 @@ chapter: true
### 章節 2
# 自建服務
# 自架伺服
我們在持續開發服務器,如果您有什麼意見,請加入我們的[Discord](https://discord.com/invite/nDceKgxnkV)討論
如果您想要和我們聊聊關於[自架 RustDesk 伺服器](https://github.com/rustdesk/rustdesk-server)的事,請加入我們的 [Discord](https://discord.com/invite/nDceKgxnkV) 伺服器
{{% children depth="3" showhidden="true" %}}
{{% children depth="3" showhidden="true" %}}

View File

@@ -6,7 +6,7 @@ weight: 10
## 如何自建中繼
-----------
### 步驟1: 下載服器端軟件程序
### 步驟1: 下載服器端軟件程序
[下載](https://gitee.com/rustdesk/rustdesk-server/)或者使用docker[rustdesk/rustdesk-server](https://hub.docker.com/r/rustdesk/rustdesk-server/tags)。
@@ -17,27 +17,27 @@ weight: 10
以下針對Linux版本做使用說明。
有兩個可執行文件和一個文件夾:
- hbbs - RustDesk ID註冊服
- hbbr - RustDesk 中繼服
- hbbs - RustDesk ID註冊服器
- hbbr - RustDesk 中繼服器
Linux版本在Centos7構建在 Centos7/8Ubuntu 18/20上測試過Debian系列的發行版本應該都沒有問題。如果有其他發行版本需求請聯繫我。
#### 服器要求
硬件要求很低,最低配置的雲服器就可以了CPU和內存要求都是最小的。關於網絡大小如果TCP打洞直連失敗就要耗費中繼流量一個中繼連接的流量在30k-3M每秒之間1920x1080屏幕取決於清晰度設置和畫面變化如果只是辦公需求平均在100K。
#### 服器要求
硬件要求很低,最低配置的雲服器就可以了CPU和內存要求都是最小的。關於網絡大小如果TCP打洞直連失敗就要耗費中繼流量一個中繼連接的流量在30k-3M每秒之間1920x1080屏幕取決於清晰度設置和畫面變化如果只是辦公需求平均在100K。
### 步驟2: 在服器上運行 hbbs 和 hbbr
### 步驟2: 在服器上運行 hbbs 和 hbbr
在服器上運行 hbbs/hbbr (Centos 或 Ubuntu)。建議使用[pm2](https://pm2.keymetrics.io/) 管理服務。
服器上運行 hbbs/hbbr (Centos 或 Ubuntu)。建議使用[pm2](https://pm2.keymetrics.io/) 管理服務。
```
./hbbs -r <hbbr運行所在主機的地址[:port]>
./hbbr
./hbbs -r <hbbr運行所在主機的地址[:port]>
./hbbr
```
或者使用 pm2 運行 hbbs/hbbr
```
pm2 start hbbs -- -r <relay-server-ip[:port]>
pm2 start hbbs -- -r <relay-server-ip[:port]>
pm2 start hbbr
```
@@ -47,7 +47,7 @@ pm2 start hbbr
`pm2` 需要 nodejs v16+,如果你運行 pm2 失敗(例如在 `pm2 list` 中看不到 hbbs/hbbr請從 https://nodejs.org 下載並安裝 LTS 版本的 nodejs。如果你想讓 hbbs/hbbr 在重啟後自動運行,請查看 `pm2 save``pm2 startup`。更多關於 [pm2](https://pm2.keymetrics.io/docs/usage/quick-start/)。另一個不錯的日誌工具是 [pm2-logrotate](https://github.com/keymetrics/pm2-logrotate)。
hhbs的`-r`參數不是必須的,他只是方便你不用在客戶端指定中繼服器。客戶端指定的中繼服器優先級高於這個。
hhbs的`-r`參數不是必須的,他只是方便你不用在客戶端指定中繼服器。客戶端指定的中繼服器優先級高於這個。
{{% /notice %}}
@@ -61,8 +61,8 @@ hhbs的`-r`參數不是必須的,他只是方便你不用在客戶端指定中
#### Docker示範
```
sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -td --net=host rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -td --net=host rustdesk/rustdesk-server hbbr
sudo docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -td --net=host rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -td --net=host rustdesk/rustdesk-server hbbr
```
<a name="net-host"></a>
@@ -76,11 +76,11 @@ sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -td --n
### 步驟3: 在客戶端設置 hbbs/hbbr 地址
點擊 ID 右側的單按鈕如下,選擇“ ID/中繼服器”。
點擊 ID 右側的單按鈕如下,選擇“ ID/中繼服器”。
![](/docs/en/self-host/install/images/server-set-menu.png)
在 ID 服器輸入框中(被控端+主控端)輸入 hbbs 主機或 ip 地址另外兩個地址可以不填RustDesk會自動推導如果沒有特別設定中繼服器指的是hbbr21117端口。
在 ID 服器輸入框中(被控端+主控端)輸入 hbbs 主機或 ip 地址另外兩個地址可以不填RustDesk會自動推導如果沒有特別設定中繼服器指的是hbbr21117端口。
例如:

View File

@@ -0,0 +1,44 @@
---
title: 專業版
weight: 100
---
自架專業版基於開源版本,但提供更多功能。
- OIDC, ldap, 2FA (電子郵件驗證)
- 通訊錄
- 重新命名
- 記錄管理
- 裝置管理
- 設定同步
- 權限控制
- 多台中繼伺服器 (自動選擇離您最近的中繼伺服器)
{{% notice note %}}
需要 RustDesk 客戶端 1.2.0 以上版本
{{% /notice %}}
## 下載
[https://github.com/rustdesk/rustdesk-server-pro/releases/tag/1.1.8](https://github.com/rustdesk/rustdesk-server-pro/releases/tag/1.1.8)
## 安裝
### 簡易安裝
為了使過程輕鬆點,我們開發的腳本能幫您搞定一切 (安裝/升級/從開源版本轉換) [簡易安裝腳本](https://rustdesk.com/docs/en/self-host/pro/installscript/)
{{% notice note %}}
別忘記從 [https://rustdesk.com/pricing.html](https://rustdesk.com/pricing.html) 取得授權,查閱[授權](/docs/en/self-host/pro/license)頁面以了解詳情。
{{% /notice %}}
### 手動安裝
幾乎與[開源版本](/docs/en/self-host/install/)相同,但您在執行 hbbs/hbbr 時不需加上任何參數,全部都能在網頁控制台中設定。
- `-k _` 預設設定
- `-r <server:host>` 如果中繼伺服器跟 hbbs 在同一台伺服器執行,便不需要加上此參數。且您可以在網頁控制台設置多台中繼伺服器。
### 額外連接埠 (或使用 Proxy)
新增一個用於網頁控制台的 tcp 連接埠 `21114`,請在設定防火牆規則和 Docker 連接埠對應時新增此連接埠。

View File

@@ -0,0 +1,43 @@
---
title: 網頁控制台
weight: 10
---
功能:
- 新增/變更使用者和使用者群組
- 變更裝置存取權限
- 瀏覽裝置連線和其他紀錄檔
- 更新設定
- 管理客戶端設定同步策略
## 登入
如同之前所述,網頁控制台的預設連接埠為 21114。在瀏覽器輸入 `http://<hbbs host>:21114` 以進入控制台頁面。如下圖所示 (hbbs 執行在 IP 為 192.168.1.143 的伺服器上)
![](/docs/en/self-host/pro/console/images/console-login.png)
如果您需要 https請安裝如 `Nginx` 的網頁伺服器。
預設管理員帳號/密碼為 admin/test1234請記得在登入後變更密碼在右上角的帳號選單選擇 "設定" 以進入密碼變更頁面,如下圖所示。您也可以建立另一個管理員帳號,並刪除預設帳號,建議啟用電子郵件登入驗證。
<a name=console-home></a>
![](/docs/en/self-host/pro/console/images/console-home.png?v2)
非管理員使用者也可以登入來瀏覽他們的裝置和記錄,以及變更他們的使用者設定。
## Windows EXE
For Windows clients, you can leave out the custom server configuration and put the configuration information in the `RustDesk.exe` filename instead. As shown above, please go to the console welcome page and click on `Windows EXE`. **`Client >=1.1.9 Required`**。
## 裝置存取權限
若要將裝置與使用者關聯,有兩種方法:
- 透過控制台裝置頁面
- 在客戶端登入指定的使用者帳號
以下兩種情況將使裝置無法存取:
- 在控制台的裝置頁面停用裝置
- 在控制台的使用者頁面停用使用者
關聯裝置僅能被同使用者或使用者群組的裝置存取,或擁有正確的跨群組設定。

View File

@@ -0,0 +1,52 @@
---
title: 簡易安裝
weight: 10
---
{{% notice note %}}
別忘了從 https://rustdesk.com/pricing.html 取得授權,查閱[授權](/docs/en/self-host/pro/license)頁面以了解詳情。
{{% /notice %}}
## 安裝
複製並在您的 Linux 終端機中貼上下列指令以安裝 RustDesk 伺服器專業版。
`bash <(wget -qO- https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/install.sh)`
流程:
- 安裝依賴套件
- 在可用情況下設定 ufw 防火牆
- 建立資料夾 /var/lib/rustdesk-server 和 /var/log/rustdesk-server
- 在 /usr/bin 安裝執行檔
- 下載 RustDesk 專業版服務並解壓縮到上述資料夾
- 為 hbbs 和 hbbr 建立 systemd 服務
- 如果您選擇了 Domain將安裝 Nginx 和 certbot讓 API 能夠在連接埠 443 (https) 存取,並透過連接埠 80 取得 SSL 證書,這將自動更新
## 升級
複製並在您的 Linux 終端機中貼上下列指令以升級現有的 RustDesk 伺服器專業版安裝。您可以使用 cron 定期執行此指令。
`bash <(wget -qO- https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/update.sh)`
流程:
- 檢查 RustDesk-Server-Pro 的新版本
- 如果找到新版本,移除 API 檔案並下載新執行檔和 API 檔案
## 從開源版本轉換
複製並在您的 Linux 終端機中貼上下列指令以從 RustDesk 伺服器轉換至 RustDesk 伺服器專業版。
`bash <(wget -qO- https://raw.githubusercontent.com/rustdesk/rustdesk-server-pro/main/convertfromos.sh)`
流程:
- 停用並移除舊服務
- 安裝依賴套件
- 在可用情況下設定 ufw 防火牆
- 建立資料夾 /var/lib/rustdesk-server 並將證書複製到該資料夾
- 刪除 /var/log/rustdesk 並建立 /var/log/rustdesk-server
- 下載 RustDesk 專業版服務並解壓縮到上述資料夾
- 為 hbbs 和 hbbr 建立 systemd 服務
- 如果您選擇了 Domain將安裝 Nginx 和 certbot讓 API 能夠在連接埠 443 (https) 存取,並透過連接埠 80 取得 SSL 證書,這將自動更新

View File

@@ -0,0 +1,24 @@
---
title: 授權
weight: 15
---
## 購買授權
請從 https://rustdesk.com/pricing.html 取得授權,在 Stripe 結帳頁面輸入有效的電子郵件地址。授權將在付款完成後寄送到您的電子郵件地址。
![](/docs/en/self-host/pro/license/images/stripe.jpg)
## 設定授權
您將須在網頁控制台輸入授權,或變更授權。
| 設定授權 | 變更授權 |
| -- | -- |
![](/docs/en/self-host/pro/license/images/set.png) | ![](/docs/en/self-host/pro/license/images/change.png) |
## 發票和轉移
授權只能在一台機器上使用 (僅 hbbshbbr 不需授權),如果您想要轉移至其他機器,或下載發票,請前往 [https://rustdesk.com/self-host/account/](https://rustdesk.com/self-host/account/)。透過在 Stripe 結帳頁面輸入的電子郵件地址登入,解除綁定舊機器,如下圖所示。新機器將在您於網頁控制台設定授權時自動註冊。
![](/docs/en/self-host/pro/license/images/unbind.jpg)

View File

@@ -3,12 +3,11 @@ title: 群暉
weight: 22
---
本教學基於 DSM v6 最新版。
本手冊基於DSM v6。
### 安裝 Docker
### 安裝Docker
打開 package manager 並安裝 docker
打開套件管理員並安裝 docker
| | |
| --------------- | -------------------------------------------------------- |
@@ -17,54 +16,54 @@ weight: 22
### 安裝 RustDesk Server
| 在 Docker's registery 裡搜 rustdesk-server 並雙擊安裝 | 安裝 rustdesk-server 像後, 雙擊鏡像創建容器 |
| 在 Docker registery 裡搜 rustdesk-server 並連點兩下來安裝 | 安裝 rustdesk-server 像後, 連點兩下映像來建立容器 |
| --------------- | -------------------------------------------------------- |
![](/docs/en/self-host/synology/images/pull-rustdesk-server.png) | ![](/docs/en/self-host/synology/images/rustdesk-server-installed.png)
### 建 hbbs 容器
### 建 hbbs 容器
如上所述哦,雙擊 rustdesk-server 鏡像創建新容器,設置名稱 `hbbs`
![](/docs/en/self-host/synology/images/hbbs.png)
如上所述,連點兩下 rustdesk-server 映像來建立新容器,並將其名稱設置為 `hbbs`
![](/docs/en/self-host/synology/images/hbbs.png)
點擊上面的 "Advanced Settings"。
點擊上面的 "進階設定"。
- 開啟 auto-restart
![](/docs/en/self-host/synology/images/auto-restart.png)
- 啟用自動重新啟動
![](/docs/en/self-host/synology/images/auto-restart.png)
- 啟 "Use the same network as Docker host", 關於 host net的更多解釋請[](/docs/zh-tw/self-host/install/#net-host)
![](/docs/en/self-host/synology/images/host-net.png)
- "Use the same network as Docker host", 關於 host net 的更多解釋,請[](/docs/zh-tw/self-host/install/#net-host)
![](/docs/en/self-host/synology/images/host-net.png)
-容器裡的 home 目錄 `/root` 掛在到宿主目錄(比如 `Shared/test/`), hbbs將把產生的文件包括`key`文件)放在該目錄。
| 掛 | 產生的文件 |
-主機目錄 (比如 `Shared/test/`) 掛接到 `/root`hbbs 將把產生的文件(包括 `key` 檔案)放在該目錄。
| 掛 | 產生的檔案 |
|-- | -- |
![](/docs/en/self-host/synology/images/mount.png?width=500px) | ![](/docs/en/self-host/synology/images/mounted-dir.png?width=300px)
![](/docs/en/self-host/synology/images/mount.png?width=500px) | ![](/docs/en/self-host/synology/images/mounted-dir.png?width=300px)
- 設置
- 設置
{{% notice note %}}
Synology 的操作系統是基於 Debian 的因此host net (--net=host) 可以正常工作,我們不需要使用 `-p` 選項映射端口
群暉的操作系統是基於 Debian 的,因此 host net (--net=host) 可以正常工作,我們不需要使用 `-p` 選項映射連接埠
`192.168.16.98`為內網ip,此處僅作演示,部署時請設置為公網ip
`192.168.16.98` 為內網 IP,此處僅作演示,部署時請設置為公網 IP
{{% /notice %}}
![](/docs/en/self-host/synology/images/hbbs-cmd.png?v2)
![](/docs/en/self-host/synology/images/hbbs-cmd.png?v2)
- 搞定
![](/docs/en/self-host/synology/images/hbbs-config.png)
### 創建 hbbr 容器
![](/docs/en/self-host/synology/images/hbbs-config.png)
請重複上述 `hbbs` 步驟,請將容器名更改為 `hbbr` 並將命令更改為 `hbbr`
### 建立 hbbr 容器
![](/docs/en/self-host/synology/images/hbbr-config.png)
請重複上述 `hbbs` 步驟,但將容器名稱更改為 `hbbr` 並將指令更改為 `hbbr`
### hbbr/hbbs 容器創建完成
![](/docs/en/self-host/synology/images/hbbr-config.png)
### hbbr/hbbs 容器建立完成
![](/docs/en/self-host/synology/images/containers.png?width=500px)
| 雙擊容器並查看日誌 | 確認 hbbs/hbbr 在使用 host net |
| 連點兩下容器並查看日誌 | 確認 hbbs/hbbr 在使用 host net |
|-- | -- |
![](/docs/en/self-host/synology/images/log.png?width=500px) | ![](/docs/en/self-host/synology/images/network-types.png?width=500px)

View File

@@ -3,28 +3,109 @@ title: Windows & pm2
weight: 20
---
### 安裝NodeJs
請點擊[下載](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi)安裝,可能會有點慢,如果卡頓太久,嘗試關掉重新安裝。
NodeJs是pm2的運行時環境所以要先安裝NodeJs。
## 十字路口
### 安裝pm2
在cmd.exe中分別輸入下面三行每一行都要按回車鍵一行一行運行。
您現在有兩個選擇,您可以使用 pm2 (較簡單) 或 NSSM (稍難) 來啟動 rustdesk 伺服器
使用 NSSM 的好處:
- Backwards compatibility with older windows (Windows Server 2008R2/Windows 7 and earlier although untested).
- Ideal for Windows Server
- Auto start on boot without login (The user who created the startup entry does not need to log on for it to start).
- Running both binaries as Services.
- Standalone (no dependency on nodejs)
使用 pm2 的好處:
- Good idea if you run the server on the same computer as your main work computer
- You logon regularly to the user that created the rustdesk startup entry
- 使用者友好
## 使用 NSSM 安裝
### 安裝 NSSM
Please [download](https://nssm.cc/release/nssm-2.24.zip) and extract NSSM select the appropriate
architecture to your windows system (if x86 use the contents of the win32 folder, if x64 use the
contents of win64 folder). It is also best practice to move the binary of NSSM into the
`Program Files\NSSM` (NSSM once started as a service, it cannot be moved from the directory it was placed in.
thus it is best to tuck it away in Program files) directory of your Installation drive (Usually the C drive).
It is also advisable to add the path (such as `C:\Program Files\NSSM`) to the path variable.
### Checking if NSSM is installed properly
If you've done everything correctly the folder `C:\Program Files\NSSM` (in this example I use the C:
drive but you can use whatever drive you installed windows to or whatever path you desire) should
only contain the file `nssm.exe`.
在此範例中,我們將使用 `C:\Program Files\NSSM`
Open Command prompt and run `nssm` if you see a help page you are ready to move onto the next step
### 執行 hbbr 和 hbbs
Download the Windows version of [server program](https://github.com/rustdesk/rustdesk-server/releases).
Unzip the program to the `C:\Program Files\RustDesk Server` (or anywhere you desire just make sure it
doesn't change after the service is installed). now get back to Command prompt
在此範例中,我們將使用 `C:\Program Files\RustDesk Server`
```cmd
nssm install "RustDesk hbbs service" "C:\Program Files\RustDesk Server\hbbs.exe" -r 0.0.0.0 -k _
nssm install "RustDesk hbbr Service" "C:\Program Files\RustDesk Server\hbbr.exe" -k _
```
**Note:**
- You can change `RustDesk hbbs service` to whatever you desire to name hbbs the service
- You can change `RustDesk hbbr service` to whatever you desire to name hbbr the service
- You can change `C:\Program Files\RustDesk Server\hbbs.exe` to wherever you placed the rustdesk binaries
- You can change `C:\Program Files\RustDesk Server\hbbr.exe` to wherever you placed the rustdesk binaries
- You do not need the `-k _` option which is optional, it's just for better security
**Command templates:**
The command template in case you just want to copy and paste and edit.
```cmd
nssm install <Desired hbbs servicename> <RustDesk hbbs binary path> <RustDesk hbbs arguments>
nssm install <Desired hbbr servicename> <RustDesk hbbr binary path> <RustDesk hbbr arguments>
```
**啟動服務**
成功安裝服務後,需要將其重新啟動。
```cmd
nssm start <Desired hbbs servicename>
nssm start <Desired hbbr servicename>
```
**大功告成!**
(上述方法已在 Windows Server Core 2022 Standard 上測試)。
## 或
## 使用 pm2 安裝
### 安裝 NodeJs
請[下載](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi)並安裝 NodeJs。
NodeJs 是 pm2 的執行環境,所以要先安裝 NodeJs。
### 安裝 pm2
`cmd.exe` 中輸入下面三行指令,每一行都要按 <kbd>Enter</kbd> 鍵,並逐行執行。
```cmd
npm install -g pm2
npm install pm2-windows-startup -g
pm2-startup install
```
### 運行hbbrhbbs
下載Windows版本[服務器程](https://gitee.com/rustdesk/rustdesk-server/releases)假設你解壓縮到了C盤下。分別運行下面四行命令。
```
### 執行 hbbrhbbs
下載 [伺服器程](https://gitee.com/rustdesk/rustdesk-server/releases)的 Windows 版本,解壓縮到 C: 下。並執行下面四行指令 (記得編輯 `-r` 參數)
```cmd
cd c:\rustdesk-server-windows-x64
pm2 start hbbs.exe -- -r hbbr運行所在主機的地址
pm2 start hbbr.exe
pm2 start hbbs.exe -- -r <hbbr 運行所在主機的地址>
pm2 start hbbr.exe
pm2 save
```
### 查看log
### 查看記錄
```
pm2 log hbbr
pm2 log hbbs