panvex

module
v0.0.0-...-918c0af Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT

README ΒΆ


Panvex

Fleet management control plane for Telemt MTProto proxy nodes

Quick Install Β β€’Β  Features Β β€’Β  Architecture Β β€’Β  Configuration Β β€’Β  Development Β β€’Β  Docker

Go React gRPC Linux


✨ Features

Feature Description
πŸ“Š Fleet Dashboard Real-time monitoring with metrics, health indicators, and alerts
πŸ‘₯ Managed Clients Centralized client management with secret rotation and quotas
πŸ€– Agent System Lightweight per-node agents with mTLS enrollment and gRPC streaming
πŸ—„οΈ Dual Storage SQLite for dev/lightweight, PostgreSQL for production
πŸ”„ Self-Update Panel and agents update themselves from GitHub Releases
πŸ“¦ Embedded UI Single binary ships the React dashboard β€” no separate web server
πŸ” TOTP 2FA Optional two-factor authentication for operator accounts
πŸ›‘οΈ RBAC Viewer, Operator, and Admin roles with middleware enforcement

πŸš€ Quick Install

Control Plane

sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/lost-coder/panvex/main/deploy/install.sh)"

Interactive wizard: ports, storage, TLS, firewall, admin account β€” all configured step by step.

Agent

The control-plane embeds the installer and serves it at <panel>/install-agent.sh, so once you have a running panel:

sudo bash -c "$(curl -fsSL https://panel.example.com/install-agent.sh)"

For the GitHub-hosted bootstrap script (when no panel is reachable yet β€” typically the very first agent on a fresh control-plane), the upstream copy is also published:

sudo bash -c "$(curl -fsSL https://raw.githubusercontent.com/lost-coder/panvex/main/deploy/install-agent.sh)"

Requires a panel URL and enrollment token (create one in Settings β†’ Enrollment Tokens).

πŸ“‹ Non-interactive mode (CI / automation)
# Control Plane
PANVEX_ADMIN_PASS='<password>' \
PANVEX_HTTP_PORT=8080 \
PANVEX_GRPC_PORT=8443 \
  sudo -E bash install.sh

# Agent
PANVEX_PANEL_URL='https://panel.example.com' \
PANVEX_ENROLLMENT_TOKEN='<token>' \
  sudo -E bash install-agent.sh

Run bash install.sh --help for all environment variables.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    🌐 Browser                        β”‚
β”‚           React Β· TanStack Router/Query              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              πŸ“‘ Control Plane (:8080)                β”‚
β”‚        HTTP API Β· WebSocket Β· Embedded UI            β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              πŸ”’ gRPC Gateway (:8443)                 β”‚
β”‚         mTLS Β· Bidirectional Stream Β· Jobs           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              πŸ€– Agent (per Telemt node)              β”‚
β”‚       Heartbeats Β· Snapshots Β· Job Execution         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
πŸ“ Repository Layout
Directory Description
cmd/control-plane Control plane server (HTTP + gRPC + embedded UI)
cmd/agent Agent binary with bootstrap and enrollment
internal/controlplane Auth, jobs, presence, storage, server logic
internal/agent Telemt client, runtime, self-updater
internal/gatewayrpc Generated gRPC stubs (protobuf)
internal/security Enrollment, crypto, mTLS CA
web React dashboard (Vite + TailwindCSS 4 + TanStack)
db/migrations PostgreSQL and SQLite schema migrations
proto Protobuf gateway contract
deploy Install scripts, Docker Compose, nginx config
πŸ”§ Tech Stack
Layer Technology
Backend Go 1.26, chi/v5, pgx/v5, modernc.org/sqlite, gRPC
Frontend React 19, Vite 8, TailwindCSS 4, TanStack Router + Query
UI Kit Inlined under web/src/ui/ β€” Radix UI primitives + CVA
Database PostgreSQL (primary) Β· SQLite (lightweight)
Deploy Multi-stage Docker Β· systemd Β· nginx

βš™οΈ Configuration

Panvex reads its configuration from environment variables and a config.toml file at startup. Operational tunables (password policy, job worker cadences, presence thresholds, GeoIP, retention) are edited at runtime via the dashboard and stored in the database.

Quick reference

Layer Source Edited via
Bootstrap PANVEX_* env / config.toml Edit and restart panel
Operational DB Settings β†’ βš™οΈ Sections
Per-user DB (user_appearance) Settings β†’ Appearance

Essential env vars (bootstrap)

Name Required Purpose
PANVEX_STORAGE_DSN yes sqlite path or postgres URL
PANVEX_ENCRYPTION_KEY yes master at-rest encryption key
PANVEX_DB_PASSWORD postgres overrides DSN password (keeps it out of files)
PANVEX_HTTP_ADDR no HTTP bind, default :8080
PANVEX_GRPC_ADDR no gRPC bind, default :8443
PANVEX_TLS_MODE no proxy (default) or direct
PANVEX_TRUSTED_PROXY_CIDRS reverse-proxy trust X-Forwarded-* from these CIDRs
PANVEX_ENV no production tightens cookie/HSTS defaults

The full list of bootstrap variables (~26) lives in docs/settings/reference.md. A ready-to-edit example config is at docs/settings/example.config.toml.

Operational settings

Operational tunables (password lockout, session timeouts, presence thresholds, retention, GeoIP, update channel, plus 20 others) are managed through the dashboard at Settings. Changes take effect immediately; a few items (session timeouts) require a panel restart and the UI surfaces a banner when that's the case.

The same list is also visible at the /api/settings/schema endpoint and documented in docs/settings/reference.md.

Logging

Both binaries log via log/slog to stderr by default. Three controls are available on the command line; each backend also accepts an env fallback so deployments can configure without flag plumbing.

Flag Env Binary Values Default Effect
-log-level PANVEX_LOG_LEVEL both debug | info | warn | error info Minimum level emitted.
-log-format PANVEX_LOG_FORMAT both text | json text Output encoding. json is flat (no envelope) and ingests directly via Loki/Promtail/journald json parsers.
-log-file PANVEX_LOG_FILE control-plane path none When set, tees stderr to the file (append). Agent logs go to stderr only β€” daemonise via systemd / Docker.

Both formats carry the same fields. The structured attributes per layer (request_id, agent_id, attempt_id, job_id, …) follow the conventions in docs/superpowers/logging.md; new code should use the slog.*Context variants so the request-id correlation works through HTTP and gRPC.

Typical recipes:

# Dev: verbose text on stderr
panvex-control-plane -log-level=debug

# Prod: JSON to stdout for Loki, plus a local rotation file
PANVEX_LOG_FORMAT=json PANVEX_LOG_FILE=/var/log/panvex/panel.log \
  panvex-control-plane

# Agent under systemd: structured logs picked up by journald
panvex-agent -log-format=json

The control-plane also exposes a per-attempt enrollment timeline in the dashboard (Server Detail β†’ Enrollment history, plus the fleet-wide /enrollment-attempts page) and a live "Recent events" section on the Server Detail page that streams the agent's slog Info+ records in real time over the existing gRPC connection.


πŸ’» Development

Prerequisites

  • Go 1.26+ Β Β·Β  Node.js 22+ Β Β·Β  sqlc Β Β·Β  protoc + Go plugins

Backend

go build ./...                    # Build all
go test ./...                     # Run tests
go test -race ./...               # Race detector
golangci-lint run ./...           # Lint
sqlc generate                     # Regenerate DB code

Frontend

cd web
npm install                       # Install deps
npm run dev                       # Dev server (proxies API to :8080)
npm run build                     # Production build
npm run lint                      # ESLint

Glossary

Three terms appear in different layers and mean related but distinct things:

Term Where you see it Meaning
Server Dashboard UI ("Servers" page) Operator-facing label for the box being managed.
Node Specs, design docs, fleet-group detail Same thing as Server, used in lower-level technical copy.
Agent DB tables, Go types, gRPC routes (agents, /api/agents/*) The panvex-agent Go process running on the node. One agent row ⇄ one node.

When writing code, always use agent / agent_id. When writing user copy, prefer "Server".

πŸƒ Local Development Flow

The dev fleet (scripts/dev-panel.sh, scripts/dev-agents.sh, scripts/dev-stop.sh) lives one level above this repo, in the workspace. It writes its DB, logs, and PIDs to .tmp/dev/. See the workspace scripts/README.md for the full orchestration loop. The flow below is the manual equivalent.

1. Bootstrap admin:

go run ./cmd/control-plane bootstrap-admin \
  -username admin \
  -password '<strong-password>'

2. Start control plane:

PANVEX_STORAGE_DSN=data/panvex.db PANVEX_ENCRYPTION_KEY=<your-key> go run ./cmd/control-plane

3. Start frontend dev server:

cd web && npm run dev

Dashboard at http://localhost:5173, API proxied to :8080

πŸ“¦ Single binary build
cd web && npm run build:embed
cd .. && go build -tags embeddedui -o panvex-control-plane ./cmd/control-plane

🐳 Docker

Each compose file ships a bootstrap service under --profile bootstrap that creates the first admin one-shot. It refuses to plant an account on a non-empty store, so it's safe to re-run.

SQLite (lightweight)
# 1. First-run admin (run before bringing up the backend so the SQLite
#    file isn't contended).
PANVEX_BOOTSTRAP_PASSWORD='<strong-password>' \
  docker compose -f deploy/docker-compose.sqlite.yml \
    --profile bootstrap run --rm bootstrap

# 2. Start the stack.
docker compose -f deploy/docker-compose.sqlite.yml up --build -d
PostgreSQL (dev β€” default password, plaintext DB traffic)
# 1. Start Postgres + backend (creates schema on first boot).
docker compose -f deploy/docker-compose.postgres.yml up --build -d

# 2. First-run admin.
PANVEX_BOOTSTRAP_PASSWORD='<strong-password>' \
POSTGRES_PASSWORD='<db-password>' \
  docker compose -f deploy/docker-compose.postgres.yml \
    --profile bootstrap run --rm bootstrap
PostgreSQL (production β€” TLS, no default credentials)
# 1. Bring up the stack. Required env vars are enforced via ${VAR:?...}.
POSTGRES_PASSWORD='<strong-db-password>' \
PANVEX_ENCRYPTION_KEY='<strong-encryption-key>' \
  docker compose -f deploy/docker-compose.prod.yml up --build -d

# 2. First-run admin. Reuse the same PANVEX_ENCRYPTION_KEY so freshly
#    minted secrets are readable to the running backend.
POSTGRES_PASSWORD='<strong-db-password>' \
PANVEX_ENCRYPTION_KEY='<strong-encryption-key>' \
PANVEX_BOOTSTRAP_PASSWORD='<strong-admin-password>' \
  docker compose -f deploy/docker-compose.prod.yml \
    --profile bootstrap run --rm bootstrap

The prod profile refuses to start without POSTGRES_PASSWORD and PANVEX_ENCRYPTION_KEY, forces sslmode=require, sets resource limits, JSON-log rotation (15 MiB Γ— 10), PANVEX_ENV=production, and binds publishers to loopback (terminate TLS at a reverse proxy β€” see deploy/nginx/default.conf).

Override the admin username via PANVEX_BOOTSTRAP_USERNAME (default: admin).

PANVEX_GEOIP_DIR is an optional override for where auto/URL-mode GeoIP .mmdb files are written. Defaults to <dir(panvex.db)>/geoip for SQLite deployments or /var/lib/panvex/geoip otherwise. Local-mode files are read from operator-supplied absolute paths and ignore this setting.

Dashboard: http://localhost:8080 Β Β·Β  gRPC: localhost:8443


πŸ€– Agent Deployment

Panvex supports two transport modes per agent:

  • Inbound (default). The agent dials the panel. Use this when the panel is internet-reachable from the agent host.
  • Outbound (reverse). The panel dials an agent that listens on a public host:port. Use this when the panel is firewalled (private network, VPN-only, behind NAT) but the agent has a public address.

The Add Server wizard (Dashboard β†’ Servers β†’ Add) generates the install command for either mode in one click.

Config editing requires Telemt 3.4.25+ (in-process Maestro reload). On older nodes, changes needing a runtime reload are refused with an upgrade prompt; hot fields still apply.

Inbound (the agent dials the panel)

  1. Create an enrollment token: Settings β†’ Enrollment Tokens, or the wizard mints one for you.
  2. Paste the rendered command on the Telemt host:
sudo bash -c "$(curl -fsSL https://panel.example.com/install-agent.sh)"

The script is embedded into the control-plane binary and served from the panel itself β€” no external CDN required.

Outbound (the panel dials the agent)

Use POST /api/agents/provision-outbound (admin) or the wizard's "Panel connects to agent" branch. The endpoint creates the agent row, mints a 5-minute bootstrap token, and returns a pre-baked install command pre-configured with --mode=reverse, --listen-addr=:<port>, and the panel's CA pin. The agent listens; the panel's outbound supervisor dials it via mTLS.

Install-script source

Each wizard run lets the operator pick one of two install-script sources:

Source URL Integrity Default for
Panel <panel>/install-agent.sh SHA-256 self-check baked into the rendered curl command Inbound
GitHub https://raw.githubusercontent.com/lost-coder/panvex/main/deploy/install-agent.sh Pin a release tag in your deploy automation for reproducibility Outbound

Operators on a fork or behind a private mirror override the URLs via:

PANVEX_INSTALL_SCRIPT_URL=https://panel.example.com/install-agent.sh   # panel source
PANVEX_INSTALL_SCRIPT_GITHUB_URL=https://github.example.com/raw/panvex/main/deploy/install-agent.sh
Manual bootstrap (without installer)
./panvex-agent bootstrap \
  -panel-url https://panel.example.com \
  -enrollment-token '<token>' \
  -state-file /var/lib/panvex-agent/agent-state.json

πŸ‘₯ Managed Clients

Create and manage Telemt clients centrally from the dashboard:

  • πŸ”‘ Generate secrets and user_ad_tag
  • πŸ“ Set limits: connections, unique IPs, quota, expiration
  • 🌐 Assign by fleet group or individual nodes
  • πŸ”„ Rotate secrets without recreating the client
  • πŸ“ˆ Live deployment status, connection links, and usage per node

πŸ” Security

Two-Factor Authentication β€” TOTP 2FA is optional. Enable in Profile page.

Emergency TOTP reset via CLI:

./panvex-control-plane reset-user-totp \
  -storage-driver sqlite \
  -storage-dsn /var/lib/panvex/panvex.db \
  -username admin

πŸ›Ÿ Operator tooling

Subcommand Purpose
diagnose Markdown health snapshot β€” schema version, row counts, pool stats, CA expiry, encryption-key fingerprint. Paste into a support ticket.
backup SQLite-only tar.gz of a VACUUM INTO snapshot plus metadata.json. Postgres operators use pg_dump.
restore Prints the manual restore recipe (tar -xzf + migrate-schema). Auto-restore is intentionally not supported β€” overwriting a populated DB is the kind of mistake we refuse to make easy.
verify-audit-chain Walks audit_events chronologically, recomputes the SHA-256 chain (migration 0038), exits non-zero on the first tampered or missing link. Run after a suspected incident or as part of a periodic compliance check.
./panvex-control-plane diagnose \
  -storage-driver sqlite \
  -storage-dsn /var/lib/panvex/panvex.db

./panvex-control-plane backup \
  -storage-driver sqlite \
  -storage-dsn /var/lib/panvex/panvex.db \
  -out /var/backups/panvex-$(date -u +%Y%m%dT%H%M%SZ).tar.gz

The encryption-key fingerprint embedded in both diagnose output and metadata.json is a one-way SHA-256 prefix β€” operators can confirm two panels share the same PANVEX_ENCRYPTION_KEY without ever exchanging the key itself.


πŸ”„ Updates

The control plane checks GitHub Releases for new versions automatically.

Method Command
Dashboard Settings β†’ Updates β†’ Update Panel / Update Agent
CLI ./panvex-control-plane self-update
Auto-update Enable in Settings β†’ Updates (disabled by default)

Agents can be updated individually or in bulk. The panel sends an update job via gRPC β€” the agent downloads and installs the new binary automatically.

Telemt updates

Separately from the panel/agent self-update above, the panel can also update the Telemt proxy binary itself on a node (admin-only, Server Detail β†’ "Telemt update"). The panel polls the upstream telemt/telemt GitHub repo for the latest release and shows a badge when a node is behind.

  • Modes. Each node has a persisted update strategy:

    • binary β€” the agent downloads the release asset, verifies it, and swaps the local Telemt binary in place.
    • docker β€” Telemt runs in a container; the panel shows a docker compose pull && up -d hint instead of dispatching a job, and the "update available" badge clears itself automatically once the node's next telemetry snapshot reports the new version.
    • none β€” no supervisor was detected; updates are disabled for the node.

    The agent probes its own host (systemd unit, OpenRC/procd init.d script, runit service, or a running telemt container) and suggests a strategy; the operator can accept it as-is or edit it.

  • Restart command presets (binary mode only) β€” one of systemd:<unit>, procd:<service> (OpenWrt), openrc:<service>, runit:<service>, or a raw command:<argv> escape hatch for other supervisors. The configured command is what restarts Telemt after the binary swap; it does not depend on the supervisor's own restart policy.

  • Permissions. The agent process must be able to run the configured restart command itself β€” either as root, or via sudoers/polkit rules scoped to that one command. Without that, the binary swap succeeds but the restart step fails.

  • OpenWrt / musl. The agent detects musl libc (/lib/ld-musl-*) and downloads the matching *-musl release asset instead of the *-gnu one. Before downloading, it fail-closed preflight-checks that the target filesystem has at least 3Γ— the downloaded archive's size free (room for the archive, the extracted binary, and the .bak of the binary being replaced) β€” the update is refused up front rather than left half-installed on a full disk, which matters most on small OpenWrt flash/overlay partitions.

  • Safety. Downloads are HTTPS-only against an allowlisted host, verified against a .sha256 sidecar, capped at 128 MiB, and gated against downgrading below the currently-running version (overridable per-dispatch). After the swap, the agent watches the Telemt API for up to 60s to confirm the process is alive and reports the target version before declaring success; a failed health check rolls the binary back automatically.

  • Version selection. Instead of only "latest", the Server Detail update control offers a dropdown of the most recent stable Telemt releases (source: the same GitHub poll, surfaced per-node via telemetry); how many versions to list is configured in Settings β†’ Updates (telemt_versions_to_show, default 5, clamped to 1–20). Picking an older version than the one currently running shows a warning confirm dialog and dispatches the job with the downgrade override enabled; the same override is forced automatically when the node's current version can't be parsed, since the panel has no baseline to compare against.

This is independent of the Telemt 3.4.25+ requirement noted above for in-process config-reload β€” the binary-update feature itself has no minimum Telemt version.


Built with ❀️ for Telemt fleet operators

Directories ΒΆ

Path Synopsis
cmd
agent command
control-plane command
control-plane/gensettings command
settingsgen writes schema.json + reference.md + example.config.toml.
settingsgen writes schema.json + reference.md + example.config.toml.
sqlite-rebuild command
Command sqlite-rebuild prints a ready-made goose file for rebuilding an SQLite table (create/copy/drop/rename/index within crash-safe transactional bounds).
Command sqlite-rebuild prints a ready-made goose file for rebuilding an SQLite table (create/copy/drop/rename/index within crash-safe transactional bounds).
db
migrations/postgres
Package pgmigrations exposes the PostgreSQL goose migrations as an embed.FS so the storage/postgres package (and any tooling that wants to run the same migrations out-of-band) can call goose.SetBaseFS without duplicating the .sql files.
Package pgmigrations exposes the PostgreSQL goose migrations as an embed.FS so the storage/postgres package (and any tooling that wants to run the same migrations out-of-band) can call goose.SetBaseFS without duplicating the .sql files.
migrations/sqlite
Package sqlitemigrations exposes the SQLite goose migrations as an embed.FS so the storage/sqlite package (and any tooling that wants to run the same migrations out-of-band) can call goose.SetBaseFS without duplicating the .sql files.
Package sqlitemigrations exposes the SQLite goose migrations as an embed.FS so the storage/sqlite package (and any tooling that wants to run the same migrations out-of-band) can call goose.SetBaseFS without duplicating the .sql files.
internal
agent/atomicfile
Package atomicfile writes a file so a crash mid-write can never leave a truncated or half-updated file behind.
Package atomicfile writes a file so a crash mid-write can never leave a truncated or half-updated file behind.
agent/runtimeevents
Package runtimeevents holds the agent-side in-memory ring of recent slog records that are eligible for shipping to the panel via the existing Connect bidi stream.
Package runtimeevents holds the agent-side in-memory ring of recent slog records that are eligible for shipping to the panel via the existing Connect bidi stream.
agent/telemtrestart
Package telemtrestart restarts the local Telemt process for the agent.
Package telemtrestart restarts the local Telemt process for the agent.
clientjob
Package clientjob defines the JSON wire contract for client.* rollout jobs exchanged between the control-plane and the agent inside the gatewayrpc.JobCommand.payload_json field.
Package clientjob defines the JSON wire contract for client.* rollout jobs exchanged between the control-plane and the agent inside the gatewayrpc.JobCommand.payload_json field.
configcanon
Package configcanon defines the ONE canonical serialization of managed Telemt config sections shared by the agent (which hashes its observed config) and the control plane (which hashes targets and compares against observed).
Package configcanon defines the ONE canonical serialization of managed Telemt config sections shared by the agent (which hashes its observed config) and the control plane (which hashes targets and compares against observed).
controlplane/agentrevocation
Package agentrevocation owns the wire-level contract used by the control-plane to tell a deregistered agent that it should stop reconnecting.
Package agentrevocation owns the wire-level contract used by the control-plane to tell a deregistered agent that it should stop reconnecting.
controlplane/agents
Package agents holds the control-plane's agent-lifecycle domain model.
Package agents holds the control-plane's agent-lifecycle domain model.
controlplane/api
Package api holds the control-plane's presentation (view) types β€” the JSON shapes served to the HTTP/WebSocket layer and mirrored by the agents LiveStore.
Package api holds the control-plane's presentation (view) types β€” the JSON shapes served to the HTTP/WebSocket layer and mirrored by the agents LiveStore.
controlplane/archguard
Package archguard contains architecture-guard tests for the control-plane layering rules (P8.2).
Package archguard contains architecture-guard tests for the control-plane layering rules (P8.2).
controlplane/audit/hashchain
Package hashchain implements the audit_events tamper-evident chain primitives.
Package hashchain implements the audit_events tamper-evident chain primitives.
controlplane/auth
internal/controlplane/auth/repository.go
internal/controlplane/auth/repository.go
controlplane/clients
Package clients holds the control-plane's managed-client domain model.
Package clients holds the control-plane's managed-client domain model.
controlplane/clients/storagetest
internal/controlplane/clients/storagetest/repository_contract.go
internal/controlplane/clients/storagetest/repository_contract.go
controlplane/configtargets
Package configtargets owns the persistence + read semantics of per-scope agent config targets (the desired editable Telemt sections for a fleet group or a single agent).
Package configtargets owns the persistence + read semantics of per-scope agent config targets (the desired editable Telemt sections for a fleet group or a single agent).
controlplane/csrf
Package csrf owns the double-submit CSRF token primitives used by the panel HTTP layer.
Package csrf owns the double-submit CSRF token primitives used by the panel HTTP layer.
controlplane/discovered
internal/controlplane/discovered/doc.go
internal/controlplane/discovered/doc.go
controlplane/discovered/storagetest
internal/controlplane/discovered/storagetest/repository_contract.go
internal/controlplane/discovered/storagetest/repository_contract.go
controlplane/egress
Package egress owns outbound-HTTP safety for the control-plane: which destinations the panel is allowed to reach and the clients that enforce it.
Package egress owns outbound-HTTP safety for the control-plane: which destinations the panel is allowed to reach and the clients that enforce it.
controlplane/enrollment
Package enrollment records and exposes the per-attempt timeline of every agent enrollment, both inbound (agent dials panel) and outbound (panel dials agent), so operators can see why a connection succeeded or failed.
Package enrollment records and exposes the per-attempt timeline of every agent enrollment, both inbound (agent dials panel) and outbound (panel dials agent), so operators can see why a connection succeeded or failed.
controlplane/enrollment/enrollmenttest
Package enrollmenttest provides an in-memory enrollment.Store for tests in other packages (server HTTP integration, agenttransport outbound).
Package enrollmenttest provides an in-memory enrollment.Store for tests in other packages (server HTTP integration, agenttransport outbound).
controlplane/eventbus
Package eventbus provides an in-process audit/event pub/sub facade.
Package eventbus provides an in-process audit/event pub/sub facade.
controlplane/events
Package events pins the panel's event taxonomy as a compile-time contract (P3-3.3, audit #22).
Package events pins the panel's event taxonomy as a compile-time contract (P3-3.3, audit #22).
controlplane/fleet
internal/controlplane/fleet/repository.go
internal/controlplane/fleet/repository.go
controlplane/fleet/integrations
Package integrations wires fleet-group integrations (e.g.
Package integrations wires fleet-group integrations (e.g.
controlplane/gateway
Package gateway hosts the agent-facing gRPC gateway: the Connect bidi-stream (dispatch/receive/snapshot/audit/result loops), unary certificate renewal, and enrollment-step ingestion.
Package gateway hosts the agent-facing gRPC gateway: the Connect bidi-stream (dispatch/receive/snapshot/audit/result loops), unary certificate renewal, and enrollment-step ingestion.
controlplane/geoip
Package geoip owns the GeoLite2 City and ASN reader lifecycle and the three acquisition strategies (auto, url, local).
Package geoip owns the GeoLite2 City and ASN reader lifecycle and the three acquisition strategies (auto, url, local).
controlplane/history
Package history is the read-only domain service behind the panel's time-series history endpoints (server load, DC health, per-client IP history).
Package history is the read-only domain service behind the panel's time-series history endpoints (server load, DC health, per-client IP history).
controlplane/kdf
Package kdf owns the project's Argon2id parameter profiles and is the single point where argon2.IDKey is invoked in the control plane (password hashes, the CA-key blob, and the secret-vault master key).
Package kdf owns the project's Argon2id parameter profiles and is the single point where argon2.IDKey is invoked in the control plane (password hashes, the CA-key blob, and the secret-vault master key).
controlplane/metrics
Package metrics owns the Prometheus collector bundle exposed at /metrics by the control-plane.
Package metrics owns the Prometheus collector bundle exposed at /metrics by the control-plane.
controlplane/otel
Package otel sets up OpenTelemetry distributed tracing for the Panvex control-plane.
Package otel sets up OpenTelemetry distributed tracing for the Panvex control-plane.
controlplane/runtimeevents
Package runtimeevents holds the panel-side per-agent in-memory rings of runtime events shipped over the Connect bidi stream.
Package runtimeevents holds the panel-side per-agent in-memory rings of runtime events shipped over the Connect bidi stream.
controlplane/secretvault
Package secretvault provides at-rest envelope encryption for sensitive fields (client secrets, TOTP secrets, etc.).
Package secretvault provides at-rest envelope encryption for sensitive fields (client secrets, TOTP secrets, etc.).
controlplane/server
internal/controlplane/server/clients_uow_adapter.go
internal/controlplane/server/clients_uow_adapter.go
controlplane/sessions
Package sessions holds the control-plane's HTTP session/auth support primitives that are orthogonal to the core auth service (controlplane/auth).
Package sessions holds the control-plane's HTTP session/auth support primitives that are orthogonal to the core auth service (controlplane/auth).
controlplane/settings
Package settings implements the central settings registry, bootstrap loader, and operational store described in docs/superpowers/specs/2026-05-07-settings-foundation-design.md.
Package settings implements the central settings registry, bootstrap loader, and operational store described in docs/superpowers/specs/2026-05-07-settings-foundation-design.md.
controlplane/storage
Package storage exposes a request-scoped DB query counter so HTTP middleware can observe the number of database round-trips a single panel request fires.
Package storage exposes a request-scoped DB query counter so HTTP middleware can observe the number of database round-trips a single panel request fires.
controlplane/storage/migrateguard
Package migrateguard refuses to apply migrations that would silently destroy production data unless the operator has explicitly opted in.
Package migrateguard refuses to apply migrations that would silently destroy production data unless the operator has explicitly opted in.
controlplane/storage/postgres
Package postgres bulk insert helpers (P3-PERF-01a).
Package postgres bulk insert helpers (P3-PERF-01a).
controlplane/storage/sqlite
Package sqlite bulk insert helpers (P3-PERF-01a).
Package sqlite bulk insert helpers (P3-PERF-01a).
controlplane/storage/sqlshared
Package sqlshared holds the pieces of the SQLite and PostgreSQL stores that are genuinely dialect-independent.
Package sqlshared holds the pieces of the SQLite and PostgreSQL stores that are genuinely dialect-independent.
controlplane/storage/uow
internal/controlplane/storage/uow/uow.go
internal/controlplane/storage/uow/uow.go
controlplane/subscription
Package subscription holds pure, dependency-free helpers for rendering a client's public subscription page: parsing Telegram proxy links into display labels.
Package subscription holds pure, dependency-free helpers for rendering a client's public subscription page: parsing Telegram proxy links into display labels.
controlplane/updates
Package updates holds the control-plane's self-update subsystem: release discovery, artifact download, SHA-256 checksum verification, and atomic binary replacement.
Package updates holds the control-plane's self-update subsystem: release discovery, artifact download, SHA-256 checksum verification, and atomic binary replacement.
controlplane/webhooks
Package webhooks implements at-least-once outbound HTTP delivery of control-plane events (agent.unhealthy, audit.security, job.failed, …) to operator-configured receivers (Slack, PagerDuty, custom).
Package webhooks implements at-least-once outbound HTTP delivery of control-plane events (agent.unhealthy, audit.security, job.failed, …) to operator-configured receivers (Slack, PagerDuty, custom).
loadtest
Package loadtest hosts the realistic concurrency scenarios that exercise the control-plane subsystems under representative agent-fleet load.
Package loadtest hosts the realistic concurrency scenarios that exercise the control-plane subsystems under representative agent-fleet load.
logutil
Package logutil constructs the project's shared slog handler.
Package logutil constructs the project's shared slog handler.
requestid
Package requestid carries a request/correlation ID on a context.
Package requestid carries a request/correlation ID on a context.
restartspec
Package restartspec parses a Telemt restart-strategy spec string into an argv slice, without doing anything about actually running it.
Package restartspec parses a Telemt restart-strategy spec string into an argv slice, without doing anything about actually running it.
security
Package security mints and validates short-lived agent enrollment tokens.
Package security mints and validates short-lived agent enrollment tokens.
seqid
Package seqid decodes the control-plane's prefixed monotonic IDs ("client-0000042", "job-000000000042", "audit-17").
Package seqid decodes the control-plane's prefixed monotonic IDs ("client-0000042", "job-000000000042", "audit-17").
telemtjob
Package telemtjob defines the JSON wire contract for the telemt.update job exchanged between the control-plane and the agent inside the gatewayrpc.JobCommand.payload_json field.
Package telemtjob defines the JSON wire contract for the telemt.update job exchanged between the control-plane and the agent inside the gatewayrpc.JobCommand.payload_json field.
updatehosts
Package updatehosts is the single source of truth for the hosts Panvex trusts to serve release artifacts.
Package updatehosts is the single source of truth for the hosts Panvex trusts to serve release artifacts.
Package openapi provides primitives to interact with the openapi HTTP API.
Package openapi provides primitives to interact with the openapi HTTP API.
scripts
migration-test command
Command seed populates a fresh SQLite database with synthetic, production-scale data for the goose migration stress test (P2-TEST-03).
Command seed populates a fresh SQLite database with synthetic, production-scale data for the goose migration stress test (P2-TEST-03).

Jump to

Keyboard shortcuts

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