Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,65 @@

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

RustDesk provides several ways to configure the client application. One way that is supported for the Windows client is to encode the settings in the filename. This tool provides a way to easily create such a filename without having to purchase the Pro version of the tool.
RustDesk provides several ways to configure the client application. One way that is supported for the Windows client is to encode the settings in the filename. This tool provides a way to easily create such a filename without having to purchase the Pro version of the tool.

## Usage

1. Open `index.html` in any modern browser (or visit the hosted page).
2. Fill in the fields you need:
- **ID Server** – your `hbbs` host or IP (required, e.g. `hbbs.example.com`).
- **Relay Server** – optional; RustDesk usually infers it.
- **API Server** – Pro only (e.g. `https://hbbs.example.com`).
- **Key** – the public key found in `id_ed25519.pub` on your server.
3. The generated file name (e.g. `rustdesk--<encoded>--.exe`) updates automatically.
4. Click **Copy**, then rename your `rustdesk.exe` to the copied file name. On launch the
client reads the encoded settings from its own file name.

Only the fields you fill in are included in the encoded config. Everything runs locally in
your browser — no data is sent anywhere.

### Two ways to apply the config

RustDesk can read this config in two different ways, and they don't behave identically:

| | File name method (rename `.exe`) | `--config` import |
| --- | --- | --- |
| How | Rename `rustdesk.exe` to the generated name | `rustdesk.exe --config "<encoded>"` |
| `host` / `key` / `api` | Read **at launch** from the file name | Read and **saved** to settings |
| `relay` | Ignored — auto-deduced from the ID Server | **Saved** to settings |
| Shows in Settings → Network | No (applied at runtime only) | Yes (values are persisted) |
| Requirements | None | RustDesk installed + run as Administrator |

If you fill in an **API Server** (or want the values to appear/persist in
Settings → Network), use the `--config` command the page generates:

```powershell
rustdesk.exe --config "<encoded-string>"
```

This is verified against RustDesk's source (`src/core_main.rs`), where `--config` writes
`custom-rendezvous-server`, `api-server`, `relay-server` and `key` into the stored options.
With the file name method, the API server is used at runtime but does **not** show up in the
Network settings dialog, and the Relay field shows the ID Server because RustDesk deduces it.

### Download & rename in one step

The page also detects the latest RustDesk release (via the GitHub API) and provides:

- a direct **download link** to the newest Windows x64 build, and
- a ready-to-run **PowerShell command** that downloads the client and saves it with the
generated file name in one step:

```powershell
Invoke-WebRequest -Uri "https://github.com/rustdesk/rustdesk/releases/download/<ver>/rustdesk-<ver>-x86_64.exe" -OutFile "rustdesk--<encoded>--.exe"
```

Because browsers can't rename a cross-origin download, the PowerShell command is the
reliable way to get the binary already named correctly. Run it from the folder where you
want the file.

## How it works

The settings are assembled into a small JSON object, encoded as URL-safe Base64, reversed,
and wrapped as `rustdesk--<string>--.exe`, matching RustDesk's
[file-name configuration format](https://rustdesk.com/docs/en/self-host/client-configuration/).
Loading