A self-hosted, stealthy mesh — one binary that is both the client and the coordinator — using VLESS + Reality (xtls/reality) + uTLS so all traffic is indistinguishable from ordinary TLS to a network observer (the server steals the decoy site's real handshake).
No Tailscale compatibility layer — StealthScale is not intended to be compatible with stock Tailscale clients, servers, or Headscale. WireGuard is fully replaced by VLESS+Reality; there is no compatibility mode.
StealthScale is a fork of Headscale
with a different end goal: there is no "head" server and no special client.
Every device runs the same binary, becomes a node in the network, and
coordinates with its peers. An always-on coordinate server is encouraged for
reliability, but any node can become a coordinate server by default — there
is no privileged role. The wire protocol is replaced with VLESS + Reality
(github.com/xtls/reality, MPL-2.0) + uTLS so node-to-node and
node-to-coordinator traffic is not recognisable as Tailscale/Headscale.
See docs/stealthscale/overview.md for the project goals and current status.
WireGuard handshakes and endpoints are fingerprintable, which makes a self-hosted tailnet easy to spot and block on monitored networks. StealthScale replaces the data path with a per-node VLESS endpoint behind XRay, shaped with uTLS ClientHello fingerprinting. Node traffic looks like ordinary TLS to a network observer.
┌─────────────────────────────────────────────────────────────────────────┐
│ stscale — one binary, every device is a node │
│ │
│ ┌─────────────────────────┐ VLESS + Reality + uTLS ┌────────────────┐ │
│ │ coordination (embedded)│◄────────────────────────►│ coordination │ │
│ │ API · policy · IPAM │ stealth control │ (peer, any │ │
│ └────────────┬────────────┘ │ node can be │ │
│ │ this node is also a peer │ coordinator) │ │
│ └───────────────────────────────────────┴────────────────┘ │
│ │
│ data plane: node ◄──────── VLESS stealth (noise inside) ────────► node │
│ │
│ any node may coordinate — no privileged role, always-on coordinator │
│ is recommended for reliability. │
└─────────────────────────────────────────────────────────────────────────┘
Every device runs the same binary. Each is a node. Any node may act as the coordinator (on by default); the others treat it as the source of truth but still coordinate directly with each other. There is no separate "headscale" server.
- Every registered node gets its own VLESS listener: a deterministic
port and UUID derived from its node ID (
UUIDv5("stealthscale:<id>")andsha256("stealthscale-port:<id>")mapped into the configured range). - The UUID/port never change across restarts, enabling static client config.
- The standard Tailscale noise handshake and HTTP/2 machine API run inside the authenticated VLESS stream.
See docs/stealthscale/overview.md for the full architecture.
Caution
No Tailscale compatibility — StealthScale has no compatibility layer and is not intended to be compatible with stock Tailscale clients, Tailscale control servers, or Headscale. WireGuard is fully replaced by Xray/VLESS+Reality; there is no fallback or translation mode. Do not attempt to connect stock tailscale binaries.
You need:
- Server: this repository (built as
stscale). It exposes its own management API and VLESS endpoints — not the Headscale/Tailscale API surface. - Client: the unified
stscalebinary inupmode (stscale up --node-id <id>, or--vless-uri ...) — see docs/stealthscale/clients.md. A separate patched Tailscale client is not supported.
make build # produces ./stscalecp config-example.yaml /etc/stealthscale/config.yaml
# set server_url, then enable the VLESS transport (reality_xtls is the default):
# xray:
# enabled: true
# security: reality_xtls
# listen_port: 10001
# max_listen_port: 10100stscale serve --config /etc/stealthscale/config.yaml
curl -s https://ctl.example.com/health
curl http://127.0.0.1:8080/web # embedded WebUI (also at /admin)stscale users create alice
stscale preauthkeys create --user <user-id> --reusableThere is no special client. Run the same binary on any device; it becomes a node and can act as the coordinator by default:
stscale serve --config /etc/stealthscale/config.yamlTo join an existing network, point it at a coordinator and (if needed) a pre-auth key. The endpoint is fetched from the coordinator — no URI copy/paste:
stscale up \
--coordinator https://ctl.example.com \
--authkey <pre-auth-key> \
--node-id 1Without a pre-auth key, drop --authkey: stscale up prints a registration
URL and the join completes in the same command once you approve it there.
The vless:// URI for a node can also be printed on the coordinator
(with stscale nodes vless <node-id>) and passed via --vless-uri —
see docs/stealthscale/clients.md.
Discovery vs stealth: finding a coordinator for the first time may use whatever is necessary (including non-stealth discovery). But once two peers have identified each other, all further transport is VLESS stealth — the control path runs inside the stealth stream rather than as a plaintext port. Stealth uses uTLS-shaped TLS with a decoy certificate; the client validates the server via its Reality public key (not the certificate). Full XTLS-Reality replay of a real destination's certificate is a planned enhancement.
StealthScale ships an embedded Web UI (at /web and /admin) that is the
primary management surface. It is not a read-only dashboard: every
configurable aspect of the network — nodes, users, pre-auth keys, tags, policy
(HuJSON), DERP, VLESS endpoints, and coordinator election — must be configurable
from it.
We treat headscale-ui and the Headscale Web UI reference as design guidelines and improve on them: the StealthScale UI talks to the live control plane, is embedded in the binary, and must expose full write operations. The current embedded UI is read-only (see docs/stealthscale/overview.md → Current status); closing that gap is a core goal.
Requires Go 1.26.1+. The repo ships a Nix dev shell and pre-commit hooks
via prek (see AGENTS.md).
make dev # fmt + lint + test + build
make build # build ./stscale
make test # go test ./...Server-level tests live in hscontrol/servertest/ and include an end-to-end
VLESS test (hscontrol/servertest/xray_vless_test.go) that drives the
protocol with a raw VLESS client.
The full docs live in docs/ (MkDocs):
- StealthScale overview
- Install & deploy — including Upgrading from Headscale
- Threat model — what Reality hides,
enforce_control,ShortId/ServerNames,xray.secret - XRay/VLESS reference
- Configuration reference
- Web UI usage
- Client modification guide
BSD-3-Clause for StealthScale-originated code. See LICENSE.
This project bundles third-party components under their own licences
(see LICENSE → Third-Party Licenses):
github.com/xtls/reality— MPL-2.0 (Copyright (c) 2023 RPRX) — XTLS-Reality server.github.com/XTLS/Xray-core(reality transport) — MPL-2.0 — reference for the lightweight Reality client port (hscontrol/xray/reality_client.go).github.com/refraction-networking/utls— BSD-3-Clause — uTLS fingerprinting.
StealthScale is a modified version of Headscale; it is not endorsed by the original Headscale maintainers.