mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
update setting page, add option enable-rdp
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -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