Reduce force-off to only 4: audio, camera, tunnel, privacy-mode
User clarified: only these 4 should default-off. The other 5 I had forced off (keyboard, clipboard, file-transfer, terminal, remote-restart) should be on by default (RustDesk's normal behavior). What I force off now (OVERWRITE_SETTINGS = N, user cannot override): - enable-audio - enable-camera - enable-tunnel - enable-privacy-mode What stays at RustDesk's default (on, user-configurable): - enable-keyboard - enable-clipboard - enable-file-transfer - enable-terminal - enable-remote-restart - enable-record-session Old config had no leftover enable-* values, so this is a clean transition.
This commit is contained in:
+16
-32
@@ -2102,43 +2102,27 @@ pub fn load_custom_client() {
|
|||||||
read_custom_client(&data.trim());
|
read_custom_client(&data.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Custom fork: hardcode bandwidth-heavy / sensitive defaults to off.
|
// Custom fork: force off ONLY the 4 options the user explicitly asked to default-off.
|
||||||
// Reason: RustDesk's official custom.txt path requires ed25519-signed base64 (see
|
// Everything else stays at RustDesk's normal default (typically on, user-configurable).
|
||||||
// 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.
|
|
||||||
//
|
//
|
||||||
// We use TWO mechanisms:
|
// enable-audio — not needed; 4-user remote support doesn't use it
|
||||||
// 1. OVERWRITE_SETTINGS for options we want to FORCE off — user cannot flip
|
// enable-camera — 500 kbps; not needed for support scenarios
|
||||||
// them on, even if they have old config entries. Get_or logic returns the
|
// enable-tunnel — TCP tunneling; opens server as jump host, risky
|
||||||
// overwrite value before checking user config. This is what the user wants
|
// enable-privacy-mode — user said "本来就不勾"
|
||||||
// for security/billing reasons — they explicitly asked for "默认开启是不对的"
|
|
||||||
// and got bitten by old config values surviving.
|
|
||||||
// 2. DEFAULT_SETTINGS for options we want as fallbacks only — user can
|
|
||||||
// override in their own RustDesk2.toml if they want.
|
|
||||||
//
|
//
|
||||||
// Why each one is off (user has 4 users on 5 Mbps server):
|
// Things we DO NOT force off (RustDesk defaults them ON, user can override):
|
||||||
// enable-audio — not needed for 4-user remote support
|
// enable-keyboard, enable-clipboard, enable-file-transfer, enable-terminal,
|
||||||
// enable-file-transfer — THE KILLER: 1 GB upload = 2 GB server bandwidth
|
// enable-remote-restart, enable-record-session
|
||||||
// enable-clipboard — 50 kbps + privacy; user complained "默认开启不对"
|
//
|
||||||
// enable-keyboard — user complained "默认开启不对"
|
// Mechanism note: OVERWRITE_SETTINGS is the highest priority. User cannot
|
||||||
// enable-tunnel — TCP tunneling = server as jump host
|
// flip these to on from the UI. is_option_can_save() at config.rs:2766 will
|
||||||
// enable-record-session — only when explicitly recording
|
// also refuse to write them to the user config file (RustDesk2.toml).
|
||||||
// enable-camera — 500 kbps; rarely used for support
|
|
||||||
{
|
{
|
||||||
// Force-off: user CANNOT override (use this for the ones the user
|
|
||||||
// explicitly complained about being on by default)
|
|
||||||
let mut overwrites = config::OVERWRITE_SETTINGS.write().unwrap();
|
let mut overwrites = config::OVERWRITE_SETTINGS.write().unwrap();
|
||||||
overwrites.entry("enable-keyboard".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-clipboard".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-file-transfer".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-tunnel".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-record-session".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-camera".to_string()).or_insert("N".to_string());
|
|
||||||
overwrites.entry("enable-audio".to_string()).or_insert("N".to_string());
|
overwrites.entry("enable-audio".to_string()).or_insert("N".to_string());
|
||||||
// These two were missing from previous commit — user had them enabled.
|
overwrites.entry("enable-camera".to_string()).or_insert("N".to_string());
|
||||||
overwrites.entry("enable-terminal".to_string()).or_insert("N".to_string());
|
overwrites.entry("enable-tunnel".to_string()).or_insert("N".to_string());
|
||||||
overwrites.entry("enable-remote-restart".to_string()).or_insert("N".to_string());
|
overwrites.entry("enable-privacy-mode".to_string()).or_insert("N".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force-enable UDP and IPv6 NAT punch for the self-hosted server scenario.
|
// Force-enable UDP and IPv6 NAT punch for the self-hosted server scenario.
|
||||||
|
|||||||
Reference in New Issue
Block a user