How rustonbsd/iroh-ssh works
iroh-ssh lets a user reach an SSH daemon by endpoint ID without exposing a port or configuring a VPN. The client workflow parses a target, starts the local OpenSSH client with an iroh-ssh ProxyCommand, and the proxy establishes an Iroh connection; on the server, the tunnel forwards streams to localhost SSH. Server, identity/info, relay configuration, and Linux/Windows service management are additional product capabilities. The graph reflects shown calls and README-documented behavior; platform service runtime details are only partially excerpted.
Main entry points: api.rs Mode orchestration · cli.rs Command arguments · mod.rs Platform dispatch · ssh.rs Tunnel proxy
Components 17
CLI entry
- Command arguments
src/cli.rs - Command dispatch
src/main.rs - Mode orchestration
src/api.rs
SSH connection
- SSH client launch
src/ssh.rs - Tunnel proxy
src/ssh.rs - Tunnel server
src/ssh.rs
Identity and info
- SSH identity keys
src/ssh.rs - Endpoint information
src/api.rs
Service management
- Service commands
src/api.rs - Platform dispatch
src/service/mod.rs - Linux service
src/service/linux.rs - Windows service
src/service/windows.rs - Firewall rules
src/service/windows/firewall.rs
Other components
- Operator
- Iroh P2P network
- OpenSSH client
- Local SSH daemon
Connections 18
- Operator → Command arguments: supplies command
README.md - Command arguments → Command dispatch: parses arguments
src/main.rs - Command dispatch → Mode orchestration: dispatches mode
src/main.rs - Mode orchestration → SSH client launch: starts SSH
src/api.rs - SSH client launch → OpenSSH client: spawns with proxy
README.md - OpenSSH client → Tunnel proxy: invokes ProxyCommand
README.md - Mode orchestration → Tunnel proxy: builds endpoint connection
src/api.rs - Tunnel proxy → Iroh P2P network: opens QUIC tunnel
README.md - Iroh P2P network → Tunnel server: delivers stream
README.md - Tunnel server → Local SSH daemon: forwards to port
src/ssh.rs - Mode orchestration → Tunnel server: starts server mode
README.md - Mode orchestration → SSH identity keys: loads identity
src/api.rs - Mode orchestration → Endpoint information: reports endpoint
README.md - Command arguments → Service commands: requests install
- Service commands → Platform dispatch: dispatches platform
src/service/mod.rs - Platform dispatch → Linux service: selects Linux
src/service/mod.rs - Platform dispatch → Windows service: selects Windows
src/service/mod.rs - Windows service → Firewall rules: manages rules
src/service/windows.rs