From b2cb2c59ca94210d9b0e5b17c3c99dbb32fb00ef Mon Sep 17 00:00:00 2001 From: Daniel Pinto <642149+Mouxy@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:07:13 +0100 Subject: [PATCH] Update _index.en.md --- .../rustdesk-server-pro/relay/_index.en.md | 75 +++++++++++-------- 1 file changed, 45 insertions(+), 30 deletions(-) diff --git a/content/self-host/rustdesk-server-pro/relay/_index.en.md b/content/self-host/rustdesk-server-pro/relay/_index.en.md index af634ba..fb25420 100644 --- a/content/self-host/rustdesk-server-pro/relay/_index.en.md +++ b/content/self-host/rustdesk-server-pro/relay/_index.en.md @@ -7,18 +7,17 @@ weight: 17 You can have several relay servers running across the globe and leverage GeoLocation to use the closest relay server, giving you a faster experience when connecting to remote computers. -> [!IMPORTANT] > You will need the private key pair **id_ed25519** and **id_ed25519.pub** -If docker is already installed, connect to your server via SSH and create a volume for HBBR +1 - If docker is already installed, connect to your server via SSH and create a volume for HBBR ``` # docker volume create hbbr ``` The volume hbbr should be located in /var/lib/docker/volumes/hbbr/_data -Copy the private key pair to the volume location, in this case we will use SCP to copy the files. +2 - Copy the private key pair to the volume location, in this case we will use SCP to copy the files. -The command syntax is: scp username@server: +The command syntax is: scp username@server: ``` # scp id_ed25519 root@100.100.100.100:/var/lib/docker/volumes/hbbr/_data @@ -26,22 +25,23 @@ The command syntax is: scp username@server: +image If you installed RustDesk Pro using the installation script on a Linux machine, the mmdb file needs to be moved to **/var/lib/rusted-server/** @@ -89,13 +88,10 @@ For docker installations the file should be in the volume you mapped when deploy #### Get an API key to automate the process - Linux servers You need to update this file regularly and we can use a cronjob to do that. You will need an API key to access the download link which is free. -Go to **Manage License Keys** -image - - - -Generate a new license key and save the key -image +Go to Manage License Keys and generate a new license key
+image +
+image You can automate the download process in a few ways (https://dev.maxmind.com/geoip/updating-databases) but you add the following command to your crontab replacing {Your Access Key} with the API key you got from the previous step. @@ -105,21 +101,40 @@ You can automate the download process in a few ways (https://dev.maxmind.com/geo ``` -## Change settings in RustDesk Pro Web Console +### Change settings in RustDesk Pro Web Console -Add your relay server IP addresses to the the Relay Server List, using just the IP address. **Do not add the port** +Add your relay server IP addresses to the the Relay Server List, using just the IP address. **Do not add the port**
+image -image +Add a Geo Override but adding the server IP address and the coordinates where the server is located.
+image - -Add a Geo Override but adding the server IP address and the coordinates where the server is located. - -image - - -Click Reload Geo and your list should look similar to this - -image +Click Reload Geo and your list should look similar to this.
+image To confirm the results, check your HHBS logs when clicking Reload Geo, you should see a message showing the relay server IP addresses and their coordinates + +> If you are runninf RustDesk Pro on a linux machine use the command **RUST_LOG=debug ./hbbs** to view the logs, if you are running on a docker container user **docker logs hbbs** + + +``` +RUST_LOG=debug ./hbbs + +INFO [src/common.rs:130] GEOIP_FILE: ./GeoLite2-City.mmdb +INFO [src/common.rs:159] override 1xx.xxx.xxx.x7: -1.xx 5x.xxx +[src/common.rs:159] override 1xx.xxx.xxx.xx8: -3.xxx 5x.xxxx +[src/common.rs:159] override 7xx.xxx.xxxx.xx1: 6.xxx 5x.xxxx +GEOIP_FILE loaded, #overrides 3 +INFO [src/common.rs:119] relay-servers=["1xx.xxx.xxx.x7", "1xx.xxx.xxx.xx8", "7xx.xxx.xxx.xx1"] +NFO [src/rendezvous_server.rs:1467] parsed relay servers: [("1xx.xxxx.xxx.xx7", Some((-1x, xxx))), ("1xx.xxx.xxx.xx8", Some((-3x, xxx))), ("7xx.xxx.xxx.xx1", Some((6x, xxx)))] +``` + +You can also confirm the relay requests diercelty on your HBBR instancies, simply by checking the container logs + +``` +# docker logs hbbr + +INFO [src/relay_server.rs:436] Relayrequest 0593e64e-4fe8-4a59-a94f-b3420ab043eb from [::ffff:100.100.123.233]:52038 got paired +INFO [src/relay_server.rs:442] Both are raw +```