An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
feat: allow-only-conn-window-open https://github.com/rustdesk/rustdesk/discussions/7033
rustdesk07eca00bd5c2
diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dartindex bf30450a3..57fb25c62 100644--- a/flutter/lib/desktop/pages/desktop_setting_page.dart+++ b/flutter/lib/desktop/pages/desktop_setting_page.dart@@ -835,6 +835,10 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin {...directIp(context),whitelist(),...autoDisconnect(context),+ if (bind.mainIsInstalled())+ _OptionCheckBox(context, 'allow-only-conn-window-open-tip',+ 'allow-only-conn-window-open',+ reverse: false, enabled: enabled),]);}diff --git a/src/lang/ar.rs b/src/lang/ar.rsindex 9879bc235..be4f6bc5b 100644--- a/src/lang/ar.rs+++ b/src/lang/ar.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/bg.rs b/src/lang/bg.rsindex c7675e119..4ed1cc0c3 100644--- a/src/lang/bg.rs+++ b/src/lang/bg.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ca.rs b/src/lang/ca.rsindex fb5eb449d..42d714da7 100644--- a/src/lang/ca.rs+++ b/src/lang/ca.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/cn.rs b/src/lang/cn.rsindex f6d649470..79a173aba 100644--- a/src/lang/cn.rs+++ b/src/lang/cn.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "上述的字段為共享且对其他人可见。"),("Everyone", "所有人"),("ab_web_console_tip", "打开 Web 控制台以执行更多操作"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/cs.rs b/src/lang/cs.rsindex a00a5da31..116887440 100644--- a/src/lang/cs.rs+++ b/src/lang/cs.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Výše uvedená pole jsou sdílená a viditelná pro ostatní."),("Everyone", "Každý"),("ab_web_console_tip", "Více na webové konzoli"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/da.rs b/src/lang/da.rsindex 043207f19..8ec86dace 100644--- a/src/lang/da.rs+++ b/src/lang/da.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/de.rs b/src/lang/de.rsindex ae186dfa7..a28f26591 100644--- a/src/lang/de.rs+++ b/src/lang/de.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Die obigen Felder werden geteilt und sind für andere sichtbar."),("Everyone", "Jeder"),("ab_web_console_tip", "Mehr über Webkonsole"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/el.rs b/src/lang/el.rsindex 9950d10d7..369ec466d 100644--- a/src/lang/el.rs+++ b/src/lang/el.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/en.rs b/src/lang/en.rsindex 31c2eabb7..5782a8597 100644--- a/src/lang/en.rs+++ b/src/lang/en.rs@@ -218,5 +218,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("preset_password_warning", "This customized edition comes with a preset password. Anyone knowing this password could gain full control of your device. If you did not expect this, uninstall the software immediately."),("share_warning_tip", "The fields above are shared and visible to others."),("ab_web_console_tip", "More on web console"),+ ("allow-only-conn-window-open-tip", "Only allow connection if RustDesk window is open"),].iter().cloned().collect();}diff --git a/src/lang/eo.rs b/src/lang/eo.rsindex ee6d61ac5..fc17f0af9 100644--- a/src/lang/eo.rs+++ b/src/lang/eo.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/es.rs b/src/lang/es.rsindex 8d9307746..2c0d160ac 100644--- a/src/lang/es.rs+++ b/src/lang/es.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Los campos mostrados arriba son compartidos y visibles por otros."),("Everyone", "Todos"),("ab_web_console_tip", "Más en consola web"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/et.rs b/src/lang/et.rsindex b04e364a7..5449dc863 100644--- a/src/lang/et.rs+++ b/src/lang/et.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/fa.rs b/src/lang/fa.rsindex ef818f0ab..60ce02406 100644--- a/src/lang/fa.rs+++ b/src/lang/fa.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "فیلدهای بالا به اشتراک گذاشته شده و برای دیگران قابل مشاهده است"),("Everyone", "هر کس"),("ab_web_console_tip", "اطلاعات بیشتر در کنسول وب"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/fr.rs b/src/lang/fr.rsindex 22d9c0c16..7f6d75b08 100644--- a/src/lang/fr.rs+++ b/src/lang/fr.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/he.rs b/src/lang/he.rsindex ff54ba0e8..3cec23385 100644--- a/src/lang/he.rs+++ b/src/lang/he.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/hr.rs b/src/lang/hr.rsindex c89ce3e5d..92a14ebcc 100644--- a/src/lang/hr.rs+++ b/src/lang/hr.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Gornja polja su podijeljena i vidljiva drugima."),("Everyone", "Svatko"),("ab_web_console_tip", "Više na web konzoli"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/hu.rs b/src/lang/hu.rsindex 19cc91227..1a63bdcf8 100644--- a/src/lang/hu.rs+++ b/src/lang/hu.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/id.rs b/src/lang/id.rsindex 57bc2bfaf..b56293785 100644--- a/src/lang/id.rs+++ b/src/lang/id.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/it.rs b/src/lang/it.rsindex 4ad013481..7c52b64d7 100644--- a/src/lang/it.rs+++ b/src/lang/it.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "I campi sopra indicati sono condivisi e visibili ad altri."),("Everyone", "Everyone"),("ab_web_console_tip", "Altre info sulla console web"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ja.rs b/src/lang/ja.rsindex 20f142c8b..184461198 100644--- a/src/lang/ja.rs+++ b/src/lang/ja.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ko.rs b/src/lang/ko.rsindex 91d8529c8..116cd5d02 100644--- a/src/lang/ko.rs+++ b/src/lang/ko.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/kz.rs b/src/lang/kz.rsindex 0dae8c601..eb599cd98 100644--- a/src/lang/kz.rs+++ b/src/lang/kz.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/lt.rs b/src/lang/lt.rsindex 5511cea37..6c7b84804 100644--- a/src/lang/lt.rs+++ b/src/lang/lt.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/lv.rs b/src/lang/lv.rsindex 49ee9f5ed..aa3186104 100644--- a/src/lang/lv.rs+++ b/src/lang/lv.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Iepriekš minētie lauki ir koplietoti un redzami citiem."),("Everyone", "Visi"),("ab_web_console_tip", "Vairāk par tīmekļa konsoli"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/nb.rs b/src/lang/nb.rsindex 6764dff9c..5a0a83f44 100644--- a/src/lang/nb.rs+++ b/src/lang/nb.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/nl.rs b/src/lang/nl.rsindex 4b7998824..9205e6486 100644--- a/src/lang/nl.rs+++ b/src/lang/nl.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "De bovenstaande velden worden gedeeld en zijn zichtbaar voor anderen."),("Everyone", "Iedereen"),("ab_web_console_tip", "Meer over de webconsole"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/pl.rs b/src/lang/pl.rsindex 1fe6e19d1..03e4be45e 100644--- a/src/lang/pl.rs+++ b/src/lang/pl.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rsindex 6c875b36c..c1f40cbae 100644--- a/src/lang/pt_PT.rs+++ b/src/lang/pt_PT.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rsindex f36d17c12..01795ebf7 100644--- a/src/lang/ptbr.rs+++ b/src/lang/ptbr.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", "Todos"),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ro.rs b/src/lang/ro.rsindex e300c3c8a..28aa015c9 100644--- a/src/lang/ro.rs+++ b/src/lang/ro.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ru.rs b/src/lang/ru.rsindex 2b1e06b69..159799862 100644--- a/src/lang/ru.rs+++ b/src/lang/ru.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Поля выше являются общими и видны другим."),("Everyone", "Все"),("ab_web_console_tip", "Больше в веб-консоли"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/sk.rs b/src/lang/sk.rsindex 63fc86a0c..944a7bc3e 100644--- a/src/lang/sk.rs+++ b/src/lang/sk.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Vyššie uvedené polia sú zdieľané a viditeľné pre ostatných."),("Everyone", "Každý"),("ab_web_console_tip", "Viac na webovej konzole"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/sl.rs b/src/lang/sl.rsindex 2a70acb10..cbc15f35e 100755--- a/src/lang/sl.rs+++ b/src/lang/sl.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/sq.rs b/src/lang/sq.rsindex 4ef83a044..f6369c9da 100644--- a/src/lang/sq.rs+++ b/src/lang/sq.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/sr.rs b/src/lang/sr.rsindex e89794082..b38b2713d 100644--- a/src/lang/sr.rs+++ b/src/lang/sr.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/sv.rs b/src/lang/sv.rsindex afd699432..e40ddc824 100644--- a/src/lang/sv.rs+++ b/src/lang/sv.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/template.rs b/src/lang/template.rsindex 22ecb6342..2c608cf1c 100644--- a/src/lang/template.rs+++ b/src/lang/template.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/th.rs b/src/lang/th.rsindex 808cc659a..20abcd639 100644--- a/src/lang/th.rs+++ b/src/lang/th.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/tr.rs b/src/lang/tr.rsindex 40894ff3e..cacaa1586 100644--- a/src/lang/tr.rs+++ b/src/lang/tr.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/tw.rs b/src/lang/tw.rsindex 9b5a38120..a759ac213 100644--- a/src/lang/tw.rs+++ b/src/lang/tw.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "上述的欄位為共享且對其他人可見。"),("Everyone", "所有人"),("ab_web_console_tip", "打開 Web 控制台以進行更多操作"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/ua.rs b/src/lang/ua.rsindex 6600a65be..0f4fc652e 100644--- a/src/lang/ua.rs+++ b/src/lang/ua.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", "Поля вище є спільними та видимі для інших."),("Everyone", "Всі"),("ab_web_console_tip", "Детальніше про веб-консоль"),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/lang/vn.rs b/src/lang/vn.rsindex 9f2043037..bd671bd8f 100644--- a/src/lang/vn.rs+++ b/src/lang/vn.rs@@ -600,5 +600,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =("share_warning_tip", ""),("Everyone", ""),("ab_web_console_tip", ""),+ ("allow-only-conn-window-open-tip", ""),].iter().cloned().collect();}diff --git a/src/server/connection.rs b/src/server/connection.rsindex 158441785..a30ec708f 100644--- a/src/server/connection.rs+++ b/src/server/connection.rs@@ -956,6 +956,13 @@ impl Connection {if !self.check_whitelist(&addr).await {return false;}+ #[cfg(not(any(target_os = "android", target_os = "ios")))]+ if crate::is_server() && Config::get_option("allow-only-conn-window-open") == "Y" {+ if crate::check_process("", false) {+ self.send_login_error("The main window is not open").await;+ return false;+ }+ }self.ip = addr.ip().to_string();let mut msg_out = Message::new();msg_out.set_hash(self.hash.clone());