Enhance terminal drawer UI with text overflow handling, implement embed mode for seamless iframe integration, replace ttyd --once flag with --max-clients=1 to enable reconnection, add heartbeat mechanism for popout sessions, implement session reuse logic when opening popouts, and add postMessage communication between embedded terminal and dashboard for close/reconnect actions
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
Tests / Backend Tests (Python) (3.10) (push) Has been cancelled
Tests / Backend Tests (Python) (3.11) (push) Has been cancelled
Tests / Backend Tests (Python) (3.12) (push) Has been cancelled
Tests / Frontend Tests (JS) (push) Has been cancelled
Tests / Integration Tests (push) Has been cancelled
Tests / All Tests Passed (push) Has been cancelled
This commit is contained in:
@@ -238,7 +238,7 @@ ssh -i "{ssh_key_path}" `
|
||||
if self._pty_available:
|
||||
cmd = [
|
||||
TTYD_PATH,
|
||||
"--once",
|
||||
"--max-clients=1",
|
||||
f"--port={session.port}",
|
||||
"--writable",
|
||||
gateway_script,
|
||||
@@ -247,7 +247,7 @@ ssh -i "{ssh_key_path}" `
|
||||
# Windows: Use ttyd with direct SSH command
|
||||
cmd = [
|
||||
TTYD_PATH,
|
||||
"--once",
|
||||
"--max-clients=1",
|
||||
f"--port={session.port}",
|
||||
"--writable",
|
||||
"ssh",
|
||||
|
||||
@@ -339,7 +339,8 @@ class TerminalService:
|
||||
)
|
||||
|
||||
# Build ttyd command
|
||||
# --once: Exit after single client disconnects
|
||||
# NOTE: Do not use --once because it prevents browser reconnection.
|
||||
# Use --max-clients=1 to keep a single active client while allowing reconnect.
|
||||
# --credential: Basic auth with session token
|
||||
# --port: Listen port
|
||||
# -W: Write-only mode disabled (allow input)
|
||||
@@ -366,12 +367,18 @@ class TerminalService:
|
||||
]
|
||||
|
||||
ttyd_interface = TERMINAL_TTYD_INTERFACE
|
||||
if ttyd_interface and ttyd_interface.strip().lower() in {"127.0.0.1", "localhost", "lo"}:
|
||||
logger.warning(
|
||||
"Ignoring TERMINAL_TTYD_INTERFACE=%s because binding ttyd to loopback breaks remote access/reconnect",
|
||||
ttyd_interface,
|
||||
)
|
||||
ttyd_interface = None
|
||||
|
||||
# Note: --credential removed to avoid HTTP basic auth popup
|
||||
# Security is handled by session token validation in the connect/popout routes
|
||||
cmd = [
|
||||
TTYD_PATH,
|
||||
"--once",
|
||||
"--max-clients=1",
|
||||
f"--port={port}",
|
||||
"--writable",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user