Skip to content

DSH Remote Console 0.10.0 — Windows (experimental)

Choose a tag to compare

@cccodder cccodder released this 28 Oct 04:07
1f95f80

Windows support (experimental): the terminal and the agent tools now work on a platform whose OpenSSH has no ControlMaster, by falling back to the PTY channel.

Added

  • bin/dsh-ssh.mjs — a Node wrapper for platforms without bash. Same menu, --host, --target and --ask-target behaviour and the same rendezvous file as the bash wrapper, but it does not pass -M/-S (Windows OpenSSH has no ControlMaster) and the rendezvous carries an empty socket.
  • Windows launchers are node dsh-ssh.mjs --host|--target <spec> using the Node that ships with DSH (process.execPath), so no separate system Node is needed. wrapSpawnTerminal recognises these terminals from the script path in argv.
  • PTY fallback channel: with no socket, remote_exec, remote_upload / remote_download and remote_read_file / remote_write_file automatically use the same PTY — commands and data pass through the user's window, transfers go as base64 chunks capped at 1 MiB, and sha256 is still verified on both sides.
  • remote_forward returns FORWARD_UNAVAILABLE on this channel: there is no authenticated reusable connection to build a tunnel on.
  • remote_status and every tool output now state transport: socket|pty, so nobody has to guess which path ran.
  • Tool descriptions explain the fallback, so the agent does not misread merged output as a native pipe.

Changed

  • README (zh/en) gained a "Windows (experimental)" section; docs/compat.md moves Windows from unsupported to experimental with a per-capability breakdown; SECURITY.md updates its known limitations.

Tests

  • tests/windows.test.mjs: Node wrapper (argument parsing, menu, adding a host, rendezvous with an empty socket, no -M/-S), node launcher shape, spawnTerminal recognition, and tools really running over the PTY fallback (write/read round trip, upload/download with sha256, transport: pty in output, FORWARD_UNAVAILABLE).
  • tests/pty-transport.test.mjs: chunked base64 write (>2 KB), append, read back, truncation, sha256 and the size cap over a live shell. 123 tests total.

Note

There is no Windows machine on the build host. The wrapper, channel selection, fallback tools and chunked I/O are verified through equivalent paths on Linux; real conpty rendering and line-length behaviour still need a device check, which is why this is marked experimental.

Install / update