mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-11-07 09:45:36 +00:00
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:
parent
00c59ad9c9
commit
cb532b670b
3 changed files with 54 additions and 8 deletions
|
|
@ -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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue