RustDesk Config
Silent install package for RustDesk Config
Configuration procedure:
Three packages are required to operate RustDesk through the WAPT console: tis-rustdesk , tis-rustdesk-server and tis-rustdesk-config-template.
tis-rustdesk-server
https://wapt.tranquil.it/store/en/tis-rustdesk-server
- Install this package on your RustDesk server.
- Once installed, go to the machine's audit data and retrieve the data for the tis-rustdesk-server package.
- Retrieve the rustdesk_cfg key and copy it.
tis-rustdesk-config-template
https://wapt.tranquil.it/store/en/tis-rustdesk-config-template
- Download the "tis-rustdesk-config-template" package.
- Private Repository > tis-rustdesk-config-template > right-click > launch update_package.
- Click OK on the message indicating that the update-package() function has been launched.
- Once the window is displayed, tick "upload directly", select a package maturity, note your package prefix and tick "increment package version".
- Click on ‘Run update-package for selected packages’.
- Enter the rustdesk_cfg key > click on "Upload the package".
- Install this new package on the client workstations.
How to choose your configuration method:
When prompted during update_package, two methods are available:
- Basic usage (cfg): For most deployments, answer "Yes" to the first question and paste the
rustdesk_cfgkey retrieved from the server audit data. - Advanced usage (TOML): For more granular control, answer "No" to the first question, then "Yes" to the second, and paste or edit a
RustDesk2.tomlfile directly.
Security note: If you need to restrict which machines are allowed to connect, use the TOML method and uncomment the whitelist parameter:
whitelist = 'IP1,IP2,IP3'
This limits incoming connections to the specified IP addresses only.
Usage Procedure:
- Install the tis-rustdesk package ( https://wapt.tranquil.it/store/en/tis-rustdesk ) on the client machines.
- Install the customized RustDesk configuration package.
- Launch waptconsole.
- Select the machine to control in PMAD > Right-click "Connect via RustDesk".
⚠️ Il est nécessaire que la machine ayant la console WAPT ai le paquet Rustdesk ainsi que le paquet de configuration installé ⚠️
- package: tis-rustdesk-config-template
- name: RustDesk Config
- version: 30
- categories: Utilities
- maintainer: WAPT Team,Tranquil IT
- locale: all
- target_os: all
- architecture: all
- signature_date:
- size: 10.43 Ko
- homepage : https://rustdesk.com/
- depends:
package : tis-rustdesk-config-template
version : 30
architecture : all
section : base
priority : optional
name : RustDesk Config
categories : Utilities
maintainer : WAPT Team,Tranquil IT
description : Config for RustDesk
depends : tis-rustdesk
conflicts :
maturity : PROD
locale : all
target_os : all
min_wapt_version : 2.3
sources :
installed_size :
impacted_process :
description_fr : Config rustdesk
description_pl :
description_de :
description_es :
description_pt :
description_it :
description_nl :
description_ru :
audit_schedule : 30d
editor :
keywords : RustDesk
licence :
homepage : https://rustdesk.com/
package_uuid : 75ac2887-288f-4569-b417-76d760114777
valid_from :
valid_until :
forced_install_on :
changelog : https://github.com/rustdesk/rustdesk/releases
min_os_version :
max_os_version :
icon_sha256sum : 2435ab1227e19048fc0d782821cc7258a41b69dc1e22914aedddd288a38b6ccc
signer : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date : 2026-03-23T11:00:29.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature : eMRBnkZhcUE8FihSfz1mbiz2KZx3n7aMiJ4+40BGxf3JbOOYPQpdwwjdZe+uEPuetGNC4pwyWYkcmSmlgQpFy8b1KovlLKQqcOxQ9yyWsqRNl4CJvRaFhAEkMll1rjQrh+DTr5Iep25F8lwsYAqQqYOAekhY1bJvSE5Aez3NTM+pb9FfQShepAO9Z29hNCRoixDWYdPLbOAnvY+SPVSuzbvMGnmhMl04zuOcixVfgmKp6ubYoVhkD6ijy1GywknC97sWBF9ejTpwL4+YD3k7mq1IyyCARz4ZscY2L3Ywft7oenoG6y8NbObH6vBiLqt2gP+ctnTdLo7ZtXEtEUZbFA==
# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import string, secrets
import platform
import json
import base64
if platform.system() == 'Windows':
if uninstall_key_exists('RustDesk'):
RustDeskBin = makepath(install_location('RustDesk'),'rustdesk.exe')
dest_rustdesk_toml = makepath(systemdrive, r"Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\config")
elif platform.system() == 'Darwin':
RustDeskBin = "/Applications/RustDesk.app/Contents/MacOS/RustDesk"
else:
RustDeskBin = "/usr/bin/rustdesk"
dest_rustdesk_toml = "/root/.config/rustdesk/RustDesk2.toml"
def install():
package_rustdesk_toml = makepath(basedir, 'RustDesk2.toml')
if isfile(package_rustdesk_toml):
if service_is_running("rustdesk"):
service_stop("rustdesk")
filecopyto(package_rustdesk_toml, dest_rustdesk_toml)
else:
rustdesk_cfg = open(makepath(basedir, 'rustdesk.cfg')).read()
run_notfatal('"%s" --config %s' % (RustDeskBin, rustdesk_cfg))
# Charger la wordlist EFF (à télécharger depuis https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt)
with open("eff_large_wordlist.txt") as f:
words = [line.split("\t")[1].strip() for line in f]
rustdesk_pw = generate_passphrase(words)
run('"%s" --password %s' % (RustDeskBin, rustdesk_pw))
if platform.system() == 'Windows':
if service_is_running("rustdesk"):
service_stop("rustdesk")
service_start("rustdesk")
elif platform.system() == 'Darwin':
print('todo')
else:
systemd_restart_service('rustdesk')
def audit():
rustdesk_id = run('"%s" --get-id' % RustDeskBin)
if rustdesk_id.endswith('\n'):
rustdesk_id = rustdesk_id.split('\n')[-2]
# Charger la wordlist EFF (à télécharger depuis https://www.eff.org/files/2016/07/18/eff_large_wordlist.txt)
with open("eff_large_wordlist.txt") as f:
words = [line.split("\t")[1].strip() for line in f]
rustdesk_pw = generate_passphrase(words)
run('"%s" --password %s' % (RustDeskBin, rustdesk_pw))
WAPT.write_audit_data_if_changed("rustdesk", 'rustdesk-id', rustdesk_id, max_count=365)
WAPT.write_audit_data_if_changed("rustdesk", 'password_encryption', rsa_encrypted_data_str(rustdesk_pw, WAPT.public_certs_dir), max_count=365)
return "OK"
def encode_rustdesk_config(config):
rustdesk_list = list(base64.b64encode(json.dumps(config, separators=(',', ':')).encode('utf-8')).decode('utf-8').replace('=',''))
rustdesk_list.reverse()
return ''.join(rustdesk_list)
def generate_passphrase(word_list, num_words=4):
parts = [secrets.choice(word_list).capitalize() + str(secrets.randbelow(10)) for _ in range(num_words)]
return "-".join(parts)
def update_package():
old_cfg = open('rustdesk.cfg').read() if isfile('rustdesk.cfg') else ''
old_toml = open('RustDesk2.toml').read() if isfile('RustDesk2.toml') else """
rendezvous_server = 'srvwapt.tranquil.it:21116'
nat_type = 1
serial = 0
unlock_pin = ''
[options]
custom-rendezvous-server = 'srvwapt.tranquil.it'
key = 'bForncTm9zFiZQ6BDv1H2FHtv6YkmqkwdRq7xV7c5U8='
av1-test = 'Y'
relay-server = 'srvwapt.tranquil.it'
#whitelist = 'IP1,IP2,IP3'
"""
if not params.get("install_with_luti", False):
from waptguihelper import message_dialog, memo_dialog, input_dialog, MB_YESNO, MB_ICONQUESTION, ID_YES
# CFG config from waptconsole audit data
if message_dialog("RUSTDESK Config", "Do you have a cfg config / file?", MB_YESNO + MB_ICONQUESTION) == ID_YES:
cfg_input = memo_dialog("RUSTDESK Config", "Paste your rustdesk CFG config from the 'Audit data' of your host server", old_cfg)
with open('rustdesk.cfg', 'w') as f:
f.write(cfg_input)
# Allow user to use TOML file
elif message_dialog("RUSTDESK Config", "Do you have a TOML config file?", MB_YESNO + MB_ICONQUESTION) == ID_YES:
toml_input = memo_dialog("RUSTDESK Config", "Paste your rustdesk TOML config", old_toml)
toml_input = "\n".join([line for line in toml_input.splitlines() if line.strip()])
with open('RustDesk2.toml', 'w') as f:
f.write(toml_input)
else:
conf = {"api": ""}
conf['host'] = input_dialog('Host', 'Please give ip or dns name of HOST rustdesk server :', 'rustdesk.mydomain.lan')
conf['relay'] = input_dialog('Host', 'Please give ip or dns name of RELAY rustdesk server :', conf['host'])
conf['key'] = input_dialog('Host', 'Please give the public key of the rustdesk server (content of the file /opt/rustdesk/*.pub) :', '')
with open('rustdesk.cfg', 'w') as f:
f.write( encode_rustdesk_config(conf))
control.package = control.package.replace('-template', '')
control.save_control_to_wapt()
54d80ad450f21df703024857709e7ff05808983c6428c1153418ee1f2cded51f : WAPT/README.md
21c7566ec8040f927c7446d36e4b5dfb102bec2d91460a6d4580fe39d45a820a : WAPT/README_fr.md
38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
12e92ca63aa4d0de29841c4bcce8c72ab367837cb097087bef2e3e7ab405c86b : WAPT/control
2435ab1227e19048fc0d782821cc7258a41b69dc1e22914aedddd288a38b6ccc : WAPT/icon.png
a21f97cf3c04dd121621da4f4c782b797b06d8c8bb02fac9c39f4e7a360d1705 : luti.json
8ac10336ed24a1195be4c74d02388e4f523be0d3172a1eefa8368888d8a5f734 : setup.py