AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
Distributed Go reverse proxy — one binary, three roles (Core / Admin / Agent). Autonomous Core, REST & MCP. Preview 0.x.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
GoProxify is a distributed reverse proxy compiled as a single Go binary — built to manage multiple servers from a central interface, without heavy agents or configuration scattered across every machine.
You have several VPS, Docker containers on different hosts, and you want to route traffic, manage TLS certificates and keep control of everything from one place? That's exactly what GoProxify is for.檢視完整 README ↗GoProxify is a distributed reverse proxy compiled as a single Go binary — built to manage multiple servers from a central interface, without heavy agents or configuration scattered across every machine.
You have several VPS, Docker containers on different hosts, and you want to route traffic, manage TLS certificates and keep control of everything from one place? That's exactly what GoProxify is for.
ssh to VMs and docker exec to containers, directly from your browsergoproxify.* labels on Docker/Podman containers and Kubernetes services, or tags from Consul, Nomad, etcd and Amazon ECS, and pushes routes in real time; a discovered container can be converted into a regular, editable proxy with one clickPreview (0.x). Use at your own risk. Details: DISCLAIMER.md · license Apache-2.0.
Contributing: CONTRIBUTING.md · Support: Discussions · Roadmap: suivi/roadmap-public.md.
┌──────────────────────────────────┐
│ ADMIN (Control Plane) │
│ Web UI · REST API · MCP · :9443 │
│ SQLite · ACME · Alerting │
│ Proxies: Edge YAML files │
│ rebuildable from Edges │
└──────────┬───────────────────────┘
│ persistent WS Admin→Edge
│ (push routes/certs/config)
▼
┌──────────────┐ ┌──────────────────────────────────────┐
│ INTERNET │───►│ EDGE (Data Plane · central WS hub) │
│ :80 / :443 │ │ HTTP/1·2·3 QUIC · TCP/UDP L4 │
│ HTTP/1·2·3 │ │ TLS in RAM · AES-256 local cache │
└──────────────┘ │ Zero reload · autonomous w/o Admin │
│ :80 :443 :443/UDP :8000+WS (internal)│
└────────────▲─────────────────────────┘
│ persistent WS Agent→Edge
│ (heartbeat/metrics/events)
┌────────────┴─────────────────────────┐
│ AGENT (Docker Discovery) │
│ Reads docker.sock (read-only) │
│ Detects goproxify.* labels │
│ Prometheus :9191/metrics │
│ No inbound control-plane port │
└──────────────────────────────────────┘
| Component | Role | Persistence | Exposed ports |
|---|---|---|---|
| Edge | Data Plane — routing, TLS, L4 · WS control-plane hub | RAM + encrypted local cache · YAML proxies (proxies/*.yaml) | :80, :443 (TCP+UDP), :8000 (internal + WS) |
| Admin | Control Plane — UI, API, alerting | SQLite (config, users, tokens) | :9443 |
| Agent | Docker discovery & metrics | Volatile | :9191 (Prometheus) — no inbound WS port |
Many layouts are possible; two reference examples (also shown on the landing page). Read them top to bottom: Internet → gateways (Edges) → Agents (HTTP(S) proxies via labels) or hosts (TCP/UDP proxies). The Admin is the management link to the Edges.
Home lab — 1 Admin · 1 Edge · 1 Agent
INTERNET
│ HTTPS · TCP · UDP
▼
ADMIN ◄──► GATEWAY (Edge)
│
┌────────┴─────────┐
▼ ▼
Docker host Other host (NAS, VM…)
AGENT + containers TCP/UDP direct, no Agent
(HTTP(S) via labels)
Enterprise, redundant — 1 Admin · 2 Edges · 4 hosts with Agents
INTERNET
│ HTTPS · TCP · UDP
DNS round-robin or virtual IP
┌───────────┴───────────┐
▼ ▼
GATEWAY 1 (Edge) ◄─ ADMIN ─► GATEWAY 2 (Edge)
└───────────┬───────────┘
Internal network
┌──────────┬──────┴───┬──────────┐
▼ ▼ ▼ ▼
HOST 1 HOST 2 HOST 3 HOST 4
AGENT AGENT AGENT AGENT
Step-by-step install for both: docs/deployment.md.
Preview only — read DISCLAIMER.md before any deployment.
# 1. Run the quickstart script — it generates docker-compose.yml and .env
curl -fsSL https://github.com/vincamok/goproxify/raw/main/scripts/quickstart.sh -o quickstart.sh
bash quickstart.sh
The script generates hex-32 secrets, writes .env (chmod 600), checks Docker / ports,
then starts Admin + Edge + Agent. Variants (run alone): bash quickstart.sh --print-secrets
· bash quickstart.sh --env-only.
Images are published on GHCR (ghcr.io/vincamok/goproxify). Default quickstart:
floating tag preview. To pin a SemVer: GOPROXIFY_ADMIN_TAG,
GOPROXIFY_EDGE_TAG, GOPROXIFY_AGENT_TAG (see versions.json / .env.example).
The admin interface is available at http://localhost:9443.
The Edge and Agent pair automatically with the Admin via GPX_PAIRING_SECRET — no manual token copy needed.
bash scripts/quickstart.sh --env-only locally and copy the generated docker-compose.yml)GPX_JWT_SECRET, GPX_PAIRING_SECRET, GPX_FIRST_ADMIN_EMAIL, GPX_FIRST_ADMIN_PASSWORD (generate secrets with openssl rand -hex 32)# Build
git clone https://github.com/vincamok/goproxify && cd goproxify
go build -o goproxify ./cmd/goproxify
# Start Admin
GPX_SECURITY_JWT_SECRET=<secret> ./goproxify admin
# Start an Edge (token generated from Admin UI)
GPX_CONTROL_PLANE_ADMIN_ENDPOINT=http://localhost:9443 \
GPX_EDGE_TOKEN=gpx_... \
./goproxify edge
# Start Agent (optional)
GPX_CONTROL_PLANE_EDGE_ENDPOINT=http://localhost:8000 \
./goproxify agent
Two methods to connect an Edge to an Admin:
| Method | Use case | Variable |
|---|---|---|
| Shared secret | All-in-one stack (same machine / same compose) | GPX_PAIRING_SECRET |
| Explicit token | Remote Edge, multi-site | GPX_EDGE_TOKEN |
The shared secret is the recommended method for standard deployments. The explicit token is generated from Admin UI → Settings → Tokens.
The Agent↔Edge control plane uses a persistent WebSocket tunnel. The Agent connects to the Edge — not the other way around.
| Step | Description | Variable |
|---|---|---|
| 1. JOIN_TOKEN | First start — Agent connects and enters pending state | GPX_CONTROL_PLANE_JOIN_TOKEN |
| 2. Approval | Operator approves the Agent in Admin UI | — |
| 3. agent_hmac | Edge sends an HMAC secret via WS → Agent is approved | auto-negotiated |
| 4. Rotation | Edge regenerates agent_hmac every hour | automatic |
To generate a JOIN_TOKEN: Admin UI → Tokens → Create → role agent, TTL 24h.
goproxify <command> [options]
Service commands:
admin Start Administration (Control Plane + Web UI)
edge Start Edge (Data Plane — Reverse Proxy)
agent Start Agent (service discovery)
landing Start landing page (optional)
Operational commands (talk to Admin via HTTP):
token Edge/Agent pairing tokens
backup Backup and restore
import Import from nginx / Traefik / Caddy / HAProxy
alert Test alert channels
status Cluster status
access GoProxify Access (config, catalogue, users, templates, audit)
nodes Infrastructure nodes (list / accept / reject)
declared Architecture wizard declared nodes
bootstrap QR tickets / curl|bash host integration
update Update Docker images (via Agent)
version Binary version
help Help
Common auth for operational commands: -admin-url / -token or env vars GPX_CONTROLPLANE_ADMIN_ENDPOINT / GPX_CONTROLPLANE_AUTH_TOKEN.
Full reference → docs/cli.md
sync.Map, GetCertificate) — no private key on disktraceparent propagated caller → Edge → backend, sampling)ssh to VMs/sshd and Docker containers (docker exec via Agent); SSH login vault + secrets; 2FA; TTL sessionsgpx_pat_* self-service with scopes (proxies:read, certs:write, …) for scripts and MCP clients; a read scope never allows a write; distinct from Edge/Agent pairing tokensintegrations/terraform-provider-goproxify: proxies, bans (optionally scoped to a gateway or HA group), ban whitelist and IP profiles as code, with import and drift detection (not yet published on the Terraform Registry)curl|bash to integrate a hostdetect (explained in the ban it would have caused, counted as a shadow note) and moves to block after a log replay; a long clean history raises the ban threshold; works without the Admin — see docs/security.md/var/run/docker.sock read-onlygoproxify.* labels on containers in real timeIngress/Service annotations, and Consul, Nomad, etcd and Amazon ECS instances (polled; an unreachable directory never removes a route)goproxify.canary) and Shadow Mirror (goproxify.shadow) labels supported:9191/metrics| Port | Protocol | Component | Exposure |
|---|---|---|---|
80 | TCP | Edge | Public |
443 | TCP | Edge | Public |
443 | UDP | Edge | Public (HTTP/3 QUIC) |
8000 | TCP | Edge | Internal only |
2222 | TCP | Edge (Access) | UUID SSH portal (if Access enabled; configurable) |
8444 | TCP | Edge (Access) | Internal Access UI (if Access enabled; configurable) |
9443 | TCP | Admin | Operator |
9191 | TCP | Agent | Internal (Prometheus) |
Port
8000(Edge internal API) must not be exposed publicly.
Restrict access:ufw allow from <admin-ip> to any port 8000
GPX_* variables are read when a component first starts, to generate its admin.json / edge.json / agent.json; once the file exists, the JSON wins (only cluster.*, engine.metrics_disabled, engine.access_log_disabled and identity.node_name can still come from the environment when absent from the JSON).
See .env.example for the full list.
| Variable | Component | Description |
|---|---|---|
GPX_SECURITY_JWT_SECRET | Admin | JWT signing key (required) |
GPX_PAIRING_SECRET | Admin / Edge / Agent | Shared secret for automatic pairing (HMAC WebSocket) |
GPX_EDGE_TOKEN | Edge | Explicit token (alternative to shared secret) |
GPX_TRUSTED_PROXIES | Edge / Admin | CSV of IPs/CIDRs of trusted front proxies (e.g. Cloudflare ranges) whose X-Forwarded-For / CF-Connecting-IP / X-Real-IP are honored. Loopback and private ranges are always trusted; * trusts everything (legacy, spoofable). |
GPX_IDENTITY_EDGE_NODE_NAME | Admin | Edge hostname/IP reachable by Admin (http://<value>:8000) |
GPX_CONTROL_PLANE_EDGE_ENDPOINT | Agent | Edge URL as seen by Agent (http://<edge>:8000) |
GPX_ENGINE_LOG_LEVEL | All | Log level (debug/info/warn/error) |
GPX_VULNSCAN_ALLOW_PRIVATE | Admin | true/1/yes: allow CVE scanner on private backends (RFC1918/ULA). Default: denied (anti-SSRF). Localhost and cloud metadata remain blocked. |
GPX_BACKUP_KEY | Admin | (optional) Encryption key for Admin snapshots (AES-GCM). Takes precedence over a key set in the UI (Backups › Encryption key: generate, rotate, reveal by the superadmin). Without any key: JSON redacted of secrets, unencrypted. With a key: snapshots also embed an encrypted secrets section for a full restore (keep a copy of the key off the server). |
GPX_NODE_TOKEN_KEY | Admin | (optional) Encrypts node tokens at rest. Otherwise derived from JWT secret. |
| Domain | Choice |
|---|---|
| Language | Go 1.25 — single static binary, zero runtime dependency |
| Protocols | HTTP/1.1, HTTP/2, HTTP/3 QUIC (quic-go), TCP/UDP L4 |
| Control plane | Persistent WebSocket nhooyr.io/websocket — Admin→Edge(WS), Agent→Edge(WS) |
| TLS | SSL termination + SNI Passthrough, ACME DNS-01 wildcard (33 DNS providers), HTTP-01, TLS-ALPN-01 |
| Admin persistence | CGO-free SQLite (modernc.org/sqlite) — config, users, tokens — Raft HA option |
| Edge persistence | Proxies: YAML files (proxies/*.yaml, proxies-revisions/*.yaml) · AES-256-GCM local cache (certs) |
| Configuration | GPX_* environment variables + optional JSON |
| Discovery | Docker Engine API via Unix socket (read-only), Portainer, Kubernetes, Consul, Nomad, etcd v3, Amazon ECS |
| Plugins | WebAssembly via wazero (no CGO) |
| Metrics | Prometheus on the Edge internal API (:8000/metrics, bearer token; public /metrics only with GPX_METRICS_PUBLIC=1), OpenTelemetry (OTLP) |
| Security | OWASP CRS-4 WAF (13 rule sets, request + response inspection), behavioral Ephor, native Fail2Ban, CrowdSec, automation flows (rules, schedules, playbooks with approval), step-by-step IP / CIDR trace over long periods, rate limiting, Geo-IP, ECDSA P-256 JWT, HMAC-SHA256 WS, CVE scanner with KEV/EPSS enrichment and configurable remediation SLA |
| Deployment | Single binary · Docker Compose · systemd |
| Document | Description |
|---|---|
| CLI | Full reference for all commands and options |
| Detailed architecture | Data flows, technical decisions |
| Inter-Edge delegation | Passthrough vs Terminate modes, client IP, prerequisites |
| Features | Product capability catalogue |
| API specifications | Full REST contract |
| MCP | MCP server — tools, PAT auth, Claude/Cursor clients |
| Config schema | JSON schema for proxies |
| FAQ | First start, password reset, Docker labels, delegation |
| Changelog | Change history by version |
| Versioning | Version bump rules (SemVer) |
| Public roadmap | High-level milestones |
French version: README.fr.md
goproxify echpath-guard, rate-guard, body-redact, tcp-allow) shipped with the Admin| PR, tests, DCO |
| Code of Conduct | Contributor Covenant |
| Security | WAF, Ephor, bans, timeouts, vulnscan — full security engine reference |
| Vulnerability reporting | Responsible disclosure |
| License | Apache License 2.0 |
| NOTICE | Copyright and third-party notices |
| Disclaimer | Preview, no warranty or liability |