From 9a9673d39b66a2affe2ea2625ec2c164137db5de Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Tue, 26 Oct 2021 08:58:46 +0100 Subject: [PATCH] ssh multiplexing --- core/src/proxy.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/proxy.rs b/core/src/proxy.rs index 9400826b..d7033443 100644 --- a/core/src/proxy.rs +++ b/core/src/proxy.rs @@ -80,6 +80,12 @@ pub fn start(&self, workspace: LapceWorkspace, event_sink: ExtEventSink) { .spawn(), LapceWorkspaceType::RemoteSSH(user, host) => Command::new("ssh") .arg(format!("{}@{}", user, host)) + .arg("-o") + .arg("ControlMaster=auto") + .arg("-o") + .arg("ControlPath=~/.ssh/cm-%r@%h:%p") + .arg("-o") + .arg("ControlPersist=30m") .arg("/tmp/proxy/target/release/lapce-proxy") .stdin(Stdio::piped()) .stdout(Stdio::piped())