mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-13 06:42:18 +00:00
update setting page, add option enable-rdp
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
1 parent
f5dba0f7aa
commit
302a43d68c
29 files changed
+956
-420
No files matched your search
@@ -921,17 +921,23 @@ impl Connection {
|
||||
self.file_transfer = Some((ft.dir, ft.show_hidden));
|
||||
}
|
||||
Some(login_request::Union::PortForward(mut pf)) => {
|
||||
if !Config::get_option("enable-tunnel").is_empty() {
|
||||
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 && !Config::get_option("enable-rdp").is_empty()
|
||||
|| !is_rdp && !Config::get_option("enable-tunnel").is_empty()
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user