Expand description
§Added
-
Feature flag
native-mux, an alternative backend that communicates with the ssh multiplex server directly through control socket as opposedprocess-muximplementation that spawns a process to communicate with the ssh multiplex server.Compared to
process-mux,native-muxprovides more robust error reporting, better performance and reduced memory usage.process-muxchecks the exit status ofsshfor indication of error, then parse the output of it and the output of the ssh multiplex master to return an error.This method is obviously not so robust as
native-mux, which directly communicates with ssh multiplex master through its multiplex protocol. -
Feature flag
process-mux(enabled by default) to disable the old backend if desired. -
API
Session::connect_muxfor the newnative-muxbackend, which is used to create aSessionbacked bynative-muximplementation. -
API
SessionBuilder::connect_muxfor the newnative-muxbackend, which is used to create aSessionbacked bynative-muximplementation. -
Session::request_port_forwardfor local/remote forwarding of tcp or unix stream sockets, along withForwardTypeandSocket, which is used to setup port forwarding. -
A new module
processis added to provide interfaces more similar tostd::process. -
New variants are added to
Error.
§Changed
- A new type
Stdiois used for setting stdin/stdout/stderr. ChildStdin,ChildStdoutandChildStderrare now aliases for [tokio_pipe::PipeRead] and [tokio_pipe::PipeWrite].Command::spawnandCommand::statusnow conforms tostd::process::Commandandtokio::process::Command, in which stdin, stdout and stderr are inherit by default.Command::spawnis now anasyncmethod.RemoteChild::waitnow takesselfby value.Erroris now marked#[non_exhaustive].