Repository navigation
Conversation
added 3 commits
October 21, 2026 11:10
…(Tailscale SSH)
O Tailscale SSH recusa o canal direct-streamlocal@openssh.com ('unknown
channel type'), então o túnel UDS→UDS nunca abre e a abertura falhava
com serverInstallFailed mesmo com o servidor instalado e de pé.
- cockpit-server: flag --tcp força o transporte TCP de loopback + token
(rendezvous JSON no caminho do --socket); default segue socket UNIX.
- PosixHostShell: startServer sempre passa --tcp; readEndpoint decide o
transporte num único comando (test -S → socket UNIX; senão cat do
rendezvous → TcpEndpoint com porta+token).
- SshTunnel: a ponta local segue o transporte da ponta remota — remoto
TCP vira -L 127.0.0.1:<porta>:127.0.0.1:<porta>, que qualquer servidor
OpenSSH aceita.
- RemoteHostConnector: se ninguém atender pelo anúncio lido, tenta a
outra ponta anunciada antes de falhar; falha final carrega o boot log.
- Testes do dialeto POSIX cobrem rendezvous, JSON pela metade e --tcp.
…ve host-provided deps to peerDependencies
… answers Old binaries that reject new start arguments (--tcp) can never be reached, so the post-connection freshness probe never ran and the host stayed frozen on the old install. Compute the digest at bootstrap when the marker is not set yet: one extra SSH round-trip only when a server is installed and not already known stale.
jacobaraujo7
requested changes
Oct 25, 2026
jacobaraujo7
left a comment
Owner
There was a problem hiding this comment.
Thanks for tracking this down. The diagnosis is right (Tailscale SSH has no direct-streamlocal channel) and reusing the Windows TCP + token transport is the right tool. I would like to merge it, but it needs one more pass first.
Blocking
- The PR's own new test fails:
PosixHostShell readEndpoint devolve socket UNIX quando o anúncio é um socketexpectstest -Sin the command, while the code sendsif [ -S ... ]. Please runflutter test test/data/against the final code (onmainit is green). - Scope. Commit 54ef432 touches
pi-extension/package.json(deps moved topeerDependencies: "*") and adds a 4,758-linepackage-lock.jsonto a pnpm project, and the branch also reorders the generated plugin registrants for macOS, Linux and Windows. None of that belongs here; please drop it. TheSKILL.mddescription quoting is a valid fix on its own, so send it as a separate PR. - Default transport.
startServernow passes--tcpunconditionally, so every POSIX host moves from the unix socket to loopback TCP to cover one SSH server, andreadEndpointon POSIX gains an extra SSH round trip on every open (plan 58 avoided that on purpose). I would rather keep UDS as the default and fall back to--tcponly when the unix forward fails (theunknown channel typeerror is a clean signal), or at least make the TCP start opt-in per host.
Smaller
LocalEndpoint.debugForceTcpis a debug knob being used as a production switch. Give it a real name and path incockpit_protocol.
Keep the rest: --tcp being ignored by old binaries, the stale-server digest at bootstrap, and the boot-log tail on the final failure are all good.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #259.
Problem
On hosts served by Tailscale SSH, opening a remote workspace always fails with "Failed to install the server" — the server installs and boots fine, but the client's
ssh -N -L <local unix socket>:<remote unix socket>tunnel can never carry the handshake: tailscaled's SSH server does not implement thedirect-streamlocal@openssh.comchannel type (channel 1: open failed: unknown channel type), so every connect attempt gets EOF and the client silently retries until the server idles out.Regular TCP forwarding (
ssh -L 127.0.0.1:x:127.0.0.1:port) works fine through Tailscale SSH — verified.Fix
Reuses the existing Windows TCP+token transport as a fallback on POSIX:
cockpit_server.dart— new--tcpflag: bind loopback TCP + token instead of a unix socket (rendezvous JSON written at the--socketpath). Unix-socket mode stays the default; an old binary on the host simply ignores the flag.posix_host_shell.dart—startServeralways passes--tcp;readEndpointdecides the transport in one remote command (test -S→ unix endpoint, else parse the rendezvous JSON →TcpEndpoint(port, token), mirroringwindows_host_shell.dart);awaitEndpointpollsreadEndpointand tolerates a half-written file.ssh_tunnel.dart— the local forward end now matches the remote endpoint type: a TCP rendezvous forwards as127.0.0.1:<localPort>:127.0.0.1:<remotePort>on any platform, while unix remotes keep today's behavior.remote_host_connector.dart—_connectWithFallback: after a failed connect, re-read the announcement and retry once with the other transport; final failure now carries the boot-log tail instead of a detail-less throw._installAndStartServercomputes the binary digest at bootstrap when the server is installed but unreachable, so a host frozen on an old binary (too old for new start arguments) gets silently replaced instead of failing forever.Verification
dart analyzeon the touched packages: no new findings vs. baseline.cockpit_protocoltests pass (one pre-existing failure, unchanged on clean baseline); the new POSIX endpoint-parsing logic was exercised end-to-end against a real host: rendezvous → token'd handshake over a loopback TCP ssh forward →hello.ack.cockpit/test/data/host_shell_test.dartcover the rendezvous parsing, unix-socket preference, and the--tcpstart arguments.