QuantumCat connects your laptop privately to another computer. Pair it with your home server, for example, and you can log in or use a service on that server without opening a port on your router.
QuantumCat looks for a fast, direct connection between the two computers. When the network blocks a direct connection, a relay carries the encrypted traffic.
QuantumCat uses modern post-quantum cryptography to verify both devices and protect their connection. On supported Macs, the Secure Enclave lets the Mac prove its identity without exposing its private identity key, even to QuantumCat.
Warning
QuantumCat is experimental. Its connection protocol needs independent security review before use with sensitive production traffic.
Homebrew provides qcat for Apple Silicon with macOS 26+ and for x86-64 or ARM64 Linux.
brew install ekarulf/tap/qcatFreeBSD amd64 users can install a release archive. Archives are also available for macOS and Linux. Install the same version on both devices.
Install from a release archive
Download your archive and the matching SHA256SUMS from GitHub Releases.
| Platform | Archive |
|---|---|
| Apple Silicon, macOS 26+ | qcat-darwin-arm64.tar.gz |
| Linux x86-64 | qcat-linux-amd64.tar.gz |
| Linux ARM64 | qcat-linux-arm64.tar.gz |
| FreeBSD amd64 | qcat-freebsd-amd64.tar.gz |
In the download directory, use shasum to verify the macOS archive.
archive=qcat-darwin-arm64.tar.gz
awk -v file="$archive" '$2 == file' SHA256SUMS | shasum -a 256 -cOn Linux or FreeBSD, set archive to the filename for your platform and check it with sha256sum.
archive=qcat-linux-amd64.tar.gz
awk -v file="$archive" '$2 == file' SHA256SUMS | sha256sum -cAfter the check prints OK, extract the archive and install the binary. Make
sure $HOME/.local/bin is on your PATH.
tar -xzf "$archive"
cd "${archive%.tar.gz}"
mkdir -p "$HOME/.local/bin"
install -m 755 qcat "$HOME/.local/bin/qcat"On macOS, install the Secure Enclave helper from the same directory.
mkdir -p "$HOME/.local/libexec/qcat"
install -m 755 qcat-se "$HOME/.local/libexec/qcat/qcat-se"Release checksums detect corruption. The macOS binaries are ad-hoc signed and lack Developer ID signing and notarization.
macOS helper discovery and permissions
Homebrew installs qcat-se in the formula's private libexec. Restart running
qcat services after an upgrade, before brew cleanup removes the old version.
For custom installs, qcat resolves its own executable at startup. If it lives
in bin or sbin, qcat searches the same prefix for libexec/qcat/qcat-se,
then libexec/qcat-se, then sbin/qcat-se. It also checks
beside the executable. It does not search PATH for the helper. An unprivileged process can select an absolute path with
QCAT_ENCLAVE_HELPER (legacy alias QCAT_SE_HELPER). Discovery skips missing
candidates and stops on an unsafe or broken one.
The helper must be a regular executable owned by root or the current user. Only its owner may have write permission. It also checks directory and symlink ownership and permissions along the resolved path. For unprivileged installs it permits group-writable directories shared by qcat and its helper, so the installation group is trusted to replace both. These checks use POSIX mode bits. Root requires a root-owned installation and ignores helper overrides. Set-ID processes cannot launch the helper.
This example connects a laptop to a server called my-server with SSH listening
on 127.0.0.1:22. The name is a local alias. Each device keeps its own
identity.json. Exchange only the public .qpeer files over an authenticated
channel. Before importing a file, compare its full PeerID with the sender's
qcat identity show output out of band. Importing a peer on the server
authorizes it to use the services you publish.
On the laptop, create an identity and send laptop.qpeer to the server.
qcat identity init --name laptop > laptop.qpeerOn the server, create its identity, import the laptop, and publish SSH.
qcat identity init --name my-server
qcat peer add laptop laptop.qpeer
qcat serve --tcp 22=127.0.0.1:22 --export my-server.qpeerLeave qcat serve running and send my-server.qpeer back to the laptop. The
file exported by serve includes the endpoint the laptop needs to connect.
Back on the laptop, import the server and connect. Replace alice with
your SSH username on the server.
qcat peer add my-server my-server.qpeer
ssh -o 'ProxyCommand=qcat connect my-server %p' alice@my-serverSSH still checks the server's host key and authenticates your login. To use
ssh my-server and qcat mosh my-server, save the alias in ~/.ssh/config.
Host my-server
User alice
ProxyCommand qcat connect my-server %pFor each service you want, add its flags to the server's qcat serve command. Keep
--tcp 22=127.0.0.1:22 for SSH. Use --export only when writing a new
descriptor file.
| Use | Additional server flags | Laptop command |
|---|---|---|
| Mosh | --udp 60000:61000=127.0.0.1:60000 |
qcat mosh my-server |
| HTTP on server port 8080 | --allow-target 127.0.0.1:8080 |
qcat forward my-server 18080:127.0.0.1:8080 |
| DNS over UDP on server port 53 | --udp 1053=127.0.0.1:53 |
qcat forward --udp my-server 1053:1053 |
SOCKS5 for example.com:443 |
--allow-target example.com:443 |
qcat socks --listen 127.0.0.1:1080 my-server |
Mosh uses the SSH alias above to start mosh-server on the server, then runs
mosh-client on the laptop. Install Mosh on both.
The HTTP example is reachable at http://127.0.0.1:18080/ on the laptop, and
the DNS forward listens on 127.0.0.1:1053. Any local process can use a
forwarding or SOCKS5 listener while it is open. To use SOCKS5 with DNS
resolution on the server, run the following in a second terminal.
curl --socks5-hostname 127.0.0.1:1080 https://example.com/For a persistent SSH and Mosh server, adapt the service template for macOS launchd, Linux systemd --user, or FreeBSD rc.d. The forwarding process runs unprivileged.
The default configuration directory is ~/.config/qcat. On Linux and FreeBSD,
a backup of this directory includes the device's private identity key.
qcat peer list
qcat peer show laptopRun qcat peer remove laptop on the server to revoke the laptop's access and
close its tunnels. Removing my-server on the laptop stops local clients paired
with that server.
qcat status # show locally managed sessions as JSON
qcat down my-server # stop managed client sessions for my-server
qcat down serve # stop the local serverOn current main, each entry in the session's Peer map reports its send path.
Path |
Meaning |
|---|---|
direct |
The selected UDP endpoint is in CurAddr. |
derp |
The next send uses DERP. Path discovery may also try UDP. |
peer-relay |
The selected UDP relay is in PeerRelay. |
unknown |
There is too little information to identify the path yet. |
Relay names the peer's home DERP region even on a direct path. LastHandshake
records the last successful WireGuard handshake. A session with no running
backend reports null. An empty result ({}) means there are no managed sessions.
For transport logs on stderr, add --verbose before positional arguments,
for example qcat connect --verbose my-server 22. Clients need DERP to renew
even on direct paths. If renewal fails for the full one-hour lease, the server
removes the tunnel and existing application connections may need restarting.
Both ends need compatible bootstrap versions. If your identity predates
identity-file version 3, reinitialize it and re-pair the devices.
Former qcat up and serve --tun users can reuse compatible pairings with
SSH, forwarding, or SOCKS5.
- Network paths. The devices first contact each other through a DERP relay.
Tailscale's
magicsocktests UDP paths so traffic can move to a direct link. WireGuard encrypts application traffic on either path. The relay can see connection metadata but cannot read the traffic. Pairing requires no Tailscale account or coordination server. - Post-quantum cryptography. Each device signs the handshake with its ML-DSA-87 identity key. A fresh ML-KEM-1024 exchange supplies the secret used to derive a WireGuard preshared key for the session.
- Key storage. On Apple silicon Macs running macOS 26 or later, QuantumCat defaults to the Secure Enclave for identity signing and for the client's temporary ML-KEM private key. Linux and FreeBSD use software-backed keys.
See the wire protocol for the handshake and renewal sequence, the design and threat model for what a relay can observe, and the Tailcat integration notes for transport changes.
Use Go 1.27.4 or newer. On a supported Mac, also run make helper to build the
Swift helper beside bin/qcat. Run ./bin/qcat debug to check its capabilities.
make build
./bin/qcat version
make test
go vet ./...Local builds report devel and the commit. Use make build VERSION=vX.Y.Z
to stamp a release version.
- Release checklist — validation of the packaged helper on Apple Silicon.
- Apache 2.0 license.