Skip to content

Commit

Permalink
add port to relay
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed May 10, 2022
1 parent 4f6d2fd commit 2536f39
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions content/self-host/install/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ The hardware requirements are very low, the minimum configuration of the cloud s
Run hbbs/hbbr on your server (Centos or Ubuntu). We suggust you use [pm2](https://pm2.keymetrics.io/) managing your service.

```
./hbbs -r <relay-server-ip> -m <registered_email>
./hbbs -r <relay-server-ip[:port]> -m <registered_email>
./hbbr -m <registered_email>
```

or run hbbs/hbbr with pm2

```
pm2 start hbbs -- -r <relay-server-ip> -m <registered_email>
pm2 start hbbs -- -r <relay-server-ip[:port]> -m <registered_email>
pm2 start hbbr -- -m <registered_email>
```

Expand All @@ -55,7 +55,7 @@ pm2 start hbbr -- -m <registered_email>

pm2 requires nodejs v16+, if you fail to run pm2 (e.g. you can not see hbbs/hbbr in `pm2 list`), please download and install LTS version nodejs from https://nodejs.org. If you wanna make hbbs/hbbr auto-run after reboot, please check out `pm2 save` and `pm2 startup`. More about [pm2](https://pm2.keymetrics.io/docs/usage/quick-start/). Another good tool for you log is [pm2-logrotate](https://github.com/keymetrics/pm2-logrotate).

The `-r` parameter of hhbs is not necessary, it is just convenient for you not to specify a relay server on the client side. The relay server specified by the client has a higher priority than this.
The `-r` parameter of hhbs is not necessary, it is just convenient for you not to specify a relay server on the client side, you do not need to specify port if you are using default 21117 port. The relay server specified by the client has a higher priority than this.
{{% /notice %}}

By default, hbbs listens on 21114(tcp), 21115(tcp) and 21116(tcp/udp), 21118(tcp), hbbr listens on 21117(tcp), 21119(tcp). Be sure to open these ports in the firewall. **Please note that 21116 should be enabled both for TCP and UDP**. 21114 is for web console + API, 21115 is used for NAT type test, 21116/UDP is used for ID registration and heartbeat service, 21116/TCP is used for TCP hole punching and connection service, 21117 is used for Relay services, 21118 and 21119 are used to support web clients. If you do not need web console + API (21114) or web client (21118, 21119) support, the corresponding ports can be disabled.
Expand All @@ -70,14 +70,14 @@ Please run with "-h" option to see help if you wanna choose your own port.
##### Linux/amd64
```
sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbr -m <registered_email>
```

##### Linux/arm64v8
```
sudo docker image pull rustdesk/rustdesk-server:latest-arm64v8
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbr -m <registered_email>
```

Expand Down Expand Up @@ -133,7 +133,7 @@ cat ./id_ed25519.pub

If you wanna prohibit users without key from establishing non-encrypted connections, please add the `-k _` parameter when running hbbs and hbbr, for example:
````
./hbbs -r <address of the host where hbbr is running> -k _
./hbbs -r <relay-server-ip[:port]> -k _
./hbbr -k _
````

Expand Down
10 changes: 5 additions & 5 deletions content/self-host/install/_index.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ weight: 10
Запустите hbbs/hbbr на вашем сервере (Centos или Ubuntu). Мы рекомендуем использовать [pm2](https://pm2.keymetrics.io/) для управления службами.

```
./hbbs -r <IP-адрес ретранслятора> -m <зарегистрированный email>
./hbbs -r <IP-адрес ретранслятора[:port]> -m <зарегистрированный email>
./hbbr -m <зарегистрированный email>
```

или запустите hbbs/hbbr при помощи pm2

```
pm2 start hbbs -- -r <IP-адрес ретранслятора> -m <зарегистрированный email>
pm2 start hbbs -- -r <IP-адрес ретранслятора[:port]> -m <зарегистрированный email>
pm2 start hbbr -- -m <зарегистрированный email>
```

Expand All @@ -70,14 +70,14 @@ pm2 требует для себя nodejs v16+. Если не получится
##### Linux/amd64
```
sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <IP-адрес ретранслятора> -m <зарегистрированный email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <IP-адрес ретранслятора[:port]> -m <зарегистрированный email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbr -m <зарегистрированный email>
```

##### Linux/arm64v8
```
sudo docker image pull rustdesk/rustdesk-server:latest-arm64v8
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <IP-адрес ретранслятора> -m <зарегистрированный email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <IP-адрес ретранслятора[:port]> -m <зарегистрированный email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbr -m <зарегистрированный email>
```

Expand Down Expand Up @@ -133,7 +133,7 @@ cat ./id_ed25519.pub

Если вы хотите запретить незашифрованные соединения, используйте параметр `-k _` для запуска hbbs и hbbr, например:
````
./hbbs -r <адрес ретранслятора> -k _
./hbbs -r <адрес ретранслятора[:port]> -k _
./hbbr -k _
````

Expand Down
12 changes: 6 additions & 6 deletions content/self-host/install/_index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Linux版本在Centos7构建,在 Centos7/8,Ubuntu 18/20上测试过,Debian
在服务器上运行 hbbs/hbbr (Centos 或 Ubuntu)。建议使用[pm2](https://pm2.keymetrics.io/) 管理服务。

```
./hbbs -r <hbbr运行所在主机的地址> -m <registered_email>
./hbbs -r <hbbr运行所在主机的地址[:port]> -m <registered_email>
./hbbr -m <registered_email>
```

或者使用 pm2 运行 hbbs/hbbr

```
pm2 start hbbs -- -r <relay-server-ip> -m <registered_email>
pm2 start hbbs -- -r <relay-server-ip[:port]> -m <registered_email>
pm2 start hbbr -- -m <registered_email>
```

Expand All @@ -54,7 +54,7 @@ pm2 start hbbr -- -m <registered_email>

`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`参数不是必须的,他只是方便你不用在客户端指定中继服务器,如果是默认21117端口,可以不填port。客户端指定的中继服务器优先级高于这个。
{{% /notice %}}

默认情况下,hbbs 监听21114(tcp), 21115(tcp), 21116(tcp/udp), 21118(tcp),hbbr 监听21117(tcp), 21119(tcp)。务必在防火墙开启这几个端口, **请注意21116同时要开启TCP和UDP**。其中21114是网页控制台+API,21115是hbbs用作NAT类型测试,21116/UDP是hbbs用作ID注册与心跳服务,21116/TCP是hbbs用作TCP打洞与连接服务,21117是hbbr用作中继服务, 21118和21119是为了支持网页客户端。如果您不需要网页控制台+API(21114)或者网页客户端(21118,21119)支持,对应端口可以不开。
Expand All @@ -68,14 +68,14 @@ hhbs的`-r`参数不是必须的,他只是方便你不用在客户端指定中
##### Linux/amd64
```
sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbr -m <registered_email>
```

##### Linux/arm64v8
```
sudo docker image pull rustdesk/rustdesk-server:latest-arm64v8
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbr -m <registered_email>
```

Expand Down Expand Up @@ -129,7 +129,7 @@ cat ./id_ed25519.pub

如果您禁止没有key的用户建立非加密连接,请在运行hbbs和hbbr的时候添加`-k _ `参数,例如:
```
./hbbs -r <hbbr运行所在主机的地址> -k _
./hbbs -r <relay-server-ip[:port]> -k _
./hbbr -k _
```

Expand Down
10 changes: 5 additions & 5 deletions content/self-host/install/_index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Linux版本在Centos7構建,在 Centos7/8,Ubuntu 18/20上測試過,Debian
在服務器上運行 hbbs/hbbr (Centos 或 Ubuntu)。建議使用[pm2](https://pm2.keymetrics.io/) 管理服務。

```
./hbbs -r <hbbr運行所在主機的地址> -m <registered_email>
./hbbs -r <hbbr運行所在主機的地址[:port]> -m <registered_email>
./hbbr -m <registered_email>
```

或者使用 pm2 運行 hbbs/hbbr

```
pm2 start hbbs -- -r <relay-server-ip> -m <registered_email>
pm2 start hbbs -- -r <relay-server-ip[:port]> -m <registered_email>
pm2 start hbbr -- -m <registered_email>
```

Expand All @@ -71,14 +71,14 @@ hhbs的`-r`參數不是必須的,他只是方便你不用在客戶端指定中
##### Linux/amd64
```
sudo docker image pull rustdesk/rustdesk-server
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server hbbr -m <registered_email>
```

##### Linux/arm64v8
```
sudo docker image pull rustdesk/rustdesk-server:latest-arm64v8
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip> -m <registered_email>
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbs -r <relay-server-ip[:port]> -m <registered_email>
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --net=host --rm rustdesk/rustdesk-server:latest-arm64v8 hbbr -m <registered_email>
```

Expand Down Expand Up @@ -132,7 +132,7 @@ cat ./id_ed25519.pub
如果您禁止沒有key的用戶建立非加密連接,請在運行hbbs和hbbr的時候添加`-k _ `參數,例如:

```
./hbbs -r <hbbr運行所在主機的地址> -k _
./hbbs -r <relay-server-ip[:port]> -k _
./hbbr -k _
```

Expand Down

0 comments on commit 2536f39

Please sign in to comment.