remove option enable rdp
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
e6f62dc95e
commit
a3670b731e
@ -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),
|
||||
|
@ -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", "التسجيل"),
|
||||
|
@ -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"),
|
||||
|
@ -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", "录屏"),
|
||||
|
@ -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í"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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", "Εγγραφή"),
|
||||
|
@ -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", ""),
|
||||
|
@ -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"),
|
||||
|
@ -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", "در حال ضبط"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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", ""),
|
||||
|
@ -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", ""),
|
||||
|
@ -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", ""),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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", ""),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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", "Запись"),
|
||||
|
@ -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", ""),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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"),
|
||||
|
@ -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", ""),
|
||||
|
@ -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", "การบันทึก"),
|
||||
|
@ -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"),
|
||||
|
@ -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", "錄製"),
|
||||
|
@ -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", "Запис"),
|
||||
|
@ -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"),
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user