Skip to main content

Crate rash

Crate rash 

Source
Expand description

rash — Rust Auto SSH.

Starts an ssh session or tunnel, monitors it, and restarts it if it dies or stops passing traffic. A behaviour-compatible reimplementation of autossh(1) by Carson Harding.

The library exists so the pieces that are pure — argument splitting, config resolution, the exit-status policy, the backoff curve — can be tested without spawning anything.

Modules§

backoff
Restart backoff — a port of autossh’s grace_time() (autossh.c:1115-1154).
cli
Splitting argv into rash’s own options and ssh’s.
config
Resolving a complete configuration from the command line and the environment.
daemon
Detaching from the terminal, for -f.
log
Log sinks: syslog, a file, or stderr.
monitor
Testing that the tunnel still carries traffic.
pidfile
The pid file, removed when the guard is dropped.
settings
The optional TOML configuration file.
supervise
The supervision loop.

Macros§

log_debug
log_err
log_info
logmsg