Skip to content

feat: support custom client config signing with self-owned Ed25519 key - #2

Open
hashbk wants to merge 2 commits into
masterfrom
feat/custom-client-signing
Open

feat: support custom client config signing with self-owned Ed25519 key#2
hashbk wants to merge 2 commits into
masterfrom
feat/custom-client-signing

Conversation

@hashbk

@hashbk hashbk commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

Replace the hardcoded official RustDesk public key with a self-generated Ed25519 key pair, and add CI workflow steps to automatically sign custom.txt from GitHub Action Secrets during the build process.

Changes

  • Replace public key in src/common.rs with a new self-generated Ed25519 public key
  • Add signing script res/sign_custom.py for signing custom client config with Ed25519 private key
  • Add CI workflow steps to sign and place custom.txt for all platforms:
    • Windows (Flutter + Sciter)
    • macOS
    • Linux (Flutter + Sciter)
  • Include custom.txt in deb, rpm, suse rpm, and arch packages when present

Required GitHub Secrets

To use this feature, configure the following secrets in your repository:

Secret Description
CUSTOM_CLIENT_PRIVATE_KEY Base64-encoded 64-byte Ed25519 private key (sodiumoxide format: seed + public_key)
CUSTOM_CLIENT_CONFIG JSON string of custom client configuration (e.g., {"app-name":"MyDesk","default-settings":{"server":"my.server.com"}})

Key Pair

  • Public Key (embedded in code): rgvzRBBtKBZnTT6iL2zhpyKxrtyC0iSnZXIUshDcNs4=
  • Private Key (store in GitHub Secret): Must be stored as CUSTOM_CLIENT_PRIVATE_KEY secret

How it works

  1. CI reads CUSTOM_CLIENT_PRIVATE_KEY and CUSTOM_CLIENT_CONFIG from secrets
  2. res/sign_custom.py signs the config JSON with the private key
  3. The signed custom.txt is placed alongside the executable in the build output
  4. At runtime, the client verifies the signature using the embedded public key

If the secrets are not configured, the build proceeds normally without custom.txt.

hashbk added 2 commits June 19, 2026 02:12
Replace the hardcoded official public key with a self-generated one,
and add CI workflow steps to sign custom.txt from Action Secrets.

- Generate new Ed25519 key pair for custom.txt verification
- Replace public key in src/common.rs
- Add res/sign_custom.py script for signing config with Ed25519
- Add CI workflow steps to sign and place custom.txt for all platforms
  (Windows Flutter/Sciter, macOS, Linux Flutter/Sciter)
- Include custom.txt in deb, rpm, and arch packages when present

Required GitHub Secrets:
- CUSTOM_CLIENT_PRIVATE_KEY: Base64-encoded 64-byte Ed25519 private key
- CUSTOM_CLIENT_CONFIG: JSON string of custom client configuration
The Windows Flutter build step runs on PowerShell by default,
bash `if [ -f ]` syntax causes a parser error.
Switch to `if (Test-Path)` which is native PowerShell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant