[KongchangAI]
· 4 min read· 2,189 words

CC Desk Tunnel: Let Claude Remotely Control Your Computer

CC Desk Tunnel: Let Claude Remotely Control Your Computer

CC Desk Tunnel keeps Claude Code on a server, letting multiple computers remotely execute and relay sessions via one WSS tunnel.

CC Desk Tunnel solves fragmented context when using Claude Code across devices: Claude Code stays resident on a Linux server while projects, toolchains, and files remain local, with remote access through a single WSS encrypted tunnel. The tunnel carries both control (auth, conversation, approval) and execution (HTTP/2 CONNECT to local sshd). Sessions bind to the project's host device, multiple entry points share state, and reconnection resumes runs. Deployment needs one Linux server and three connection details. Security is clear: credential holders can run arbitrary commands as you on all online devices — not multi-tenant, not a sandbox. Best for multi-device relay.

Why Separate the Agent from the Project?

Most people install Claude Code on the same computer they use to write code, so model requests, project code, and toolchains all crowd onto a single machine. But if you have multiple computers, or need to manage a batch of internal-network devices without public IPs, installing a copy of Claude Code on each machine creates a problem: session context and memory stay on their respective machines, so switching computers means you can't pick up where you left off.

CC Desk Tunnel takes a different approach — it keeps Claude Code running persistently on a Linux server, while your multiple computers become its "hands." Projects, toolchains, and files stay where they are, and Claude connects through an encrypted tunnel to read, write, and execute. The server only handles model requests, sessions, and context; the computers handle actual execution, so the server doesn't need your toolchain installed. The Readme notes that a 2-core, 1GB entry-level machine is sufficient.

According to analysis by a Bilibili creator, this project solves the "connection" problem rather than moving projects onto the server. It's also not a VPN or remote desktop — no networking setup or public ingress required; computers actively connect outward, with no inbound ports opened. The repository is open-sourced under Apache 2.0 and is primarily AI-written and individually maintained.

What makes it most special

How Does a Single WSS Tunnel Carry Both Conversation and SSH?

What makes CC Desk Tunnel most distinctive isn't that it uses WebSocket, but that two completely different types of connections run inside the same tunnel. According to the creator's breakdown, there is only one WSS encrypted tunnel between server and computer, using the same address and port (default 8787).

Control Connection and Execution Channel

The first is the control connection, responsible for authentication, conversation, approvals, and settings. The second is the execution channel: the client opens another WSS bearer connection, over which HTTP/2 CONNECT streams run, with each stream ultimately landing on the computer's local sshd. SSH encryption and authentication aren't self-implemented — they're delegated to OpenSSH, while HTTP/2 handles stream termination, reset, and flow control.

The server only opens a random SSH port on the loopback interface, unreachable from outside. The connection process establishes trust first, then distributes secrets: the certificate is verified first — either via CA and domain, or via a pinned SHA-256 fingerprint of a self-signed certificate — and only after passing is the service credential issued. The server then distributes a channel key dedicated to this connection, randomly generated each time and invalidated when the connection ends. The client generates a temporary SSH host key and login key; the private key exists only in the temporary connection directory, never enters the session text, and is invalidated when the client exits. The self-signed certificate fingerprint must be obtained through a trusted channel — you cannot trust a fingerprint returned over the network.

Early versions used frp for reverse mapping, requiring frpc, multiple ports, and multiple processes per connection. Now it uses native HTTP/2 CONNECT, eliminating the need for a third-party tunnel program to forward traffic — it neither parses SSH nor designs its own protocol. Claude already knows SSH, so using familiar SSH is sufficient.

Nor does it design its own

HTTP/2 CONNECT is a method in the HTTP/2 protocol used to establish a bidirectional byte-stream tunnel between client and server. Unlike the normal HTTP request-response pattern, a CONNECT connection stays open after establishment, allowing both sides to continuously send arbitrary data. In CC Desk Tunnel, the client carries HTTP/2 over WSS, then initiates CONNECT streams over HTTP/2, with each stream corresponding to an independent TCP connection that is ultimately forwarded to the local sshd. HTTP/2 itself provides stream multiplexing, flow control, and reset mechanisms, so there's no need to design custom frame formats or connection management logic. The benefit of this approach is reusing a mature protocol stack, avoiding reinventing the wheel, while naturally supporting multiple concurrent SSH sessions.

Self-signed certificate fingerprint verification is a trust-establishment method that doesn't rely on a certificate authority (CA). During the TLS handshake, the client receives the certificate presented by the server, normally verified by a CA signature. But in the self-signed certificate scenario, there's no third-party CA backing, so the client needs to know the certificate's SHA-256 hash (i.e., fingerprint) in advance and compare it against the received certificate fingerprint during the handshake. If they match, the server identity is considered trusted. The advantage is simple deployment without needing a public domain or CA issuance; the disadvantage is that the fingerprint must be obtained through a trusted channel (such as the screen output printed during server installation) and cannot be obtained dynamically from a network connection, otherwise an attacker could substitute both certificate and fingerprint. CC Desk Tunnel adopts this mechanism on first connection to ensure the client connects to the correct server.

Why Can Sessions Relay Across Devices?

Once connected, session ownership becomes a key question: why can you continue working after switching computers?

According to the creator's explanation, each session executes on the computer where its project resides — the run belongs to the device hosting the session, not the device initiating the message. When you send messages, approve, or stop commands from another computer, it still goes through the execution channel of the device hosting the session. All entry points subscribe to the same event stream; each device has a fixed entry point on the server with unchanged port and SSH configuration paths, keys are rotated on each startup and reused on reconnection. Each proxy session is bound to a native session ID; the proxy's SQLite is merely a mirror of UI events. If a device goes offline beyond the grace period, the run stops.

As a result, the desktop client, browser, phone, and terminal CCDT all see the same batch of sessions. The browser is not an execution endpoint — it can operate existing sessions on online devices, create new sessions in existing projects on online devices, or create ordinary sessions that execute inside the server container. CCDT runs the original Claude Code in the terminal, sharing session context and usage statistics with the graphical client.

When a device disconnects, the CLI keeps running, new commands wait at the entry point for the device to reconnect, and the run only stops after the grace period. After the client reconnects, it catches up on the intervening content from the server's event log. File versioning also goes through the same tunnel: the main process opens another WSS carrying an SSH connection with SFTP, allowing browsing of files on the local machine, server, and other online computers, with support for preview, upload, download, and cross-device copy.

SSH interruption does not guarantee

Landlock is a lightweight access control mechanism introduced in Linux kernel 5.13 that allows a process to voluntarily restrict the filesystem paths and network ports it can access at runtime, without root privileges or global policy. Unlike traditional seccomp or SELinux, Landlock is "opt-in": after startup, a process can declare which directories it is allowed to access, and even if later escalated, it cannot break through these restrictions. In CC Desk Tunnel, the server uses Landlock to confine the Claude process and plugins within the project directory, preventing them from reading service credential files or modifying the certificate database. If the kernel version is too low to support Landlock, this isolation layer fails, exposing service credentials and the certificate store to the Claude process, increasing the risk of credential leakage.

How to Deploy and Minimal Usage?

The shortest path is one Linux server, one client, three pieces of connection information, then log in to Claude.

One-click server installation: run install.sh from the release on an Ubuntu server and press Enter through the prompts. The script checks Docker, pulls a pinned image version, and after installation prints the service address, certificate fingerprint, service credential, and the port to allow — by default only TCP 8787; it does not modify firewall, Nginx, or SSH configuration. Then install the client on your computer, fill in these three items, log in to Claude, and add the project folder. Ubuntu x86_64 is recommended for the server; ARM64 is experimental.

Minimal daily usage: the graphical client manages sessions by project; machines without a GUI run CCDT online to stay online, and run CCDT in the project directory to continue the most recent session; scripts or other agents use CCDT P to dispatch tasks, approve, and return results to the caller; editors can connect via CCDT ACP. Both clients must match the server version; the browser entry is disabled by default and can be enabled in desktop settings when needed, without adding ports.

CCDT is the command-line tool provided by CC Desk Tunnel for keeping devices online and accessing Claude Code on machines without a GUI. The CCDT online command registers the current machine as an execution endpoint to the server, maintaining the WSS tunnel connection so other entry points can initiate or continue sessions on this device. CCDT P is for scripted task dispatch: sending instructions to a specified session, waiting for approval, and returning results to the caller — suitable for automated pipelines. CCDT ACP connects editors (such as VS Code extensions) to the same session context via Agent Client Protocol, so operations within the editor share state with the graphical client. These commands share the same service credential and tunnel configuration, so session context is not lost when switching entry points.

Security Boundaries and Trade-offs

This project's capability and risk are the same thing: it lets the server execute commands on your computer.

According to the creator's analysis, anyone holding the service credential can read all sessions, drive the Claude account, and through Claude execute arbitrary commands on every online device under your user identity — not limited to the server it connects through. Compromising the server means all these computers are compromised. During a connection, the VPS holds the private key and can bypass Claude approval to SSH directly. The service credential is 32 random bytes; if leaked, it must be rotated on the server. It is not a multi-tenant system — only suitable for a single user's own trusted devices, and there is no enforced isolation between devices under the same service.

It's also not a sandbox: Claude can access everything the current user can access on the computer, not just the project directory. Approvals follow Claude Code's native mechanism — judged case by case, and misjudgment is possible. The server writes into auto-approvals which computer and directory the project is on, and modifying anything outside the project requires your explicit request. When the kernel supports Landlock, the server's Claude and plugins cannot read service credentials or modify the certificate database; without kernel support, this protection layer is absent. Catastrophic deletion triggers an extra confirmation, but it won't approve on your behalf — the official SDK's auto would reject outright, but here it follows the terminal approach of asking first, because every client can respond.

There are also two time-limited constraints: the server's location is the place of use and must be in a country or region supported by Anthropic — confirm the terms yourself; community testing shows that at the same usage, running through the Agent SDK consumes roughly twice the 5-hour quota compared to the interactive CLI, though the weekly quota is unaffected. The project has no professional security audit and does not spoof regional identity or client characteristics.

Execute arbitrary commands

Who Is It For?

If you have multiple computers or internal-network devices and want a single Claude to relay across devices, it's worth investigating. If you only have one computer and the local setup already works smoothly, using the local version is simpler and has lower latency. If you need multi-tenant isolation, you should choose a different solution.

According to the creator's summary, the criterion is straightforward: multi-device relay is its sweet spot; single-machine smoothness and multi-tenant security are beyond its boundaries.

One-line Summary

CC Desk Tunnel keeps Claude Code resident on a server, letting multiple computers remotely execute and relay sessions through a single WSS tunnel.

Paragraph Summary

CC Desk Tunnel solves the fragmented context problem when using Claude Code across multiple devices: it keeps Claude Code resident on a Linux server while projects, toolchains, and files stay on local computers, with remote read/write and execution through a single WSS encrypted tunnel. The same tunnel carries both the control connection (authentication, conversation, approval) and the execution channel (HTTP/2 CONNECT streams landing on local sshd); SSH encryption is delegated to OpenSSH, and HTTP/2 handles flow control. Sessions are bound to the device hosting the project, multiple entry points share the same batch of sessions, and disconnections can be resumed. Deployment needs only one Linux server and a client, filling in three connection details. The security boundary is clear: anyone holding the service credential can execute arbitrary commands as you on all online devices; it is neither multi-tenant nor a sandbox. Suitable for multi-device relay scenarios; not recommended for single machines or when multi-tenant isolation is required.

#CC Desk Tunnel#Claude Code#WSS tunnel#remote control#HTTP/2 CONNECT#cross-device session relay
Share:

Related articles