From 6a16a03d094c50eaddc77747637c07c3d5021faa Mon Sep 17 00:00:00 2001 From: Kingtous Date: Thu, 18 May 2023 19:49:36 +0800 Subject: [PATCH] fix: add port forward in client --- src/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index 72195a54c..8ec021f55 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1351,7 +1351,7 @@ impl LoginConfigHandler { /// /// * `ignore_default` - If `true`, ignore the default value of the option. fn get_option_message(&self, ignore_default: bool) -> Option { - if self.conn_type.eq(&ConnType::FILE_TRANSFER) || self.conn_type.eq(&ConnType::PORT_FORWARD) + if self.conn_type.eq(&ConnType::FILE_TRANSFER) || self.conn_type.eq(&ConnType::PORT_FORWARD) || self.conn_type.eq(&ConnType::RDP) { return None; } @@ -1412,7 +1412,7 @@ impl LoginConfigHandler { } pub fn get_option_message_after_login(&self) -> Option { - if self.conn_type.eq(&ConnType::FILE_TRANSFER) || self.conn_type.eq(&ConnType::PORT_FORWARD) + if self.conn_type.eq(&ConnType::FILE_TRANSFER) || self.conn_type.eq(&ConnType::PORT_FORWARD) || self.conn_type.eq(&ConnType::RDP) { return None; } @@ -1689,7 +1689,7 @@ impl LoginConfigHandler { show_hidden: !self.get_option("remote_show_hidden").is_empty(), ..Default::default() }), - ConnType::PORT_FORWARD => lr.set_port_forward(PortForward { + ConnType::PORT_FORWARD | ConnType::RDP => lr.set_port_forward(PortForward { host: self.port_forward.0.clone(), port: self.port_forward.1, ..Default::default()