mistgate

module
v0.1.90-dev.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: AGPL-3.0

README

Mistgate logo

Mistgate

A self-hosted panel for a small VPN: a few servers of your own and the people you share them with.
Hysteria2, VLESS and AmneziaWG. Two Go binaries, SQLite and systemd.

Latest release CI Go version

Docs · Install · Protocols · Is it stable? · Compare · Русский · 简体中文 · فارسی · Türkçe

Beta. Expect changes before 1.0. Status and roadmap

What it does

You put the panel on one server and add your VPN servers to it as nodes. Each person gets one subscription link, and their app picks up every server they may use. The panel keeps the nodes configured and checks them.

  • Add a node from the browser by its IP with the panel's own SSH key (added once at your hoster) or the root password. The panel pins the SSH host key, checks the server, opens the ports in an active UFW or firewalld and installs the signed agent; the node's card changes the password and manages the server's SSH keys. A one-time install command works too. Add a node
  • One link per person. Mihomo apps (kl!ck, FlClash, Clash Verge Rev) get all three protocols from it, Happ gets Hysteria2 and VLESS, and AmneziaVPN takes a key per device from the person's page. The Mihomo and sing-box apps move to a working server by themselves. Client apps
  • Every 5 minutes the panel connects to every server the way an app does. A doctor on each node runs 21 host checks and offers eight fixes that run only after you confirm. Alerts go to the admin and to Telegram. Health
  • When some networks cannot reach a server, people get to it through another of your nodes, which only forwards the encrypted traffic. The panel checks the path before switching it on and watches it afterwards; Ways in on the node page is a graph of how people reach the server, and the Nodes page maps the whole fleet. Relays
  • Optional checks of whether your servers open from inside a country, network by network: Globalping probes on home and mobile networks over IPv4 and IPv6, volunteer and SIM probes, block lists and a TSPU probe from your own node. Most sources work only in Russia. Reachability
  • No Docker, no database server. The panel idles at 16-20 MiB of memory on a 1 vCPU / 1 GB server. Benchmarks, including where Mistgate is slower.
  • Strangers who open the panel's address see a decoy site; the admin is behind a secret path or host name.
  • A built-in assistant (a cloud model you connect with your own key) answers about your nodes and people and prepares changes you apply. MCP lets an outside AI agent read the fleet, test paths between your nodes and plan changes; risky ones wait for your approval in the admin. An API token can disable or rewrite at most 10 people an hour unless you lift the limit for it. Assistant, MCP

Not there yet: an app of our own (planned), a Telegram bot beyond alerts, and the Cloudflare Workers edition is still a preview. Some defaults lean towards users in Russia; all of them are settings.

Protocols

Protocol On the node What you can set
Hysteria2 The official Hysteria2 core UDP (QUIC). Salamander obfuscation (Gecko is experimental), port hopping, a Let's Encrypt or a pinned self-signed certificate.
VLESS xray-core REALITY over XHTTP or TCP (RAW + Vision); TLS over XHTTP or WebSocket, direct or behind a CDN.
AmneziaWG amneziawg-go in userspace, or the kernel module Versions 3.1 (the default) and 2.0, a separate key per device. 1.5 and 1.0 are not offered.
MTProto Mistgate's own MTProto core Experimental. A proxy for the Telegram app only: Fake TLS with the node's own domain or another site as the name, a key per person, the decoy site for everyone else.

Hysteria2 and VLESS can share a node, TCP 443 included. Not every app format carries every profile: see what works where.

Not supported yet: VMess, Trojan, Shadowsocks, TUIC and plain WireGuard. More protocols are planned; each new one plugs into the same subscription link through the contract below.

A protocol is two halves compiled into the binaries. On the panel, one Go interface: a JSON Schema for its settings (the admin builds the form from it), validation, the spec a node runs, credential issuing, and its piece of each subscription format. On the node, an engine that runs the spec, swaps credentials without a restart and reports traffic and health. A new protocol goes only to agents that announce it, so older agents keep working. See the protocol plugin contract.

Is it stable?

It is beta, and young: v0.1.0 was tagged on 2026-10-03, and v0.1.81 is the 82nd tag. Until 1.0 the API, the stored settings and the node protocol may still change. Releases do not go through an automated upgrade test from older versions yet; that is one of the conditions for 1.0.

I run it on my own six servers for family and friends.

The tunnels do not depend on the panel: a node keeps serving its last applied configuration while the panel is down, a user change does not restart the server, and older agents work with a newer panel. In the benchmark, adding and removing users and restarting the panel dropped no connection.

Checks:

  • CI on every push and pull request (ci.yml): Go tests and vet, the race detector on the panel-agent session, govulncheck, the admin's lint and tests, the docs build, the installer on Debian and Ubuntu.
  • An end-to-end run (scripts/e2e-wsl.sh): a real panel and node with real Hysteria2, AmneziaWG, Xray, mihomo and sing-box clients, plus agent updates, rollbacks and an install over SSH. It runs by hand before every release, in WSL or a VM, not in CI.
  • GitHub Actions builds each tag as a draft. I rebuild it from the tag on a machine with the offline release key and sign only binaries that match byte for byte; nodes and the panel install only signed builds. Releases and signing

Updating (Updates):

  • Nodes never update on their own. A rollout updates one canary node first and gives it 5 minutes to pass a health gate, then goes on in batches of one or two. A node that fails gets its previous build back, and the rollout pauses.
  • The agent also rolls itself back if a new build does not connect within 5 minutes or keeps crashing. Any node can be rolled back by hand.
  • A node whose link to the panel stalls can finish the download from GitHub. The panel offers it as a second source only when the release there is signed by the panel's own key and has the same files; it is on by default, a switch in Settings turns it off, and GitHub sees the node's address.
  • The panel updates itself only when you confirm. It backs up its data first and restores the old binary and data if the new one does not stay up for 45 seconds.
  • Keep encrypted backups of /var/lib/mistgate anyway.

Mistgate is written with AI coding agents. I review what they write and decide what is merged and released; the checks above are the same for their code as for anyone's. Commits made with an agent carry a Co-Authored-By line, and the rules agents follow in this repository are in AGENTS.md.

Screenshots


The Overview. The fleet's health and throughput, open problems and recent events.
A node. Status, WARP exit, load and 24 hours of traffic.
Client-eye checks. Every protocol on every node, latency through the tunnel.
A person. Devices by device ID, the traffic that counts against the quota, and the limits.
Their link in a browser. Days left, traffic and their devices.

The screenshots use invented demo data.

Quick start

You need a fresh Linux server (amd64 or arm64) with systemd, a domain that points directly at it (here panel.example.com), TCP ports 80 and 443 free, and either openssh-client with ssh-keygen -Y verify support or OpenSSL 3.2 or newer. On the server, run:

curl -fsSL https://mistgate.app/install.sh | sudo bash -s -- --public-url https://panel.example.com

The installer verifies the signed panel manifest, starts Mistgate under systemd and prints the admin URL with a one-time setup link (valid for 30 minutes). It leaves the firewall alone. --yes skips the questions, --dry-run only verifies the release; manual installation and other options are in Install the panel.

Then:

  1. Open the setup link and create the owner: a passkey, or a password with an authenticator code.
  2. Add servers in Nodes → Add node, over SSH or with a one-time command (Add a node).
  3. Add people: First users.

An AI agent that can run ssh can do these steps with the prompt in the AI agent guide; you still create the owner account yourself.

Compared with other panels

Mistgate 3x-ui Remnawave Hiddify PasarGuard s-ui
Runs without Docker ✅ ✅ ❌ ✅ 🟡 partial ✅
Database SQLite SQLite or PostgreSQL PostgreSQL + Redis MySQL + Redis SQLite, MySQL, MariaDB or PostgreSQL SQLite
Panel RAM, idle 16-20 MiB¹ 68-74 MiB¹ 426-454 MiB¹ not measured 262-265 MiB¹ not measured
Add a node from the panel (SSH) ✅ ❌ ❌ ❌ ❌ ?
Hysteria2 ✅ ✅ 🟡 partial ✅ ✅ ✅
VLESS REALITY ✅ ✅ ✅ ✅ ✅ ?
AmneziaWG ✅ 2.0 and 3.1 ✅ 3.1 ? ? ? ?
VMess, Trojan, Shadowsocks ❌ ✅ 🟡 partial ✅ ✅ ✅
Xray JSON or sing-box subscriptions ✅ both Xray JSON ✅ both ✅ both sing-box sing-box
Health checks and alerts ✅ client-eye checks, node doctor, reachability from a country ✅ tunnel monitor (opt-in) ✅ status, Prometheus 🟡 partial 🟡 partial ?
Telegram bot 🟡 alerts only ✅ 🟡 partial ✅ ✅ ?
Built-in MCP server for AI agents ✅ ? ❌ ? ? ?

¹ Private memory of the whole panel group, idle, 0 to 200 users, no node attached, on a 1 vCPU / 1 GB test server (3x-ui includes its Xray core and fail2ban). Method, versions and limits: Benchmarks. "?" means the project's own README and docs do not say.

Others are ahead in protocol breadth, community size and full Telegram bots. The full table with sources, checked on 2026-10-09, is in Comparison with other panels.

Documentation

Everything is at mistgate.app and in docs/. Good places to start:

Contributing

Bug reports, fixes and documentation are welcome. CONTRIBUTING.md has the build, the code map, the checks CI runs and the conventions. Coding agents start with AGENTS.md; the AI agent guide has a ready prompt for contributing.

Security

Report vulnerabilities privately: see SECURITY.md. Back up the panel's data directory (/var/lib/mistgate): it holds the database, the master key and the CA your nodes trust.

Licence

Mistgate is free software under the GNU Affero General Public License v3.0 only. If you run a modified panel for others, its admin shows a "Source code" link (serve --source-url) that should point to your source.

Star History

Star History Chart

Directories

Path Synopsis
cmd
mistgate command
Command mistgate is the panel: `serve` runs it, `setup` prepares a new installation.
Command mistgate is the panel: `serve` runs it, `setup` prepares a new installation.
mistgate-edge command
Command mistgate-edge is the wasm of the single edge Worker: every role of the panel in one program.
Command mistgate-edge is the wasm of the single edge Worker: every role of the panel in one program.
mistgate-edge-admin command
Command mistgate-edge-admin is the wasm of the admin Worker of the edge edition: the admin SPA and API, sign-in and setup.
Command mistgate-edge-admin is the wasm of the admin Worker of the edge edition: the admin SPA and API, sign-in and setup.
mistgate-edge-jobs command
Command mistgate-edge-jobs is the wasm of the jobs Worker of the edge edition: the scheduled work (EdgeTick).
Command mistgate-edge-jobs is the wasm of the jobs Worker of the edge edition: the scheduled work (EdgeTick).
mistgate-edge-link command
Command mistgate-edge-link is the wasm of the link Worker of the edge edition: the Go side of the agent link (challenge, accept, step) and link-only enrolment.
Command mistgate-edge-link is the wasm of the link Worker of the edge edition: the Go side of the agent link (challenge, accept, step) and link-only enrolment.
mistgate-edge-provision command
Command mistgate-edge-provision is the wasm of the provision Worker of the edge edition: the Provisioner: SSH installs.
Command mistgate-edge-provision is the wasm of the provision Worker of the edge edition: the Provisioner: SSH installs.
mistgate-edge-public command
Command mistgate-edge-public is the wasm of the public Worker of the edge edition: subscriptions of every format, the person's page, devices, the brand logo and the decoy.
Command mistgate-edge-public is the wasm of the public Worker of the edge edition: subscriptions of every format, the person's page, devices, the brand logo and the decoy.
mistgate-node command
Command mistgate-node is the node agent: `enroll` with a panel, `install` the systemd unit, `run` the agent, `version`.
Command mistgate-node is the node agent: `enroll` with a panel, `install` the systemd unit, `run` the agent, `version`.
edge
bridge
Package bridge is the JavaScript side of the edge Workers' wasm: the init options, the promise and request/response plumbing, the after-response task runner, the adapters for the Worker's bindings (D1, node link, limiter, SSH sockets) and the mgPanel object a Worker script calls.
Package bridge is the JavaScript side of the edge Workers' wasm: the init options, the promise and request/response plumbing, the after-response task runner, the adapters for the Worker's bindings (D1, node link, limiter, SSH sockets) and the mgPanel object a Worker script calls.
d1driver
Package d1driver implements database/sql over a Cloudflare D1 binding.
Package d1driver implements database/sql over a Cloudflare D1 binding.
gen
internal
agentlink
Package agentlink contains the versioned signed-link handshake shared by the panel and node agent.
Package agentlink contains the versioned signed-link handshake shared by the panel and node agent.
asndb
Package asndb reads, writes and looks up the release-pinned autonomous-system table.
Package asndb reads, writes and looks up the release-pinned autonomous-system table.
buildinfo
Package buildinfo holds values stamped into the binaries at build time.
Package buildinfo holds values stamped into the binaries at build time.
decoy
Package decoy is the neutral static site shown to everyone who is not a Hysteria2 client (or an admin): HTTP/3 masquerade, HTTPS on TCP 443, later the panel's public listener.
Package decoy is the neutral static site shown to everyone who is not a Hysteria2 client (or an admin): HTTP/3 masquerade, HTTPS on TCP 443, later the panel's public listener.
dnsdefaults
Package dnsdefaults defines the country-specific resolvers the doctor checks and offers for the server's own resolver when the node has none configured.
Package dnsdefaults defines the country-specific resolvers the doctor checks and offers for the server's own resolver when the node has none configured.
logring
Package logring keeps the panel's last log records in memory and lets the owner change the level while it runs.
Package logring keeps the panel's last log records in memory and lets the owner change the level while it runs.
logscrub
Package logscrub cuts IP addresses out of log text that leaves a node (the node journal, agent.proto JournalEntry).
Package logscrub cuts IP addresses out of log text that leaves a node (the node journal, agent.proto JournalEntry).
mtproto
Package mtproto is the Telegram MTProto proxy protocol as a Mistgate node serves it: Fake TLS in front, obfuscated2 inside, a fresh obfuscated2 connection to a Telegram DC behind.
Package mtproto is the Telegram MTProto proxy protocol as a Mistgate node serves it: Fake TLS in front, obfuscated2 inside, a fresh obfuscated2 connection to a Telegram DC behind.
mtproto/mtprototest
Package mtprototest contains the fake Telegram DC used by proxy tests.
Package mtprototest contains the fake Telegram DC used by proxy tests.
node/agent
Package agent is the node agent core: it enrolls with the panel, keeps ONE agent session open (mTLS Connect by default, or the signed WebSocket link when the agent has a link URL and the panel advertises it; a link that fails to establish falls back to mTLS and is retried after a hold period; reconnecting with backoff), applies desired state to engines, reports traffic reliably (seq + ack), executes commands and serves its own log.
Package agent is the node agent core: it enrolls with the panel, keeps ONE agent session open (mTLS Connect by default, or the signed WebSocket link when the agent has a link URL and the panel advertises it; a link that fails to establish falls back to mTLS and is retried after a hold period; reconnecting with backoff), applies desired state to engines, reports traffic reliably (seq + ack), executes commands and serves its own log.
node/awg
Package awg is the node's AmneziaWG engine (engine.Engine).
Package awg is the node's AmneziaWG engine (engine.Engine).
node/awg/awgcfg
Package awgcfg is the pure data model of an AmneziaWG interface shared by the node engine, the wire clients (awgnl, awguapi) and the panel plugin: settings JSON, the strict validator and the peer types.
Package awgcfg is the pure data model of an AmneziaWG interface shared by the node engine, the wire clients (awgnl, awguapi) and the panel plugin: settings JSON, the strict validator and the peer types.
node/awg/awgnl
Package awgnl talks to the amneziawg kernel module over generic netlink (family "amneziawg", WG_GENL_VERSION 3, the AWG 3.0/3.1 encoding).
Package awgnl talks to the amneziawg kernel module over generic netlink (family "amneziawg", WG_GENL_VERSION 3, the AWG 3.0/3.1 encoding).
node/awg/awgtest
Package awgtest is the test harness for AmneziaWG on Linux: network namespaces with veth pairs, real amneziawg-go clients built from the pinned source (never a downloaded binary), and small probes (ping, a "who do you see me as" TCP server, iperf3).
Package awgtest is the test harness for AmneziaWG on Linux: network namespaces with veth pairs, real amneziawg-go clients built from the pinned source (never a downloaded binary), and small probes (ping, a "who do you see me as" TCP server, iperf3).
node/awg/awguapi
Package awguapi renders and parses the UAPI text protocol of amneziawg-go v3.1.x (device.IpcSet / IpcGet).
Package awguapi renders and parses the UAPI text protocol of amneziawg-go v3.1.x (device.IpcSet / IpcGet).
node/awgprep
Package awgprep puts the AmneziaWG kernel module on a node.
Package awgprep puts the AmneziaWG kernel module on a node.
node/bench
Package bench is the engine benchmark suite: Hysteria2, VLESS (REALITY over TCP and over XHTTP) and AmneziaWG, each between two network namespaces joined by a veth pair (with netem variants), measured for throughput, CPU per gigabyte, latency under load, memory and handshakes per second.
Package bench is the engine benchmark suite: Hysteria2, VLESS (REALITY over TCP and over XHTTP) and AmneziaWG, each between two network namespaces joined by a veth pair (with netem variants), measured for throughput, CPU per gigabyte, latency under load, memory and handshakes per second.
node/certs
Package certs is the node's certificate source (engine.CertSource): ACME for a domain and a persisted self-signed certificate whose SHA-256 pin the panel puts into subscription URIs.
Package certs is the node's certificate source (engine.CertSource): ACME for a domain and a persisted self-signed certificate whose SHA-256 pin the panel puts into subscription URIs.
node/doctor
Package doctor is the node's self-diagnosis: host checks that each come from a real incident, and safe fixes the panel may ask for.
Package doctor is the node's self-diagnosis: host checks that each come from a real incident, and safe fixes the panel may ask for.
node/egress
Package egress is the node's direct outbound for Hysteria2 (engine.Egress).
Package egress is the node's direct outbound for Hysteria2 (engine.Egress).
node/hostctl
Package hostctl is the agent's view of the machine it runs on: host facts for Hello, host metrics for StatsBatch, and the host state the agent owns: its nftables tables for port-hop redirects and the SSH brute-force guard, the UDP delivery counter, the fail-open torrent queue, exact UDP/TCP inbound rules in an active UFW firewall, and owner-approved tagged forwarding exceptions limited to Mistgate traffic in host FORWARD chains, the fq + bbr, conntrack and UDP socket-buffer sysctl baseline and the journald size cap.
Package hostctl is the agent's view of the machine it runs on: host facts for Hello, host metrics for StatsBatch, and the host state the agent owns: its nftables tables for port-hop redirects and the SSH brute-force guard, the UDP delivery counter, the fail-open torrent queue, exact UDP/TCP inbound rules in an active UFW firewall, and owner-approved tagged forwarding exceptions limited to Mistgate traffic in host FORWARD chains, the fq + bbr, conntrack and UDP socket-buffer sysctl baseline and the journald size cap.
node/hysteria2
Package hysteria2 is the node's Hysteria2 engine (engine.Engine) on top of the hysteria core library (github.com/apernet/hysteria/core/v2).
Package hysteria2 is the node's Hysteria2 engine (engine.Engine) on top of the hysteria core library (github.com/apernet/hysteria/core/v2).
node/mtproto
Package mtproto is the node's Telegram MTProto proxy engine: one TCP listener per inbound, Fake TLS authentication and a direct relay to a Telegram DC (the protocol is internal/mtproto).
Package mtproto is the node's Telegram MTProto proxy engine: one TCP listener per inbound, Fake TLS authentication and a direct relay to a Telegram DC (the protocol is internal/mtproto).
node/nets
Package nets maps client addresses to ASNs inside the engine and aggregates connection events without retaining addresses.
Package nets maps client addresses to ASNs inside the engine and aggregates connection events without retaining addresses.
node/netstest
Package netstest provides network-table fixtures shared by node engine tests.
Package netstest provides network-table fixtures shared by node engine tests.
node/osupdate
Package osupdate reads the package and kernel state already present on an apt host.
Package osupdate reads the package and kernel state already present on an apt host.
node/ratelimit
Package ratelimit provides the byte token buckets shared by node engines: one per credential (the device limit) and one per user on the node (the person limit, see Registry).
Package ratelimit provides the byte token buckets shared by node engines: one per credential (the device limit) and one per user on the node (the person limit, see Registry).
node/speedtest
Package speedtest measures how fast a node reaches the internet, for the panel's "network capacity" suggestion (agent.proto "BANDWIDTH TEST").
Package speedtest measures how fast a node reaches the internet, for the panel's "network capacity" suggestion (agent.proto "BANDWIDTH TEST").
node/torrentguard
Package torrentguard contains bounded, dependency-free parsers for plaintext BitTorrent protocol signatures.
Package torrentguard contains bounded, dependency-free parsers for plaintext BitTorrent protocol signatures.
node/update
Package update is the node agent's self-update: verify a release the owner signed, swap the executable, re-exec, and undo it if the new build does not come up.
Package update is the node agent's self-update: verify a release the owner signed, swap the executable, re-exec, and undo it if the new build does not come up.
node/vless
Package vless is the node's VLESS engine on top of xray-core.
Package vless is the node's VLESS engine on top of xray-core.
node/warp
Package warp is the node's WARP egress.
Package warp is the node's WARP egress.
node/warp/cfapi
Package cfapi is the Cloudflare WARP registration client and the importer for wgcf profiles.
Package cfapi is the Cloudflare WARP registration client and the importer for wgcf profiles.
panel/access
Package access is the panel's access module: profiles and their inbounds, groups, users, devices and credentials, the user status rules (disabled > expired > limited > active), the effective-access rule that turns all of it into desired state for a node, and the data of the public subscription.
Package access is the panel's access module: profiles and their inbounds, groups, users, devices and credentials, the user status rules (disabled > expired > limited > active), the effective-access rule that turns all of it into desired state for a node, and the data of the public subscription.
panel/app
Package app assembles the shared panel services and HTTP surface for each edition.
Package app assembles the shared panel services and HTTP surface for each edition.
panel/auth
Package auth signs panel admins in — with passkeys (WebAuthn) or, as the fallback chosen at setup, with password + authenticator code — and manages their sessions.
Package auth signs panel admins in — with passkeys (WebAuthn) or, as the fallback chosen at setup, with password + authenticator code — and manages their sessions.
panel/blocklist
Package blocklist is the second source of the country check ("is the node reachable from Russia"): the public lists of blocked addresses, downloaded by the panel and compared with every node's IPv4 address in memory.
Package blocklist is the second source of the country check ("is the node reachable from Russia"): the public lists of blocked addresses, downloaded by the panel and compared with every node's IPv4 address in memory.
panel/bsbord
Package bsbord adds the paid mobile-network reachability source to the country check.
Package bsbord adds the paid mobile-network reachability source to the country check.
panel/capacity
Package capacity reads a node's hours of host load (store.HostHour) as an answer to "how loaded is it, what runs out first, and how many more people can it take".
Package capacity reads a node's hours of host load (store.HostHour) as an answer to "how loaded is it, what runs out first, and how many more people can it take".
panel/cheburcheck
Package cheburcheck checks whether volunteer networks can send a SYN through the TSPU box to a node's IPv4 address.
Package cheburcheck checks whether volunteer networks can send a SYN through the TSPU box to a node's IPv4 address.
panel/clientapi
Package clientapi owns the panel setting that advertises desktop client API discovery on subscription answers.
Package clientapi owns the panel setting that advertises desktop client API discovery on subscription answers.
panel/clientdebug
Package clientdebug takes the logs a person's app sends for support (client API: POST <base>/debug, client_debug.proto of the plan "logs for support").
Package clientdebug takes the logs a person's app sends for support (client API: POST <base>/debug, client_debug.proto of the plan "logs for support").
panel/clientprobe
Package clientprobe is the source "kl!ck reports" of the Reachability page: the local server check of the kl!ck VPN app, which a person starts in the app and, with the "send to the panel" switch on, sends to the panel that issued the subscription (client_probe.proto).
Package clientprobe is the source "kl!ck reports" of the Reachability page: the local server check of the kl!ck VPN app, which a person starts in the app and, with the "send to the panel" switch on, sends to the panel that issued the subscription (client_probe.proto).
panel/connectiondiag
Package connectiondiag holds shared interpretation for the connection counter API and MCP tools.
Package connectiondiag holds shared interpretation for the connection counter API and MCP tools.
panel/countryprobe
Package countryprobe is the third source of the country check ("is the node reachable from Russia"): one of the owner's own nodes inside the country, the probe node, tests with TCP SYNs of a limited TTL whether the connections to the other nodes of the fleet survive the national DPI box (the TSPU).
Package countryprobe is the third source of the country check ("is the node reachable from Russia"): one of the owner's own nodes inside the country, the probe node, tests with TCP SYNs of a limited TTL whether the connections to the other nodes of the fleet survive the national DPI box (the TSPU).
panel/countryreach
Package countryreach holds the one setting that every source of the country check shares: the country to look from (Globalping, the block lists and the TSPU probe all read it, which is why it is not a setting of any of them), and the history of what the sources said, which the Reachability page draws.
Package countryreach holds the one setting that every source of the country check shares: the country to look from (Globalping, the block lists and the TSPU probe all read it, which is why it is not a setting of any of them), and the history of what the sources said, which the Reachability page draws.
panel/dns
Package dns is the panel's DNS preset module: built-in and custom presets, the DnsService admin API, and the rule that picks the preset that applies to a user (user, then group, then the instance default, then the built-in default).
Package dns is the panel's DNS preset module: built-in and custom presets, the DnsService admin API, and the rule that picks the preset that applies to a user (user, then group, then the instance default, then the built-in default).
panel/edition
Package edition names the two builds of the panel (the VPS binary and the Cloudflare edge Worker) and the features the edge does not run yet.
Package edition names the two builds of the panel (the VPS binary and the Cloudflare edge Worker) and the features the edge does not run yet.
panel/fleet
Package fleet is the panel side of the node fleet: the panel CA and the agent endpoint (mTLS), node enrollment, the agent stream (liveness, reliable stats/events ingestion), desired-state computation and push, and the admin NodeService / FleetService handlers backed by that data.
Package fleet is the panel side of the node fleet: the panel CA and the agent endpoint (mTLS), node enrollment, the agent stream (liveness, reliable stats/events ingestion), desired-state computation and push, and the admin NodeService / FleetService handlers backed by that data.
panel/globalping
Package globalping is the Globalping integration: the owner's settings (off by default, an interval, an optional write-only token; the country is the shared one of countryreach), a client of the Globalping API and the health.CountrySource that the country check measures through.
Package globalping is the Globalping integration: the owner's settings (off by default, an interval, an optional write-only token; the country is the shared one of countryreach), a client of the Globalping API and the health.CountrySource that the country check measures through.
panel/health
Package health is the panel's health module: the synthetic checker (the panel dials every inbound as a client and probes through the tunnel), the alerts derived from node state, doctor reports and check results with their lifecycle, the storage and relay of the node doctor, and the retention jobs of all of it.
Package health is the panel's health module: the synthetic checker (the panel dials every inbound as a client and probes through the tunnel), the alerts derived from node state, doctor reports and check results with their lifecycle, the storage and relay of the node doctor, and the retention jobs of all of it.
panel/health/vlesshelper
Package vlesshelper contains the Xray client used by the panel's short-lived VLESS health helper.
Package vlesshelper contains the Xray client used by the panel's short-lived VLESS health helper.
panel/health/vlesswire
Package vlesswire holds the messages between the panel and its VLESS health helper process.
Package vlesswire holds the messages between the panel and its VLESS health helper process.
panel/httpheaders
Package httpheaders contains headers shared by the panel's outbound clients.
Package httpheaders contains headers shared by the panel's outbound clients.
panel/httpserver
Package httpserver wires the panel's HTTP surface: the public listener (decoy site, the admin UI/API when it is reached by secret host or secret path prefix, the secret public mounts such as subscriptions, and the agent endpoint selected by a secret TLS SNI name) and an optional separate admin listener.
Package httpserver wires the panel's HTTP surface: the public listener (decoy site, the admin UI/API when it is reached by secret host or secret path prefix, the secret public mounts such as subscriptions, and the agent endpoint selected by a secret TLS SNI name) and an optional separate admin listener.
panel/httpserver/ratelimit
Package ratelimit holds the in-memory, bounded-memory state behind the public surface's abuse protection: a keyed map that evicts its least recently used entry when full, and a token bucket limiter built on it.
Package ratelimit holds the in-memory, bounded-memory state behind the public surface's abuse protection: a keyed map that evicts its least recently used entry when full, and a token bucket limiter built on it.
panel/instance
Package instance holds the settings of this panel installation that are visible to its users: the brand (a two-part wordmark and an optional logo), the accent colour and the default language.
Package instance holds the settings of this panel installation that are visible to its users: the brand (a two-part wordmark and an optional logo), the accent colour and the default language.
panel/mcp
Package mcp is the panel's MCP server for agents: the tools of the token profiles over Streamable HTTP, and the stdio proxy that `mistgate mcp` runs.
Package mcp is the panel's MCP server for agents: the tools of the token profiles over Streamable HTTP, and the stdio proxy that `mistgate mcp` runs.
panel/ops
Package ops is the panel's own diagnostics and data lifecycle for the owner: the log ring and its level, retention of the tables the sweep prunes, a scrubbed export, and the /metrics endpoint; and two reads for every admin, the panel's own resources and the fleet's load (internal/panel/capacity).
Package ops is the panel's own diagnostics and data lifecycle for the owner: the log ring and its level, retention of the tables the sweep prunes, a scrubbed export, and the /metrics endpoint; and two reads for every admin, the panel's own resources and the fleet's load (internal/panel/capacity).
panel/pagepass
Package pagepass is the password of a user's page and the cookie that remembers it.
Package pagepass is the password of a user's page and the cookie that remembers it.
panel/protocols/awg
Package awg is the panel half of the AmneziaWG protocol plugin: the settings schema, a validator stricter than both implementations, the obfuscation generator with its mimicry presets, the translation of a profile into a node-side inbound, the per-device X25519 credentials and the three client formats (.conf, vpn://, Mihomo proxy).
Package awg is the panel half of the AmneziaWG protocol plugin: the settings schema, a validator stricter than both implementations, the obfuscation generator with its mimicry presets, the translation of a profile into a node-side inbound, the per-device X25519 credentials and the three client formats (.conf, vpn://, Mihomo proxy).
panel/protocols/awg/mimicry
Package mimicry builds and checks the I1..I5 "custom protocol signature" packets of AmneziaWG 2.0/3.x.
Package mimicry builds and checks the I1..I5 "custom protocol signature" packets of AmneziaWG 2.0/3.x.
panel/protocols/awg/vpnkey
Package vpnkey encodes and decodes the vpn:// connection key of AmneziaVPN.
Package vpnkey encodes and decodes the vpn:// connection key of AmneziaVPN.
panel/protocols/builtin
Package builtin builds the registry of the protocol plugins shipped with the panel.
Package builtin builds the registry of the protocol plugins shipped with the panel.
panel/protocols/hysteria2
Package hysteria2 is the panel half of the Hysteria2 protocol plugin: the settings schema, validation, translation of a profile into a node-side inbound spec, credential issuing and the hysteria2:// URI.
Package hysteria2 is the panel half of the Hysteria2 protocol plugin: the settings schema, validation, translation of a profile into a node-side inbound spec, credential issuing and the hysteria2:// URI.
panel/protocols/jsoncheck
Package jsoncheck lets the tests ask the real cores whether a client config they render is valid: Xray in process (xray-core's own config builder) and sing-box through its binary.
Package jsoncheck lets the tests ask the real cores whether a client config they render is valid: Xray in process (xray-core's own config builder) and sing-box through its binary.
panel/protocols/mtproto
Package mtproto is the panel half of the Telegram MTProto proxy plugin: the profile schema, validation, node-side inbound construction, credential issuing and the tg://proxy link.
Package mtproto is the panel half of the Telegram MTProto proxy plugin: the profile schema, validation, node-side inbound construction, credential issuing and the tg://proxy link.
panel/protocols/vless
Package vless is the panel half of the VLESS protocol plugin.
Package vless is the panel half of the VLESS protocol plugin.
panel/provision
Package provision contains the panel's SSH provisioning primitives.
Package provision contains the panel's SSH provisioning primitives.
panel/retention
Package retention holds the owner's retention settings: how long each table the sweep prunes keeps its rows.
Package retention holds the owner's retention settings: how long each table the sweep prunes keeps its rows.
panel/rpcstat
Package rpcstat counts the admin API's calls over the last few minutes: how many, how many failed, and how long the unary ones took.
Package rpcstat counts the admin API's calls over the last few minutes: how many, how many failed, and how long the unary ones took.
panel/securitylimit
Package securitylimit provides the shared backend for security-sensitive limits.
Package securitylimit provides the shared backend for security-sensitive limits.
panel/store
Package store owns the panel's database, embedded migrations, and the plain-SQL queries the other modules use.
Package store owns the panel's database, embedded migrations, and the plain-SQL queries the other modules use.
panel/store/storetest
Package storetest gives tests a migrated panel database quickly.
Package storetest gives tests a migrated panel database quickly.
panel/subs
Package subs serves the public subscription endpoint: GET <prefix>/<token> returns base64 of the user's client lines (hysteria2:// and vless:// URIs) with the headers Happ and other Xray/sing-box apps read, or, for a client the settings send to the Mihomo format, a Mihomo YAML profile (mihomo.go), to the Xray JSON format an array of Xray configs (xrayjson.go), to the sing-box format a sing-box profile (singbox.go; a hidden ?format=xray-json|sing-box on the link picks one of the two for a request); a browser gets the user page.
Package subs serves the public subscription endpoint: GET <prefix>/<token> returns base64 of the user's client lines (hysteria2:// and vless:// URIs) with the headers Happ and other Xray/sing-box apps read, or, for a client the settings send to the Mihomo format, a Mihomo YAML profile (mihomo.go), to the Xray JSON format an array of Xray configs (xrayjson.go), to the sing-box format a sing-box profile (singbox.go; a hidden ?format=xray-json|sing-box on the link picks one of the two for a request); a browser gets the user page.
panel/subsettings
Package subsettings holds the subscription settings of the installation (SubscriptionService): names and texts, the apps the public user page recommends, the server-name template and the format rules.
Package subsettings holds the subscription settings of the installation (SubscriptionService): names and texts, the apps the public user page recommends, the server-name template and the format rules.
panel/tasks
Package tasks is the owner's scheduled tasks (mistgate.tasks.v1, design/adr/0017-agent-operable-fleet.md section 5): the TasksService, the scheduler that runs the tasks, and the two runners.
Package tasks is the owner's scheduled tasks (mistgate.tasks.v1, design/adr/0017-agent-operable-fleet.md section 5): the TasksService, the scheduler that runs the tasks, and the two runners.
panel/tasks/spec
Package spec is what a scheduled task is (mistgate.tasks.v1): its schedule and when it runs next, the steps of a check task and the conditions on their results, and the limits every definition is checked against.
Package spec is what a scheduled task is (mistgate.tasks.v1): its schedule and when it runs next, the steps of a check task and the conditions on their results, and the limits every definition is checked against.
panel/telegram
Package telegram sends the panel's alerts to the admins who linked a Telegram chat, and serves the admin TelegramService that sets the bot up.
Package telegram sends the panel's alerts to the admins who linked a Telegram chat, and serves the admin TelegramService that sets the bot up.
panel/update
Package update is the panel side of the node-agent updates: it reads the release bundle the owner signed and dropped into <data-dir>/dist, shows whether it is trusted, serves its files to the node agents (only through the agent mTLS endpoint, see fleet.Updates), runs owner-triggered node updates (with a health gate and automatic rollback) whose state lives in the database, and serves the admin UpdateService.
Package update is the panel side of the node-agent updates: it reads the release bundle the owner signed and dropped into <data-dir>/dist, shows whether it is trusted, serves its files to the node agents (only through the agent mTLS endpoint, see fleet.Updates), runs owner-triggered node updates (with a health gate and automatic rollback) whose state lives in the database, and serves the admin UpdateService.
panel/vault
Package vault encrypts secrets at rest (XChaCha20-Poly1305, AAD = record id) and provides a string type that never prints its value.
Package vault encrypts secrets at rest (XChaCha20-Poly1305, AAD = record id) and provides a string type that never prints its value.
panel/warp
Package warp is the panel side of the WARP egress: one Cloudflare WARP account per node, either registered by the panel at the owner's click (an anonymous device registration, the same call the 1.1.1.1 app makes, with the Cloudflare terms accepted on the owner's behalf) or imported from wgcf files, stored encrypted, turned into the node's WarpSpec, and shown (without secrets) in the admin WarpService.
Package warp is the panel side of the WARP egress: one Cloudflare WARP account per node, either registered by the panel at the owner's click (an anonymous device registration, the same call the 1.1.1.1 app makes, with the Cloudflare terms accepted on the owner's behalf) or imported from wgcf files, stored encrypted, turned into the node's WarpSpec, and shown (without secrets) in the admin WarpService.
qr
Package qr is a small QR Code encoder (ISO/IEC 18004, Model 2): byte mode, versions 1-40, error correction levels L/M/Q/H. It exists so the CLI can print a QR code to a terminal without a dependency.
Package qr is a small QR Code encoder (ISO/IEC 18004, Model 2): byte mode, versions 1-40, error correction levels L/M/Q/H. It exists so the CLI can print a QR code to a terminal without a dependency.
release
Package release is the format of a signed release bundle and the checks on it.
Package release is the format of a signed release bundle and the checks on it.
reqid
Package reqid is the short request id the admin HTTP server stamps on every request: in the context, the log records, the audit rows and, once the caller is signed in, the X-Request-Id response header.
Package reqid is the short request id the admin HTTP server stamps on every request: in the context, the log records, the audit rows and, once the caller is signed in, the X-Request-Id response header.
sysstat
Package sysstat reads what a Linux host and the current process are using: CPU (with the parts lost to softirq, steal and I/O wait), memory and swap, connection tracking, sockets, the NIC's link speed, and the process's own CPU, memory, threads and file descriptors.
Package sysstat reads what a Linux host and the current process are using: CPU (with the parts lost to softirq, steal and I/O wait), memory and swap, connection tracking, sockets, the NIC's link speed, and the process's own CPU, memory, threads and file descriptors.
tcpcheck
Package tcpcheck probes bounded TCP targets and distinguishes a Mistgate answer from another listener.
Package tcpcheck probes bounded TCP targets and distinguishes a Mistgate answer from another listener.
tspuprobe
Package tspuprobe finds out whether TCP SYNs to an address die at the national DPI box (the Russian TSPU), seen from the machine it runs on.
Package tspuprobe finds out whether TCP SYNs to an address die at the national DPI box (the Russian TSPU), seen from the machine it runs on.
udpcheck
Package udpcheck sends bounded, tagged UDP delivery probes.
Package udpcheck sends bounded, tagged UDP delivery probes.
vendorcheck
Package vendorcheck holds tests that keep the patched third-party cores honest: the vendored copies in third_party and the replace to the public Xray-core fork in go.mod.
Package vendorcheck holds tests that keep the patched third-party cores honest: the vendored copies in third_party and the replace to the public Xray-core fork in go.mod.
scripts
e2e/awgclient command
Command awgclient runs a real amneziawg-go process from an AmneziaVPN / AmneziaWG ".conf" file, for scripts/e2e-wsl.sh.
Command awgclient runs a real amneziawg-go process from an AmneziaVPN / AmneziaWG ".conf" file, for scripts/e2e-wsl.sh.
e2e/h3get command
Command h3get does one HTTP/3 GET with certificate verification off and prints the status line, the response headers (sorted) and the start of the body.
Command h3get does one HTTP/3 GET with certificate verification off and prints the status line, the response headers (sorted) and the start of the body.
e2e/mcpe2e command
Command mcpe2e drives a real panel (the `mistgate` binary, on loopback, a throwaway data dir) through the whole API-token and MCP surface: tokens of the three profiles made by an owner session with a step-up, a real go-sdk MCP client over Streamable HTTP and over the `mistgate mcp` stdio proxy, plan and apply, the owner's approval and rejection, a revoked token, the audit trail, the decoy on the public listener, and a scan of everything an agent can read for the secrets of the fixtures.
Command mcpe2e drives a real panel (the `mistgate` binary, on loopback, a throwaway data dir) through the whole API-token and MCP surface: tokens of the three profiles made by an owner session with a step-up, a real go-sdk MCP client over Streamable HTTP and over the `mistgate mcp` stdio proxy, plan and apply, the owner's approval and rejection, a revoked token, the audit trail, the decoy on the public listener, and a scan of everything an agent can read for the secrets of the fixtures.
e2e/mcptoken command
Command mcptoken mints an API token for MCP on a test panel and prints the `claude mcp add` line that connects a coding agent to it, so an agent can drive a real throwaway panel over MCP (scripts/e2e/mcp-token.sh is the wrapper; scripts/e2e-wsl.sh --hold is the panel).
Command mcptoken mints an API token for MCP on a test panel and prints the `claude mcp add` line that connects a coding agent to it, so an agent can drive a real throwaway panel over MCP (scripts/e2e/mcp-token.sh is the wrapper; scripts/e2e-wsl.sh --hold is the panel).
e2e/probeseed command
Command probeseed writes the ASN table that scripts/e2e/probe.sh gives its panel, so the panel can tell the networks of the lab's "homes" apart.
Command probeseed writes the ASN table that scripts/e2e/probe.sh gives its panel, so the panel can tell the networks of the lab's "homes" apart.
e2e/signbundle command
Command signbundle signs a node bundle for scripts/e2e-wsl.sh without the rebuild check of `mistgate release sign`: the test signs binaries it patched and manifests that misstate the build time on purpose.
Command signbundle signs a node bundle for scripts/e2e-wsl.sh without the rebuild check of `mistgate release sign`: the test signs binaries it patched and manifests that misstate the build time on purpose.
e2e/tlsdest command
Command tlsdest is the REALITY target of the VLESS end-to-end steps (scripts/e2e/m3.sh): a TLS 1.3 web server with a self-signed certificate for the given names.
Command tlsdest is the REALITY target of the VLESS end-to-end steps (scripts/e2e/m3.sh): a TLS 1.3 web server with a self-signed certificate for the given names.
e2e/tspuprobe command
tspuprobe runs the agent's TSPU probe (internal/tspuprobe) once from the command line, for scripts/e2e/tspu.sh, and prints one JSON line: the capabilities of the process, whether a raw socket can be opened, the probe's answer.
tspuprobe runs the agent's TSPU probe (internal/tspuprobe) once from the command line, for scripts/e2e/tspu.sh, and prints one JSON line: the capabilities of the process, whether a raw socket can be opened, the probe's answer.
edgeconfig command
Command edgeconfig writes the wrangler configs of the six edge scripts, rendered from release.NewEdgeConfig.
Command edgeconfig writes the wrangler configs of the six edge scripts, rendered from release.NewEdgeConfig.
Package web embeds the built admin SPA (web/dist) into the panel binary.
Package web embeds the built admin SPA (web/dist) into the panel binary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL