rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
6.46k stars 1.35k forks source link

force to use relay server #253

Open bagherfathi opened 1 year ago

bagherfathi commented 1 year ago

hi is it an option in configuration or a tricky solution to prevent RustDesk from a p2p connection and force it to pass all traffic through the relay server? thanks

DoM1niC commented 1 year ago

hi is it an option in configuration or a tricky solution to prevent RustDesk from a p2p connection and force it to pass all traffic through the relay server? thanks

variable binary description
ALWAYS_USE_RELAY hbbs if set to "Y" disallows direct peer connection

bagherfathi commented 1 year ago

thank you @DoM1niC

lamithe commented 1 year ago

@bagherfathi Do you make it? I don't know how to set the 'ALWAYS_USE_RELAY'.PLEASEA HELP ME!!!

lamithe commented 1 year ago

@bagherfathi Add: I have already used the '-k' parameter when run the hbbs and hbbr , but it dont work.All I get is p2p connection without using relay

wxlg1117 commented 1 year ago

@bagherfathi Do you make it? I don't know how to set the 'ALWAYS_USE_RELAY'.PLEASEA HELP ME!!!

[root@sh ~]# cat /usr/lib/systemd/system/hbbs.service

[Unit]
Description=rustdesk server hbbs
After=network.target network-online.target

[Service]
......
Environment="ALWAYS_USE_RELAY=Y"
WorkingDirectory=/data/rustdesk
ExecStart=/usr/local/bin/hbbs --config hbbs.conf
ExecStop=/bin/kill -s QUIT $MAINPID
Restart=on-failure

[Install]
WantedBy=multi-user.target