mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-06-20 09:47:45 +02:00
update doc
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
782da0252f
commit
4cde1948cf
@ -295,6 +295,7 @@ Hinweis: Führen Sie `sudo service nginx restart` aus, wenn Sie die `rustdesk.co
|
||||
#### 8. WebSocket Secure (WSS) Unterstützung für den ID-Server und Relay-Server hinzufügen, um sichere Kommunikation für alle Plattformen zu ermöglichen
|
||||
|
||||
Fügen Sie die folgende Konfiguration zum ersten `server`-Abschnitt der Datei `/etc/nginx/.../rustdesk.conf` hinzu und starten Sie dann den `Nginx`-Dienst neu.
|
||||
Der Web-Client kann über `https://<YOUR_DOMAIN>/web` aufgerufen werden. Benutzerdefinierte Clients können WebSocket verwenden, indem sie in den erweiterten Optionen `allow-websocket=Y` einstellen. Wenn der benutzerdefinierte Client mit aktiviertem WebSocket verwendet wird, wird er kein TCP/UDP nutzen und kann nur über ein Relais (außer bei direkten IP-Verbindungen) verbunden werden. Wenn nur dieser WebSocket-aktivierte Client verwendet wird, kann der Server die Ports 21114 bis 21119 schließen und nur Port 443 offen halten.
|
||||
|
||||
```
|
||||
location /ws/id {
|
||||
@ -376,31 +377,9 @@ server {
|
||||
```
|
||||
|
||||
{{% notice note %}}
|
||||
Wenn Sie zuvor für Web-Clients bereitgestellt haben und es auf allen Plattformen verwenden möchten, müssen Sie `proxy_read_timeout` hinzufügen. Sie können auch die Option `allow-websocket` in Ihrem benutzerdefinierten Client hinzufügen, um WebSocket zu verwenden.
|
||||
Wenn Sie zuvor für Web-Clients bereitgestellt haben und es auf allen Plattformen verwenden möchten, müssen Sie `proxy_read_timeout` hinzufügen.
|
||||
{{% /notice %}}
|
||||
|
||||
#### 9. Melden Sie sich von dem RustDesk öffentlichen Web-Client unter `https://rustdesk.com/web` bei Ihrem Server an.
|
||||
|
||||
Sie müssen Folgendes im `location /`-Abschnitt der Datei `/etc/nginx/.../rustdesk.conf` hinzufügen, um die CORS-Beschränkungen der Browser zu umgehen.
|
||||
|
||||
```
|
||||
if ($http_origin ~* (https?://(www\.)?rustdesk\.com)) {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
}
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
add_header 'Content-Length' 0;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
return 204;
|
||||
}
|
||||
```
|
||||
|
||||
### SELinux
|
||||
|
||||
Wenn bei der Installation die Meldung `Waiting for RustDesk Relay service to become active...` erscheint, kann dies durch SELinux verursacht werden. Sie können die folgenden Befehle ausprobieren:
|
||||
|
@ -362,6 +362,10 @@ Notice: Run `sudo service nginx restart` if you change the `rustdesk.conf` manua
|
||||
#### 8. Add WebSocket Secure (WSS) support for the id server and relay server to enable secure communication for all platforms.
|
||||
|
||||
Add the following configuration to the first `server` section of the `/etc/nginx/.../rustdesk.conf` file, then restart the `Nginx` service.
|
||||
The web client can be accessed via `https://<YOUR_DOMAIN>/web`. Custom clients can use WebSocket by setting `allow-websocket=Y` in the advanced options. If the custom client with WebSocket enabled is used, it will not utilize TCP/UDP and can only connect through a relay (except for direct IP connections). If only this WebSocket-enabled client is used, the server can close ports 21114 to 21119 and only keep port 443 open.
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
location /ws/id {
|
||||
@ -443,31 +447,9 @@ server {
|
||||
```
|
||||
|
||||
{{% notice note %}}
|
||||
If you have previously deployed for web clients and want to use it across all platforms, you need to add `proxy_read_timeout`. You can also add the `allow-websocket` option in your custom client to use WebSocket.
|
||||
If you have previously deployed for web clients and want to use it across all platforms, you need to add `proxy_read_timeout`.
|
||||
{{% /notice %}}
|
||||
|
||||
#### 9. Log in to your server from RustDesk public web client at `https://rustdesk.com/web`.
|
||||
|
||||
You need to add below in the `location /` section of the `/etc/nginx/.../rustdesk.conf` to bypass CORS limitation of browsers.
|
||||
|
||||
```
|
||||
if ($http_origin ~* (https?://(www\.)?rustdesk\.com)) {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
}
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
add_header 'Content-Length' 0;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
return 204;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### SELinux
|
||||
|
||||
|
@ -357,7 +357,7 @@ location / {
|
||||
#### 8. 为 ID 服务器和中继服务器添加 WebSocket Secure (WSS) 支持,以启用所有平台的安全通信
|
||||
|
||||
将以下配置添加到 `/etc/nginx/.../rustdesk.conf` 文件的第一个 `server` 部分,然后重启 `Nginx` 服务。
|
||||
|
||||
Web客户端通过 `https://<YOUR_DOMAIN>/web`访问, 自定义客户端通过在高级选项中设置 `allow-websocket=Y`来使用websocket。如果自定义客户端中启用了websocket,该自定义客户端将不会被使用tcp/udp, 只能通过中继连接(除IP直连)。如果只使用这种启用了websocket的客户端, 也可以关闭服务器的21114~21119端口, 只开启443端口。
|
||||
```
|
||||
location /ws/id {
|
||||
proxy_pass http://127.0.0.1:21118;
|
||||
@ -438,31 +438,9 @@ server {
|
||||
```
|
||||
|
||||
{{% notice note %}}
|
||||
如果您之前为 Web 客户端部署过,并想在所有平台上使用,您需要添加 `proxy_read_timeout`。您也可以在自定义客户端中添加 `allow-websocket` 选项来使用 WebSocket。
|
||||
如果您之前为 Web 客户端部署过,并想在所有平台上使用,您需要添加 `proxy_read_timeout`。
|
||||
{{% /notice %}}
|
||||
|
||||
#### 9. 从 RustDesk 公共 Web 客户端 `https://rustdesk.com/web` 登录到您的服务器
|
||||
|
||||
您需要在 `/etc/nginx/.../rustdesk.conf` 的 `location /` 部分添加以下内容,以绕过浏览器的 CORS 限制。
|
||||
|
||||
```
|
||||
if ($http_origin ~* (https?://(www\.)?rustdesk\.com)) {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
}
|
||||
if ($request_method = 'OPTIONS') {
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, PATCH, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Origin, Content-Type, Accept, Authorization' always;
|
||||
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
||||
add_header 'Content-Length' 0;
|
||||
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||
return 204;
|
||||
}
|
||||
```
|
||||
|
||||
### 为什么我的日志/设备名称为空?
|
||||
确保在被控制的设备上正确设置了 API,https://github.com/rustdesk/rustdesk-server-pro/issues/21#issuecomment-1637935750。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user