From a3670b731e40c2b462024cb91f5e5ff82f4a8aa9 Mon Sep 17 00:00:00 2001 From: 21pages Date: Thu, 12 Oct 2023 21:44:04 +0800 Subject: [PATCH] remove option enable rdp Signed-off-by: 21pages --- .../lib/desktop/pages/desktop_setting_page.dart | 5 ----- src/lang/ar.rs | 1 - src/lang/ca.rs | 1 - src/lang/cn.rs | 1 - src/lang/cs.rs | 1 - src/lang/da.rs | 1 - src/lang/de.rs | 1 - src/lang/el.rs | 1 - src/lang/eo.rs | 1 - src/lang/es.rs | 1 - src/lang/fa.rs | 1 - src/lang/fr.rs | 1 - src/lang/hu.rs | 1 - src/lang/id.rs | 1 - src/lang/it.rs | 1 - src/lang/ja.rs | 1 - src/lang/ko.rs | 1 - src/lang/kz.rs | 1 - src/lang/lt.rs | 1 - src/lang/lv.rs | 1 - src/lang/nl.rs | 1 - src/lang/pl.rs | 1 - src/lang/pt_PT.rs | 1 - src/lang/ptbr.rs | 1 - src/lang/ro.rs | 1 - src/lang/ru.rs | 1 - src/lang/sk.rs | 1 - src/lang/sl.rs | 1 - src/lang/sq.rs | 1 - src/lang/sr.rs | 1 - src/lang/sv.rs | 1 - src/lang/template.rs | 1 - src/lang/th.rs | 1 - src/lang/tr.rs | 1 - src/lang/tw.rs | 1 - src/lang/ua.rs | 1 - src/lang/vn.rs | 1 - src/server/connection.rs | 16 +++++----------- 38 files changed, 5 insertions(+), 52 deletions(-) diff --git a/flutter/lib/desktop/pages/desktop_setting_page.dart b/flutter/lib/desktop/pages/desktop_setting_page.dart index ca41ff227..7324d3a72 100644 --- a/flutter/lib/desktop/pages/desktop_setting_page.dart +++ b/flutter/lib/desktop/pages/desktop_setting_page.dart @@ -729,11 +729,6 @@ class _SafetyState extends State<_Safety> with AutomaticKeepAliveClientMixin { Widget more(BuildContext context) { bool enabled = !locked; return _Card(title: 'Security', children: [ - Offstage( - offstage: !Platform.isWindows, - child: _OptionCheckBox(context, 'Enable RDP', 'enable-rdp', - enabled: enabled), - ), shareRdp(context, enabled), _OptionCheckBox(context, 'Deny LAN Discovery', 'enable-lan-discovery', reverse: true, enabled: enabled), diff --git a/src/lang/ar.rs b/src/lang/ar.rs index 568513504..a7f24540e 100644 --- a/src/lang/ar.rs +++ b/src/lang/ar.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "جهاز ادخال الصوت"), ("Use IP Whitelisting", "استخدام قائمة الـ IP البيضاء"), ("Network", "الشبكة"), - ("Enable RDP", "تفعيل RDP"), ("Pin Toolbar", "تثبيت شريط الادوات"), ("Unpin Toolbar", "الغاء تثبيت شريط الادوات"), ("Recording", "التسجيل"), diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 9dab79371..e7180abf3 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Dispositiu d'entrada d'àudio"), ("Use IP Whitelisting", "Utilitza llista de IPs admeses"), ("Network", "Xarxa"), - ("Enable RDP", "Habilitar RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Gravant"), diff --git a/src/lang/cn.rs b/src/lang/cn.rs index d41af5467..d1cff492b 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "音频输入设备"), ("Use IP Whitelisting", "只允许白名单上的 IP 访问"), ("Network", "网络"), - ("Enable RDP", "允许 RDP 访问"), ("Pin Toolbar", "固定工具栏"), ("Unpin Toolbar", "取消固定工具栏"), ("Recording", "录屏"), diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 728f8bb20..9267e1f75 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Vstupní zvukové zařízení"), ("Use IP Whitelisting", "Použít bílou listinu IP"), ("Network", "Síť"), - ("Enable RDP", "Povolit protokol RDP"), ("Pin Toolbar", "Připnout panel nástrojů"), ("Unpin Toolbar", "Odepnout panel nástrojů"), ("Recording", "Nahrávání"), diff --git a/src/lang/da.rs b/src/lang/da.rs index cc4a3503e..1ad6f36b5 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Lydindgangsenhed"), ("Use IP Whitelisting", "Brug IP Whitelisting"), ("Network", "Netværk"), - ("Enable RDP", "Aktivér RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Optager"), diff --git a/src/lang/de.rs b/src/lang/de.rs index 37d58d633..bf5da7415 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Audioeingabegerät"), ("Use IP Whitelisting", "IP-Whitelist verwenden"), ("Network", "Netzwerk"), - ("Enable RDP", "RDP aktivieren"), ("Pin Toolbar", "Symbolleiste anpinnen"), ("Unpin Toolbar", "Symbolleiste lösen"), ("Recording", "Aufnahme"), diff --git a/src/lang/el.rs b/src/lang/el.rs index 183cae8d2..a984411a2 100644 --- a/src/lang/el.rs +++ b/src/lang/el.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Συσκευή εισόδου ήχου"), ("Use IP Whitelisting", "Χρήση λίστας επιτρεπόμενων IP"), ("Network", "Δίκτυο"), - ("Enable RDP", "Ενεργοποίηση RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Εγγραφή"), diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 114009526..51e97c68a 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/es.rs b/src/lang/es.rs index 9ca8ae68f..350505a34 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Dispositivo de entrada de audio"), ("Use IP Whitelisting", "Usar lista de IPs admitidas"), ("Network", "Red"), - ("Enable RDP", "Habilitar RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Grabando"), diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 9090dfa6b..0e0009a6c 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "منبع صدا"), ("Use IP Whitelisting", "های مجاز IP استفاده از"), ("Network", "شبکه"), - ("Enable RDP", "RDP فعال شدن"), ("Pin Toolbar", "سجاق کردن نوار ابزار"), ("Unpin Toolbar", "خروج از حالت سجاق نوار ابزار"), ("Recording", "در حال ضبط"), diff --git a/src/lang/fr.rs b/src/lang/fr.rs index bbc2f6524..50b03299a 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Périphérique source audio"), ("Use IP Whitelisting", "Utiliser une liste blanche d'IP"), ("Network", "Réseau"), - ("Enable RDP", "Activer connection RDP"), ("Pin Toolbar", "Épingler la barre d'outil"), ("Unpin Toolbar", "Détacher la barre d'outil"), ("Recording", "Enregistrement"), diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 334bb7435..f9f7051ae 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Audio bemeneti eszköz"), ("Use IP Whitelisting", "Engedélyezési lista használata"), ("Network", "Hálózat"), - ("Enable RDP", "RDP engedélyezése"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Felvétel"), diff --git a/src/lang/id.rs b/src/lang/id.rs index b455d005d..8ed5f1861 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Input Perangkat Audio"), ("Use IP Whitelisting", "Gunakan daftar IP yang diizinkan"), ("Network", "Jaringan"), - ("Enable RDP", "Aktifkan RDP"), ("Pin Toolbar", "Sematkan Toolbar"), ("Unpin Toolbar", "Batal sematkan Toolbar"), ("Recording", "Sedang Merekam"), diff --git a/src/lang/it.rs b/src/lang/it.rs index 854b4a9c0..194f0686c 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Dispositivo ingresso audio"), ("Use IP Whitelisting", "Usa elenco IP autorizzati"), ("Network", "Rete"), - ("Enable RDP", "Abilita RDP"), ("Pin Toolbar", "Blocca barra strumenti"), ("Unpin Toolbar", "Sblocca barra strumenti"), ("Recording", "Registrazione"), diff --git a/src/lang/ja.rs b/src/lang/ja.rs index f730a12df..48b4f28ae 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/ko.rs b/src/lang/ko.rs index 4c8972f75..00a4012e8 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/kz.rs b/src/lang/kz.rs index 865f8e455..d7481eaff 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/lt.rs b/src/lang/lt.rs index e0374c70f..9e63f6160 100644 --- a/src/lang/lt.rs +++ b/src/lang/lt.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Garso įvestis"), ("Use IP Whitelisting", "Naudoti patikimą IP sąrašą"), ("Network", "Tinklas"), - ("Enable RDP", "Įgalinti RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Įrašymas"), diff --git a/src/lang/lv.rs b/src/lang/lv.rs index 2ea614dce..3bdffa616 100644 --- a/src/lang/lv.rs +++ b/src/lang/lv.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Audio ievades ierīce"), ("Use IP Whitelisting", "Izmantot balto IP sarakstu"), ("Network", "Tīkls"), - ("Enable RDP", "Iespējot RDP"), ("Pin Toolbar", "Piespraust rīkjoslu"), ("Unpin Toolbar", "Atspraust rīkjoslu"), ("Recording", "Ierakstīšana"), diff --git a/src/lang/nl.rs b/src/lang/nl.rs index f46599194..93967ebad 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Audio-invoerapparaat"), ("Use IP Whitelisting", "Gebruik een witte lijst van IP-adressen"), ("Network", "Netwerk"), - ("Enable RDP", "Zet RDP aan"), ("Pin Toolbar", "Werkbalk Vastzetten"), ("Unpin Toolbar", "Werkbalk Losmaken"), ("Recording", "Opnemen"), diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 6dc57366c..d6c4f5b84 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Urządzenie wejściowe Audio"), ("Use IP Whitelisting", "Użyj białej listy IP"), ("Network", "Sieć"), - ("Enable RDP", "Włącz RDP"), ("Pin Toolbar", "Przypnij pasek narzędzi"), ("Unpin Toolbar", "Odepnij pasek narzędzi"), ("Recording", "Nagrywanie"), diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index c8298a749..8712ac615 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index 3d935dfa7..f2810f76c 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Dispositivo de entrada de áudio"), ("Use IP Whitelisting", "Utilizar lista de IPs confiáveis"), ("Network", "Rede"), - ("Enable RDP", "Habilitar RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Gravando"), diff --git a/src/lang/ro.rs b/src/lang/ro.rs index 03b66f2e5..73ff3bb22 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Dispozitiv de intrare audio"), ("Use IP Whitelisting", "Folosește lista de IP-uri autorizate"), ("Network", "Rețea"), - ("Enable RDP", "Activează RDP"), ("Pin Toolbar", "Fixează bara de instrumente"), ("Unpin Toolbar", "Detașează bara de instrumente"), ("Recording", "Înregistrare"), diff --git a/src/lang/ru.rs b/src/lang/ru.rs index d4c9e055c..1d7c8cfca 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Источник звука"), ("Use IP Whitelisting", "Использовать белый список IP"), ("Network", "Сеть"), - ("Enable RDP", "Включить RDP"), ("Pin Toolbar", "Закрепить панель инструментов"), ("Unpin Toolbar", "Открепить панель инструментов"), ("Recording", "Запись"), diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 11d1cc5e7..95b808fa7 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/sl.rs b/src/lang/sl.rs index c9ff7d82b..88c4c35e6 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Vhodna naprava za zvok"), ("Use IP Whitelisting", "Omogoči seznam dovoljenih IP naslovov"), ("Network", "Mreža"), - ("Enable RDP", "Omogoči RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Snemanje"), diff --git a/src/lang/sq.rs b/src/lang/sq.rs index 3ead4dc70..e63dadfe0 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Pajisja e hyrjes audio"), ("Use IP Whitelisting", "Përdor listën e bardhë IP"), ("Network", "Rrjeti"), - ("Enable RDP", "Aktivizo RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Regjistrimi"), diff --git a/src/lang/sr.rs b/src/lang/sr.rs index 67969158f..a51e36526 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Uređaj za ulaz zvuka"), ("Use IP Whitelisting", "Koristi listu pouzdanih IP"), ("Network", "Mreža"), - ("Enable RDP", "Dozvoli RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Snimanje"), diff --git a/src/lang/sv.rs b/src/lang/sv.rs index a3dc77764..e0fd1086b 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Inmatningsenhet för ljud"), ("Use IP Whitelisting", "Använd IP-Vitlistning"), ("Network", "Nätverk"), - ("Enable RDP", "Aktivera RDP"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Spelar in"), diff --git a/src/lang/template.rs b/src/lang/template.rs index a424ba0f9..dfd4b9651 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", ""), ("Use IP Whitelisting", ""), ("Network", ""), - ("Enable RDP", ""), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", ""), diff --git a/src/lang/th.rs b/src/lang/th.rs index 361da2446..4ed4dd76c 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "อุปกรณ์รับอินพุทข้อมูลเสียง"), ("Use IP Whitelisting", "ใช้งาน IP ไวท์ลิสต์"), ("Network", "เครือข่าย"), - ("Enable RDP", "เปิดการใช้งาน RDP"), ("Pin Toolbar", "ปักหมุดแถบเครื่องมือ"), ("Unpin Toolbar", "ยกเลิกการปักหมุดแถบเครื่องมือ"), ("Recording", "การบันทึก"), diff --git a/src/lang/tr.rs b/src/lang/tr.rs index d5d3859b8..6ce86e6f3 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Ses Giriş Aygıtı"), ("Use IP Whitelisting", "IP Beyaz Listeyi Kullan"), ("Network", "Ağ"), - ("Enable RDP", "RDP Aktif Et"), ("Pin Toolbar", ""), ("Unpin Toolbar", ""), ("Recording", "Kayıt Ediliyor"), diff --git a/src/lang/tw.rs b/src/lang/tw.rs index cf502f914..a9fc78e99 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "音訊輸入裝置"), ("Use IP Whitelisting", "只允許白名單上的 IP 進行連線"), ("Network", "網路"), - ("Enable RDP", "允許 RDP 存取"), ("Pin Toolbar", "釘選工具列"), ("Unpin Toolbar", "取消釘選工具列"), ("Recording", "錄製"), diff --git a/src/lang/ua.rs b/src/lang/ua.rs index a5756b5f2..4e4c29e0c 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Пристрій введення звуку"), ("Use IP Whitelisting", "Використовувати білий список IP"), ("Network", "Мережа"), - ("Enable RDP", "Увімкнути RDP"), ("Pin Toolbar", "Закріпити панель інструментів"), ("Unpin Toolbar", "Відкріпити панель інструментів"), ("Recording", "Запис"), diff --git a/src/lang/vn.rs b/src/lang/vn.rs index 9ed649b32..88d42cd08 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -365,7 +365,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Audio Input Device", "Thiết bị âm thanh đầu vào"), ("Use IP Whitelisting", "Dùng danh sách các IP cho phép"), ("Network", "Mạng"), - ("Enable RDP", "Bật RDP"), ("Pin Toolbar", "Ghim thanh công cụ"), ("Unpin Toolbar", "Bỏ ghim thanh công cụ"), ("Recording", "Đang ghi hình"), diff --git a/src/server/connection.rs b/src/server/connection.rs index 7da5e4086..8e08fa5a8 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -1403,23 +1403,17 @@ impl Connection { self.file_transfer = Some((ft.dir, ft.show_hidden)); } Some(login_request::Union::PortForward(mut pf)) => { + if !Connection::permission("enable-tunnel") { + self.send_login_error("No permission of IP tunneling").await; + sleep(1.).await; + return false; + } let mut is_rdp = false; if pf.host == "RDP" && pf.port == 0 { pf.host = "localhost".to_owned(); pf.port = 3389; is_rdp = true; } - if is_rdp && !Connection::permission("enable-rdp") - || !is_rdp && !Connection::permission("enable-tunnel") - { - if is_rdp { - self.send_login_error("No permission of RDP").await; - } else { - self.send_login_error("No permission of IP tunneling").await; - } - sleep(1.).await; - return false; - } if pf.host.is_empty() { pf.host = "localhost".to_owned(); }