From 1e4dcf02442515ac5adde7b326ea193375bd2e23 Mon Sep 17 00:00:00 2001 From: Sean Estabrooks Date: Sat, 7 Sep 2024 06:16:36 -0400 Subject: [PATCH] Don't pass ProxyCommand, just look it up It doesn't make much sense to pass this value, especially after adding the ProxyUseFDpass functionality, which accesses the config directly anyway. --- wezterm-ssh/src/sessioninner.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wezterm-ssh/src/sessioninner.rs b/wezterm-ssh/src/sessioninner.rs index 227b9072d..87b028950 100644 --- a/wezterm-ssh/src/sessioninner.rs +++ b/wezterm-ssh/src/sessioninner.rs @@ -205,8 +205,7 @@ impl SessionInner { sess.set_option(libssh_rs::SshOption::HostKeys(host_key.to_string()))?; } - let (sock, _child) = - self.connect_to_host(&hostname, port, verbose, self.config.get("proxycommand"))?; + let (sock, _child) = self.connect_to_host(&hostname, port, verbose)?; let raw = { #[cfg(unix)] { @@ -288,8 +287,7 @@ impl SessionInner { )))) .context("notifying user of banner")?; - let (sock, _child) = - self.connect_to_host(&hostname, port, verbose, self.config.get("proxycommand"))?; + let (sock, _child) = self.connect_to_host(&hostname, port, verbose)?; let mut sess = ssh2::Session::new()?; if verbose { @@ -331,9 +329,8 @@ impl SessionInner { hostname: &str, port: u16, verbose: bool, - proxy_command: Option<&String>, ) -> anyhow::Result<(Socket, Option)> { - match proxy_command.map(|s| s.as_str()) { + match self.config.get("proxycommand").map(|s| s.as_str()) { Some("none") | None => {} Some(proxy_command) => { let mut cmd;