mirror of
https://github.com/netbirdio/netbird.git
synced 2026-07-19 04:59:56 +00:00
Exposes SSHClient + SSHTerminalListener to the iOS app, mirroring the Android binding. Connect() auto-detects the server type via banner inspection and selects the auth path: NetBird-SSH with JWT triggers the device-code OAuth flow via the existing URLOpener; NetBird-SSH without JWT uses the NetBird private key; regular SSH falls back to the NetBird key then optional password. The client dials through the running tunnel with a plain net.Dialer and streams PTY output back to Swift via the gomobile-bound listener for rendering in the terminal view. Adds a config field and sshState() accessor to the iOS Client so the SSH client can reach the active config and engine.