Add SSH port forwards to settings (#24474)
Closes #6920 Release Notes: - Added ability to specify port forwarding settings for remote connections
This commit is contained in:
@@ -878,6 +878,7 @@ impl RemoteServerProjects {
|
||||
nickname: None,
|
||||
args: connection_options.args.unwrap_or_default(),
|
||||
upload_binary_over_ssh: None,
|
||||
port_forwards: connection_options.port_forwards,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ use gpui::{
|
||||
use language::CursorShape;
|
||||
use markdown::{Markdown, MarkdownStyle};
|
||||
use release_channel::ReleaseChannel;
|
||||
use remote::ssh_session::ConnectionIdentifier;
|
||||
use remote::ssh_session::{ConnectionIdentifier, SshPortForwardOption};
|
||||
use remote::{SshConnectionOptions, SshPlatform, SshRemoteClient};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -52,6 +52,7 @@ impl SshSettings {
|
||||
host,
|
||||
port,
|
||||
username,
|
||||
port_forwards: conn.port_forwards,
|
||||
password: None,
|
||||
};
|
||||
}
|
||||
@@ -86,6 +87,9 @@ pub struct SshConnection {
|
||||
// limited outbound internet access.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub upload_binary_over_ssh: Option<bool>,
|
||||
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub port_forwards: Option<Vec<SshPortForwardOption>>,
|
||||
}
|
||||
|
||||
impl From<SshConnection> for SshConnectionOptions {
|
||||
@@ -98,6 +102,7 @@ impl From<SshConnection> for SshConnectionOptions {
|
||||
args: Some(val.args),
|
||||
nickname: val.nickname,
|
||||
upload_binary_over_ssh: val.upload_binary_over_ssh.unwrap_or_default(),
|
||||
port_forwards: val.port_forwards,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user