mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-10 03:56:01 -04:00
Connect() reports a password-required marker instead of a raw handshake error when a regular SSH server turns down the NetBird key, so the caller can prompt and retry as often as the user needs. NetBird servers are excluded: they authenticate with a JWT or the NetBird key, so a failure there is genuine. The marker is a string because gomobile flattens errors to their message across the binding. Errors that reach the terminal are unwrapped to their root cause, so a dial failure reads "i/o timeout" rather than repeating every layer that added context; the full chain still goes to the log. A normal shell exit no longer surfaces as "EOF". Reset() lets a closed client back a reconnect, which keeps the Java-side session and its scrollback alive across a drop, and the JWT flow now reports that it is waiting on the browser instead of blocking silently.