Architecture & security
How packets move across a pen, what runs on your machine and our host, how public HTTPS works without public IPs, and the exact limits we haven't closed yet.
Packet flow & trust boundaries
Hogman separates the data plane (traffic between members and shares) from the control plane (device keys, ACL policy, and pen DNS). Only the control plane's front door and relay ports listen on the public internet.
Data plane (member browser to a share — control server sees ciphertext only) Browser │ PAC sends *.<pen>.pens.hogman.network to 127.0.0.1:<port>; │ all other traffic goes directly to the internet as usual ▼ hogman-join (unprivileged Go binary, userspace tsnet — blind TCP :443 CONNECT tunnel) │ 1. Queries pen DNS (port 53 inside mesh) -> random CGNAT 100.x / fd7a:: address │ 2. Verifies resolved IP is an enrolled peer via tsnet WhoIs (never dials LAN/127.0.0.1) │ 3. Enforces :443 only (D-11) ▼ [ WireGuard E2E encrypted tunnel + inner TLS 1.3 ] (direct UDP, or DERP relay ciphertext) ▼ hogman-join share (separate tsnet server node, local CertMagic keypair) │ Reverse-proxies localhost:<port> or serves static dir via Go os.Root (no symlink escape) ▼ Your web app or static site Control plane & certificate issuance (metadata visible; no application payloads) *.gate.hogman.network --> Shared Caddy front door (strict path allowlist + TLS wildcard) │ ▼ Per-pen container network (pen-<name>-core, 4 containers) ├── Headscale (random 100.64.0.0/10 IPs, WireGuard keys, ACL grants) ├── core-mesh (Tailscale node terminating mesh DNS & portal IP) ├── Registrar (Go ledger, pen DNS :53, Unix socket API to portal) └── Portal (home.<zone> Caddy + CertMagic local key) ns1.hogman.network --> Authoritative miekg/dns server (:53 UDP/TCP) Serves ONLY _acme-challenge.* TXT, SOA, NS, CAA (no A/AAAA under pens.)
The local proxy inside hogman-join is a blind TCP CONNECT
tunnel. It forwards encrypted TLS bytes straight between your browser and the share
without terminating, inspecting, or re-signing TLS.
Pen components & default-deny policy
Each hosted pen runs four isolated containers (~75 MB total memory) on its own Docker bridge network, with pinned versions in core/compose.yaml:
| Component | Software | Role |
|---|---|---|
| Control & relay | Headscale | Registers devices, distributes WireGuard keys, pushes ACLs and mesh DNS, and relays encrypted WireGuard ciphertext when NAT blocks direct UDP. |
| Registrar | Hogman (Go) | Ledger for members, roles, invites, devices, names, and audit logs. Rebuilds Headscale
ACLs, serves mesh DNS, manages home.<zone> certs, gates share DNS-01 TXT
writes, and serves the portal API over a Unix socket. |
| Portal | Caddy | Serves home.<pen>.pens.hogman.network inside the mesh only. |
| Mesh anchor | Tailscale client | Terminates the pen's internal DNS and portal IP inside the mesh. |
Access policy is default deny and targets explicit device IPs (not self-asserted tags), rebuilt within ~2 s on membership changes (measured: suspend 2.0 s, resume 0.8 s, kick 2.1 s):
| Device type | Accepts inbound from | Can dial outbound to |
|---|---|---|
| Personal (laptop/desktop) | Nobody | Pen DNS & portal; tag:server shares on :443 only |
Server (hogman-join share) | Active members on :443 only | Pen services; other servers on :443 |
| Unenrolled / suspended | Nobody | Nothing |
Client isolation (hogman-join)
Joining a pen runs one unprivileged static Go binary embedding Tailscale's userspace
tsnet stack:
- No kernel interface, no root daemon: creates no
TUNdevice, edits no/etc/hostsor system DNS resolvers, runs as your user, and leaves existing Tailscale installs untouched. On macOS it asks for your password once only if configuring the system automatic proxy URL (not needed with the browser extension or manual browser proxy). - Standard OS trust store (D-18): browsers validate pen certificates with your normal OS/browser roots. Nothing is injected into your root store, so no pen can ever sign for outside sites.
- PAC-scoped loopback proxy: binds to
127.0.0.1:<port>and serves a/proxy.pacmatching only joined pen zones./statusand/proxy.pacreject non-loopbackHostheaders (blocking DNS-rebinding reads). Plainhttp://pen URLs get an immediate local308redirect to HTTPS. WhoIs-pinned dialing: before dialing any resolved IP,hogman-joinverifies it falls inside100.64.0.0/10orfd7a:115c:a1e0::/48and thatlc.WhoIsconfirms an enrolled peer in that pen — preventing DNS rebinding to127.0.0.1, LAN routers, or another tailnet.- Personal devices stay unreachable: personal nodes accept zero inbound
connections. Shares run as separate
tag:servernodes using dedicatedfor=sharetokens, and static folder shares confine file access inside Go'sos.Root(refusing symlink escapes).
Encryption & split-horizon DNS-01 HTTPS
Every request to a share is encrypted twice, with keys held by the two endpoints:
- Outer WireGuard tunnel: direct peer-to-peer WireGuard encrypted end to end (or ciphertext over the pen's DERP relay when NAT blocks direct UDP).
- Inner TLS 1.3 with standard web certificates: each share generates its own local keypair via embedded CertMagic. Private TLS keys never leave the server machine.
Publicly trusted certificates on private 100.x IPs work via split-horizon
DNS-01:
- Zero public addresses:
ns1.hogman.network(authoritativemiekg/dns) serves onlySOA,NS,CAA, and 10-minute_acme-challenge.*TXTrecords (max 2 live per name). Every other query underpens.hogman.networkreturns emptyNODATA. - Ownership enforcement & caps: shares call the registrar over the mesh
(
POST /api/acme/txt). The registrar checks live mesh identity, enforcesserverMayUse(a share can only certify names pointing solely to itself), and writes challenges using the pen's scoped hashed API token (capped at 10 distinct new names/pen/week). - CAA + CA failover:
pens.hogman.networkpublishes strictdns-01CAA rules forletsencrypt.org(primary, with ARI) andpki.goog(Google Trust Services failover via single-use mesh EAB on 429/5xx, with persistent backoff up to 1 h). Hosted gates share a wildcard*.gate.hogman.networkcert so pen names stay out of gate CT entries.
Public-certificate trade-offs:
- Certificate Transparency (RFC 6962): pen and site hostnames
(e.g.
cooler-1.store-north.pens.hogman.network) appear in public CT logs when certificates are issued. Site contents and traffic never leave the mesh. - Cookie/same-site scope until PSL listing (D-19): until
pens.hogman.networkjoins the Public Suffix List, browsers treat hosted pens as sibling subdomains for cookies. Use a separate browser profile for any pen you don't fully trust.
Threat model & trust boundaries
Hogman is private, not anonymous. Here is what each party can see or do, and what stops them:
| Adversary | Can see or try | What stops them |
|---|---|---|
| Passive ISP, Wi-Fi, or internet scanner | WireGuard UDP / DERP ciphertext to relay IP, plus public CT hostnames. Cannot resolve pen
A/AAAA records or probe mesh ports. |
Zero public addresses under pens., strict front-door path allowlist,
end-to-end WireGuard + inner TLS 1.3. |
| Compromised DERP relay or front-door proxy | WireGuard public keys, packet timing/sizes, and front-door control HTTP traffic. | Relay never holds WireGuard private keys or share TLS private keys. |
| Malicious member inside your pen | Valid mesh identity and ability to resolve share names in the pen. | Headscale ACL allows :443 toward tag:server only (no SSH, no
lateral traffic, no exit nodes). serverMayUse blocks name/cert hijacking.
Keepers can suspend or kick in ~2 s; kicked site names are retired permanently. |
| Hostile pen targeting your laptop | Controls that pen's DNS replies, Headscale map, and invite payload. | Unprivileged binary (no TUN/root daemon), no OS root CA, client-side zone
validation, loopback Host checks, WhoIs dial pin, and
:443-only proxy gate. |
| Compromised keeper or hosting server (control plane) | Sees: member list, device keys/IPs, online times, mesh DNS lookups. Could try: enrolling a rogue device, rewriting ACLs, or writing a DNS-01 challenge TXT record. | Cannot passively read WireGuard payloads or share TLS private keys. Any rogue certificate minted via DNS-01 must appear in public CT logs (no silent MITM). Support cannot recover accounts (D-16). |
Host isolation & supply chain
- Hosted control plane (D-24), open source (AGPL-3.0): every pen runs in its
own isolated Docker bridge (
pen-<name>-core) with its own SQLite database, Headscale instance, keys, and UDP relay port. - Container & host hardening: pen containers and the shared Caddy front
door run non-root (
uid 65532), read-only (tmpfsfor/tmp), withcap_drop: [ALL]andno-new-privileges. The front door enforces an explicit Headscale path allowlist plus HSTS,X-Frame-Options: DENY, CSP,nosniff, andOrigin-Agent-Cluster: ?1. - Service isolation: the registrar's internal HTTP API listens only on a
kernel-enforced Unix domain socket shared with the portal, verifies
X-Forwarded-Foragainst live Headscale nodes, and enforces strict CSRF checks.challenge-dnsandgate-certrun under dedicated unprivileged systemd sandboxes (ProtectSystem=strict, syscall filters,LoadCredential). Used pen names are burned permanently (D-21). - Verifiable CI-only builds: public DNS changes go through reviewed PRs with
dnscontrol preview(D-23). Release binaries are built exclusively in GitHub Actions with SLSA build provenance — verify any download yourself:
$ gh attestation verify hogman-join --repo celtiberi/hogman
Full self-audit (OWASP ASVS, CIS Docker/Linux, SLSA): audit-2026-11.md · PKI architecture note: public-certificates.md.
Known limits & deliberate omissions
- Not independently audited yet: reviewed internally against standard checklists, not yet tested by an external security firm.
- Device keys on disk: pen credentials currently live in user-readable state files rather than hardware/TPM/Keychain binding; copying those files lets someone use that device slot until removed.
- Auto-update verification:
hogman-join updatechecks HTTPS transport and publishedSHA256SUMSrather than a key pinned inside the binary (signed updates planned). - Public Suffix List (D-19):
pens.hogman.networkis not yet on the PSL, so use separate browser profiles across mutually untrusted pens. The optional browser extension enforces allowlist-by-default per profile. - Optional browser extension (developer preview): the companion
extension in
browser-ext/(for VPN coexistence on Chrome, Brave, Edge, and Firefox) is not yet published to the Chrome Web Store or Mozilla Add-ons. Once published, store installs will trust store auto-updates and our publisher account for browser proxy rules. To minimize blast radius, it has zero third-party dependencies, requests no<all_urls>or page-reading permissions, fails closed for*.pens.hogman.network(except when another non-Hogman OS proxy is active and not overridden, in which case it steps aside so your OS proxy keeps working and pen names follow that OS proxy until overridden), builds reproducibly frombrowser-ext/, and speaks to a read-only native host (hogman-native-host) returning only verified pen zones and loopback ports. - HTTPS to servers only (D-11): no SSH, arbitrary UDP/TCP, member-to-member connections, exit nodes, or LAN subnet routing — omitted by design.
Spot something wrong or unclear? Edit the source in site/docs-src on GitHub.