Wireguard Mesh
01README
Render one WireGuard node's config from mesh data (peers, allowlist, relay exclusion) and apply it to that node over SSH. One generic model for any node of any mesh; the private key is delivered over stdin and never appears in the config text.
02Behaviors
@randybias/wireguard-meshv2026.10.17.6wireguard_mesh.ts
fn render()
READ-ONLY. Render one node's wg0.conf from the mesh and return it with the resolved peers; the same inputs give identical bytes. The private key is never in the text: the config reads it from a key file on the node.
fn apply()
DESTRUCTIVE. Render the node's config and push it over SSH, recreating the interface when its address or routes change and restoring both files on any failure; idempotent for a proven-converged node, but an unconfirmed earlier change is never a no-op. Never capture --json output of a run with a literal private key.
fn get()
READ-ONLY. Read the node's interface state with wg show: peers, endpoints, allowed IPs and latest handshake. Fails with a typed error when the node is unreachable.
fn delete()
DESTRUCTIVE. Bring the node's interface down and remove its config and key file, arming a remote rollback first and requiring acknowledge_reachability_risk; an interface already down and gone is a clean no-op.
Resources
state(infinite)— Last applied or deleted config of one node
rendered(infinite)— Rendered config text and resolved peers of one node
live(infinite)— Interface state read back from one node
hostkeys(infinite)— SSH host keys accepted for one node, pinned on later runs
03Previous Versions
2026.10.17.5
2026.10.17.4
04Stats
A
93 / 100
Downloads
2
Archive size
54.6 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
deno-command1 accepted
Spawns a subprocess with Deno.Command().
- models/_lib/ssh.ts:597 — no reason given
06Platforms
07Labels