feat(stockbit): print the ssh forward when the shell is remote

The login page listens on 127.0.0.1, so a browser on the Mac driving a VM
could never reach it. Over SSH, idx now picks port 7878, skips opening a
browser on the VM, and prints the exact ssh -L to run where the browser
is.
This commit is contained in:
hermes 2026-10-23 13:52:15 +00:00
commit cb532b670b
3 changed files with 54 additions and 8 deletions

View file

@ -62,6 +62,11 @@ impl LoginPage {
format!("http://127.0.0.1:{}/login/{}", self.port, self.secret)
}
/// The port the page listens on.
pub fn port(&self) -> u16 {
self.port
}
/// Serves until `verify` accepts a paste or `timeout` passes. `verify`
/// returns the error text to show on the page when the paste is refused.
///