ljw 1 год назад
Родитель
Сommit
0eb733cc33
4 измененных файлов с 109 добавлено и 72 удалено
  1. 54 35
      README.md
  2. 55 37
      README_EN.md
  3. BIN
      docs/admin_webclient.png
  4. BIN
      docs/en_img/admin_webclient.png

+ 54 - 35
README.md

@@ -44,8 +44,9 @@
44 44
 #### PC客户端使用的是 ***1.3.0***,经测试 ***1.2.6+*** 都可以
45 45
 
46 46
 #### 关于PC端链接超时或者链接不上的问题以及解决方案
47
-- 链接不上是因为server端相对于客户端落后版本,server不会响应客户端的`secure_tcp`请求,所以客户端超时
48
-  相关代码代码位置在`https://github.com/rustdesk/rustdesk/blob/master/src/client.rs#L322`
47
+##### 链接不上是或者超时
48
+因为server端相对于客户端落后版本,server不会响应客户端的`secure_tcp`请求,所以客户端超时。
49
+相关代码代码位置在`https://github.com/rustdesk/rustdesk/blob/master/src/client.rs#L322`
49 50
   ```rust
50 51
     if !key.is_empty() && !token.is_empty() {
51 52
     // mainly for the security of token
@@ -55,35 +56,36 @@
55 56
   可看到当`key`和`token`都不为空时,会调用`secure_tcp`,但是server端不会响应,所以客户端超时
56 57
   `secure_tcp` 代码位置在 `https://github.com/rustdesk/rustdesk/blob/master/src/common.rs#L1203`
57 58
   
58
-- ***解决方案***
59
-
60
-  1. server端指定key。
61
-      - 优点:简单
62
-      - 缺点:链接不是加密的
63
-         ```bash
64
-         hbbs -r <relay-server-ip[:port]> -k <key>
65
-         hbbr -k <key>
66
-         ```
67
-         比如
68
-         ```bash
69
-           hbbs -r <relay-server-ip[:port]> -k abc1234567
70
-           hbbr -k abc1234567
71
-         ```
72
-  2. server端使用系统生成的key,或者自定义的密钥对,但如果client已登录,链接时容易超时或者链接不上,可以退出登录后再链接就可以了,webclient可以不用退出登录
73
-      - 优点:链接加密
74
-      - 缺点:操作麻烦
75
-  3. server端使用系统生成的key,或者自定义的密钥对,fork官方客户端的代码将`secure_tcp`修改成直接返回,然后通过`Github Actions`编译,下载编译后的客户端。
76
-  参考[官方文档](https://rustdesk.com/docs/en/dev/build/all/)
77
-      - 优点:链接加密,可以自定义客户端一些功能,编译后直接可用
78
-      - 缺点:需要自己fork代码,编译,有点难度
79
-  4. 使用[我fork的代码](https://github.com/lejianwen/rustdesk),已经修改了`secure_tcp`,可以直接下载使用,[下载地址](https://github.com/lejianwen/rustdesk/releases)
80
-      - 优点:代码改动可查看,`Github Actions`编译,链接加密,直接下载使用
81
-      - 缺点:可能跟不上官方版本更新
82
-##### 对链接加密要求不高的可以使用`1`,对链接加密要求高的可以使用`3`或`4`
59
+##### 4种解决方案
60
+1. server端指定key。
61
+    - 优点:简单
62
+    - 缺点:链接不是加密的
63
+       ```bash
64
+       hbbs -r <relay-server-ip[:port]> -k <key>
65
+       hbbr -k <key>
66
+       ```
67
+       比如
68
+       ```bash
69
+         hbbs -r <relay-server-ip[:port]> -k abc1234567
70
+         hbbr -k abc1234567
71
+       ```
72
+2. server端使用系统生成的key,或者自定义的密钥对,但如果client已登录,链接时容易超时或者链接不上,可以退出登录后再链接就可以了,webclient可以不用退出登录
73
+    - 优点:链接加密
74
+    - 缺点:操作麻烦
75
+3. server端使用系统生成的key,或者自定义的密钥对,fork官方客户端的代码将`secure_tcp`修改成直接返回,然后通过`Github Actions`编译,下载编译后的客户端。
76
+参考[官方文档](https://rustdesk.com/docs/en/dev/build/all/)
77
+    - 优点:链接加密,可以自定义客户端一些功能,编译后直接可用
78
+    - 缺点:需要自己fork代码,编译,有点难度
79
+4. 使用[我fork的代码](https://github.com/lejianwen/rustdesk),已经修改了`secure_tcp`,可以直接下载使用,[下载地址](https://github.com/lejianwen/rustdesk/releases)
80
+    - 优点:代码改动可查看,`Github Actions`编译,链接加密,直接下载使用
81
+    - 缺点:可能跟不上官方版本更新
82
+     
83
+***对链接加密要求不高的可以使用`1`,对链接加密要求高的可以使用`3`或`4`***
83 84
 
84 85
 ## 功能
85 86
 
86
-### API 服务: 基本实现了PC端基础的接口。支持Personal版本接口,可以通过配置文件`rustdesk.personal`或环境变量`RUSTDESK_API_RUSTDESK_PERSONAL`来控制是否启用
87
+### API 服务 
88
+基本实现了PC端基础的接口。支持Personal版本接口,可以通过配置文件`rustdesk.personal`或环境变量`RUSTDESK_API_RUSTDESK_PERSONAL`来控制是否启用
87 89
 
88 90
 #### 登录
89 91
 
@@ -96,26 +98,27 @@
96 98
 
97 99
 ![pc_ab](docs/pc_ab.png)
98 100
 
99
-#### 群组,群组分为`共享组`和`普通组`,共享组中所有人都能看到小组成员的设备,普通组只有管理员能看到所有小组成员的设备
101
+#### 群组
102
+群组分为`共享组`和`普通组`,共享组中所有人都能看到小组成员的设备,普通组只有管理员能看到所有小组成员的设备
100 103
 
101 104
 ![pc_gr](docs/pc_gr.png)
102 105
 
103 106
 ### Web Admin:
104 107
 
105
-***使用前后端分离,提供用户友好的管理界面,主要用来管理和展示。前端代码在[rustdesk-api-web](https://github.com/lejianwen/rustdesk-api-web)***
108
+* 使用前后端分离,提供用户友好的管理界面,主要用来管理和展示。前端代码在[rustdesk-api-web](https://github.com/lejianwen/rustdesk-api-web)
106 109
 
107
-***后台访问地址是`http://<your server>[:port]/_admin/`初次安装管理员为用户名密码为`admin` `admin`,请即时更改密码***
110
+* 后台访问地址是`http://<your server>[:port]/_admin/`初次安装管理员为用户名密码为`admin` `admin`,请即时更改密码
108 111
 
109 112
 1. 管理员界面
110 113
    ![web_admin](docs/web_admin.png)
111 114
 2. 普通用户界面
112 115
    ![web_user](docs/web_admin_user.png)
113
-   右上角可以更改密码
116
+   右上角可以更改密码,也可以切换语言
114 117
    ![web_resetpwd](docs/web_resetpwd.png)
115 118
 
116 119
 3. 分组可以自定义,方便管理,暂时支持两种类型: `共享组` 和 `普通组`
117 120
    ![web_admin_gr](docs/web_admin_gr.png)
118
-4. 可以直接打开webclient,方便使用
121
+4. 可以直接打开webclient,方便使用;也可以分享给游客,游客可以直接通过webclient远程到设备
119 122
    ![web_webclient](docs/admin_webclient.png)
120 123
 5. Oauth,暂时只支持了`Github`和`Google`, 需要创建一个`OAuth App`,然后配置到后台
121 124
    ![web_admin_oauth](docs/web_admin_oauth.png)
@@ -174,7 +177,8 @@ logger:
174 177
   report-caller: true
175 178
 ```
176 179
 
177
-* 环境变量,变量名前缀是RUSTDESK_API,环境变量如果存在将覆盖配置文件中的配置
180
+### 环境变量
181
+变量名前缀是`RUSTDESK_API`,环境变量如果存在将覆盖配置文件中的配置
178 182
 
179 183
 | 变量名                                 | 说明                                   | 示例                          |
180 184
 |-------------------------------------|--------------------------------------|-----------------------------|
@@ -441,7 +445,22 @@ logger:
441 445
 
442 446
 6. 打开浏览器访问`http://<your server[:port]>/_admin/`,默认用户名密码为`admin`,请及时更改密码。
443 447
 
448
+#### nginx反代
449
+在`nginx`中配置反代
450
+```
451
+server {
452
+    listen <your port>;
453
+    server_name <your server>;
454
+    location / {
455
+        proxy_pass http://<api-server[:port]>;
456
+        proxy_set_header Host $host;
457
+        proxy_set_header X-Real-IP $remote_addr;
458
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
459
+        proxy_set_header X-Forwarded-Proto $scheme;
460
+    }
461
+}
462
+```
444 463
 ## 其他
445 464
 
446 465
 - [修改客户端ID](https://github.com/abdullah-erturk/RustDesk-ID-Changer)
447
-- [webclient](https://hub.docker.com/r/keyurbhole/flutter_web_desk)
466
+- [webclient来源](https://hub.docker.com/r/keyurbhole/flutter_web_desk)

+ 55 - 37
README_EN.md

@@ -44,7 +44,8 @@ desktop software that provides self-hosted solutions.
44 44
 #### The PC client uses version ***1.3.0***, and versions ***1.2.6+*** have been tested to work.
45 45
 
46 46
 #### Solutions for PC client connection timeout or connection issues
47
-- The connection issue is due to the server version lagging behind the client version, causing the server to not respond to the client's `secure_tcp` request, resulting in a timeout.
47
+##### Connection issues or timeouts
48
+Because the server version lags behind the client version, the server does not respond to the client's `secure_tcp` request, causing the client to timeout.
48 49
   Relevant code can be found at `https://github.com/rustdesk/rustdesk/blob/master/src/client.rs#L322`
49 50
   ```rust
50 51
     if !key.is_empty() && !token.is_empty() {
@@ -56,34 +57,36 @@ desktop software that provides self-hosted solutions.
56 57
 As seen, when both `key` and `token` are not empty, `secure_tcp` is called, but the server does not respond, causing the client to timeout.
57 58
 The `secure_tcp` code is located at `https://github.com/rustdesk/rustdesk/blob/master/src/common.rs#L1203`
58 59
 
59
-- ***Solutions***
60
-    1. Specify the key on the server.
61
-        - Advantage: Simple
62
-        - Disadvantage: The connection is not encrypted
63
-           ```bash
64
-           hbbs -r <relay-server-ip[:port]> -k <key>
65
-           hbbr -k <key>
66
-           ```
67
-          For example
68
-           ```bash
69
-             hbbs -r <relay-server-ip[:port]> -k abc1234567
70
-             hbbr -k abc1234567
71
-           ```
72
-    2. Use a system-generated key or a custom key pair on the server. If the client is already logged in, it may timeout or fail to connect. Logging out and reconnecting usually resolves the issue, and the web client does not need to log out.
73
-        - Advantage: Encrypted connection
74
-        - Disadvantage: Complicated operation
75
-    3. Use a system-generated key or a custom key pair on the server, fork the official client code to modify `secure_tcp` to return directly, then compile using `Github Actions` and download the compiled client.
76
-       Refer to [official documentation](https://rustdesk.com/docs/en/dev/build/all/)
77
-        - Advantage: Encrypted connection, customizable client features, ready to use after compilation
78
-        - Disadvantage: Requires forking code and compiling, which can be challenging
79
-    4. Use [my forked code](https://github.com/lejianwen/rustdesk), which has already modified `secure_tcp`. You can download and use it directly from [here](https://github.com/lejianwen/rustdesk/releases)
80
-        - Advantage: Code changes are viewable, compiled with `Github Actions`, encrypted connection, ready to use
81
-        - Disadvantage: May not keep up with official version updates
82
-##### If encryption is not a high priority, use `1`. If encryption is important, use `3` or `4`.
60
+##### Four Solutions
61
+1. Specify the key on the server.
62
+    - Advantage: Simple
63
+    - Disadvantage: The connection is not encrypted
64
+       ```bash
65
+       hbbs -r <relay-server-ip[:port]> -k <key>
66
+       hbbr -k <key>
67
+       ```
68
+      For example
69
+       ```bash
70
+         hbbs -r <relay-server-ip[:port]> -k abc1234567
71
+         hbbr -k abc1234567
72
+       ```
73
+2. Use a system-generated key or a custom key pair on the server. If the client is already logged in, it may timeout or fail to connect. Logging out and reconnecting usually resolves the issue, and the web client does not need to log out.
74
+    - Advantage: Encrypted connection
75
+    - Disadvantage: Complicated operation
76
+3. Use a system-generated key or a custom key pair on the server, fork the official client code to modify `secure_tcp` to return directly, then compile using `Github Actions` and download the compiled client.
77
+   Refer to [official documentation](https://rustdesk.com/docs/en/dev/build/all/)
78
+    - Advantage: Encrypted connection, customizable client features, ready to use after compilation
79
+    - Disadvantage: Requires forking code and compiling, which can be challenging
80
+4. Use [my forked code](https://github.com/lejianwen/rustdesk), which has already modified `secure_tcp`. You can download and use it directly from [here](https://github.com/lejianwen/rustdesk/releases)
81
+    - Advantage: Code changes are viewable, compiled with `Github Actions`, encrypted connection, ready to use
82
+    - Disadvantage: May not keep up with official version updates
83
+   
84
+***If encryption is not a high priority, use `1`. If encryption is important, use `3` or `4`.***
83 85
 
84 86
 ## Overview
85 87
 
86
-### API Service: Basic implementation of the PC client's primary interfaces.Supports the Personal version api, which can be enabled by configuring the `rustdesk.personal` file or the `RUSTDESK_API_RUSTDESK_PERSONAL` environment variable.
88
+### API Service
89
+Basic implementation of the PC client's primary interfaces.Supports the Personal version api, which can be enabled by configuring the `rustdesk.personal` file or the `RUSTDESK_API_RUSTDESK_PERSONAL` environment variable.
87 90
 
88 91
 #### Login
89 92
 
@@ -97,17 +100,18 @@ The `secure_tcp` code is located at `https://github.com/rustdesk/rustdesk/blob/m
97 100
 
98 101
 ![pc_ab](docs/en_img/pc_ab.png)
99 102
 
100
-#### Groups: Groups are divided into `shared groups` and `regular groups`. In shared groups, everyone can see the peers of all group members, while in regular groups, only administrators can see all members' peers.
103
+#### Groups
104
+Groups are divided into `shared groups` and `regular groups`. In shared groups, everyone can see the peers of all group members, while in regular groups, only administrators can see all members' peers.
101 105
 
102 106
 ![pc_gr](docs/en_img/pc_gr.png)
103 107
 
104 108
 ### Web Admin
105 109
 
106
-***The frontend and backend are separated to provide a user-friendly management interface, primarily for managing and
107
-displaying data.Frontend code is available at [rustdesk-api-web](https://github.com/lejianwen/rustdesk-api-web)***
110
+* The frontend and backend are separated to provide a user-friendly management interface, primarily for managing and
111
+displaying data.Frontend code is available at [rustdesk-api-web](https://github.com/lejianwen/rustdesk-api-web)
108 112
 
109
-***Admin panel URL: `http://<your server[:port]>/_admin/`. The default username and password for the initial
110
-installation are `admin` `admin`, please change the password immediately.***
113
+* Admin panel URL: `http://<your server[:port]>/_admin/`. The default username and password for the initial
114
+installation are `admin` `admin`, please change the password immediately.
111 115
 
112 116
 1. Admin interface:
113 117
    ![web_admin](docs/en_img/web_admin.png)
@@ -117,7 +121,7 @@ installation are `admin` `admin`, please change the password immediately.***
117 121
    ![web_resetpwd](docs/en_img/web_resetpwd.png)
118 122
 3. Groups can be customized for easy management. Currently, two types are supported: `shared group` and `regular group`.
119 123
    ![web_admin_gr](docs/en_img/web_admin_gr.png)
120
-4. You can open the web client directly for convenience:
124
+4. You can directly open the web client for convenient use; it can also be shared with guests, allowing them to remotely access the device via the web client.
121 125
    ![web_webclient](docs/en_img/admin_webclient.png)
122 126
 5. OAuth support: Currently, `GitHub` and `Google`  is supported. You need to create an `OAuth App` and configure it in
123 127
    the admin
@@ -179,9 +183,8 @@ logger:
179 183
   report-caller: true
180 184
 ```
181 185
 
182
-* Environment variables, with the prefix `RUSTDESK_API_RUSTDESK_PERSONAL`, will override the settings in the
183
-  configuration file if
184
-  present.
186
+### Environment Variables
187
+The prefix for variable names is `RUSTDESK_API`. If environment variables exist, they will override the configurations in the configuration file.
185 188
 
186 189
 | Variable Name                      | Description                                               | Example                        |
187 190
 |------------------------------------|-----------------------------------------------------------|--------------------------------|
@@ -454,7 +457,22 @@ Download the release from [release](https://github.com/lejianwen/rustdesk-api/re
454 457
 6. Open your browser and visit `http://<your server[:port]>/_admin/`, with default credentials `admin admin`. Please
455 458
    change the password promptly.
456 459
 
457
-## Miscellaneous
460
+#### nginx reverse proxy
461
+Configure reverse proxy in `nginx`
462
+```
463
+server {
464
+    listen <your port>;
465
+    server_name <your server>;
466
+    location / {
467
+        proxy_pass http://<api-server[:port]>;
468
+        proxy_set_header Host $host;
469
+        proxy_set_header X-Real-IP $remote_addr;
470
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
471
+        proxy_set_header X-Forwarded-Proto $scheme;
472
+    }
473
+}
474
+```
475
+## Others
458 476
 
459 477
 - [Change client ID](https://github.com/abdullah-erturk/RustDesk-ID-Changer)
460
-- [webclient](https://hub.docker.com/r/keyurbhole/flutter_web_desk)
478
+- [Web client source](https://hub.docker.com/r/keyurbhole/flutter_web_desk)

BIN
docs/admin_webclient.png


BIN
docs/en_img/admin_webclient.png