Commit Graph
3 Commits
Author SHA1 Message Date
Jinwoo-HandOrca 2a523e7b15 fix(ssh): enable TCP_NODELAY on ssh2 client to eliminate per-keystroke typing lag (#1660)
ssh2 leaves Nagle's algorithm on by default. For single-byte keystrokes
through a remote PTY, Nagle interacts with the kernel's delayed-ACK timer
and adds up to ~40 ms per keystroke — visible as the typing lag reported
in #1660. OpenSSH's `ssh` client sets TCP_NODELAY whenever a PTY is
allocated; this change mirrors that on the ssh2 client right after the
`ready` event in doSsh2Connect, covering both initial connect and
auto-reconnect.

Proxy-command / proxy-jump connections (where ssh2's underlying socket
is a custom Duplex over a child-process pipe) are a no-op by design,
gated by the public Client.setNoDelay()'s own type guard. A discriminating
log line records which path each connect took.

Tests cover initial connect and a full reconnect cycle to guard against
the regression class "Nagle is re-enabled because someone refactored
only the initial connect path."

Co-authored-by: Orca <help@stably.ai>
2026-05-10 21:11:47 -04:00
Jinwoo Hong 42e04268fb fix: harden SSH connection reliability and add passphrase prompt (#636) 2026-04-14 18:29:50 -07:00
Jinwoo Hong cc66e120eb feat: Add SSH remote support (beta) (#590) 2026-04-13 19:23:09 -07:00