diff --git a/src/common.rs b/src/common.rs index 69e3ec3..596a248 100644 --- a/src/common.rs +++ b/src/common.rs @@ -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(