feat: add headless mode support for SSH -N connections

- use s.lifecycle.GetConnection().Wait() to block until SSH connection closes
- Prevent premature session closure in headless mode

In headless mode (ssh -N), there's no channel interaction to block on,
so the session would immediately return and close. Now blocking on
conn.Wait() keeps the session alive until the client disconnects.
This commit is contained in:
2026-01-11 15:21:11 +07:00
parent 8b0e08c629
commit da29df85b7
5 changed files with 65 additions and 14 deletions
+7
View File
@@ -8,6 +8,13 @@ const (
SETUP Status = "SETUP"
)
type Mode string
const (
INTERACTIVE Mode = "INTERACTIVE"
HEADLESS Mode = "HEADLESS"
)
type TunnelType string
const (