Browser-safe TypeScript helpers for generating and validating WireGuard core configuration JSON.
import {
createDefaultWireGuardCoreDraft,
generateWireGuardCoreConfigJson,
generateWireGuardKeyPair,
validateWireGuardCoreConfig
} from "@pasarguard/wireguard-config-kit";bun install
bun run typecheck
bun run build
bun testGenerated configs target PasarGuard WireGuard cores:
{
"interface_name": "wg0",
"private_key": "<generated>",
"listen_port": 51820,
"address": ["10.0.0.1/8"]
}