(
server: &str,
name: &str,
tls: &TlsOptions,
replace_process: bool,
)
| 251 | } |
| 252 | |
| 253 | async fn sandbox_connect_with_mode( |
| 254 | server: &str, |
| 255 | name: &str, |
| 256 | tls: &TlsOptions, |
| 257 | replace_process: bool, |
| 258 | ) -> Result<()> { |
| 259 | let session = ssh_session_config(server, name, tls).await?; |
| 260 | |
| 261 | let mut command = ssh_base_command(&session.proxy_command); |
| 262 | command |
| 263 | .arg("-tt") |
| 264 | .arg("-o") |
| 265 | .arg("RequestTTY=force") |
| 266 | .arg("-o") |
| 267 | .arg("SetEnv=TERM=xterm-256color") |
| 268 | .arg("sandbox") |
| 269 | .stdin(Stdio::inherit()) |
| 270 | .stdout(Stdio::inherit()) |
| 271 | .stderr(Stdio::inherit()); |
| 272 | |
| 273 | tokio::task::spawn_blocking(move || exec_or_wait(command, replace_process)) |
| 274 | .await |
| 275 | .into_diagnostic()??; |
| 276 | |
| 277 | Ok(()) |
| 278 | } |
| 279 | |
| 280 | /// Connect to a sandbox via SSH. |
| 281 | pub async fn sandbox_connect(server: &str, name: &str, tls: &TlsOptions) -> Result<()> { |
no test coverage detected