Hardcode enable-audio=N as default (bypasses custom.txt signature check)
RustDesk's read_custom_client() at src/common.rs:2191 expects base64-decoded
ed25519-signed content, not plain JSON. Our custom.txt (plain JSON) fails the
decode64 check and returns early, so DEFAULT_SETTINGS stays empty.
Fix: inject 'enable-audio' = 'N' directly into DEFAULT_SETTINGS at the end of
load_custom_client(), outside the read_custom_client() call. entry().or_insert()
preserves the priority chain (OVERWRITE_SETTINGS → CONFIG2 → DEFAULT_SETTINGS),
so the user can still flip the option on in Settings.
Verified with debug eprintln that DEFAULT_SETTINGS.get("enable-audio") returns
Some("N") at startup. UI now shows 'Enable audio' unchecked in Settings →
Permissions.
This commit is contained in:
@@ -2101,6 +2101,17 @@ pub fn load_custom_client() {
|
||||
};
|
||||
read_custom_client(&data.trim());
|
||||
}
|
||||
|
||||
// Custom fork: hardcode enable-audio = N as the default. User can still flip it on in Settings.
|
||||
// Reason: RustDesk's official custom.txt path requires ed25519-signed base64 (see
|
||||
// read_custom_client at line 2191 — decode64 + sign::verify with key
|
||||
// "5Qbwsde3unUcJBtrx9ZkvUmwFNoExHzpryHuPUdqlWM="), which we can't produce without the
|
||||
// official signing key. So we bypass custom.txt and inject directly into DEFAULT_SETTINGS.
|
||||
// entry().or_insert() preserves the priority chain: OVERWRITE_SETTINGS → CONFIG2 → DEFAULT_SETTINGS.
|
||||
{
|
||||
let mut defaults = config::DEFAULT_SETTINGS.write().unwrap();
|
||||
defaults.entry("enable-audio".to_string()).or_insert("N".to_string());
|
||||
}
|
||||
}
|
||||
|
||||
fn read_custom_client_advanced_settings(
|
||||
|
||||
Reference in New Issue
Block a user