ssh multiplexing

This commit is contained in:
Dongdong Zhou 2021-10-26 08:58:46 +01:00
parent 3ca0bda446
commit 9a9673d39b
1 changed files with 6 additions and 0 deletions

View File

@ -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())