A lua implementation of the wireguard keygen algorithm.
local wg = require("wg").wireguard
local keypair = wg:generateKeypair()
print("Public Key: ", keypair.publicKey)
print("Private Key: ", keypair.privateKey)
print(wg:generatePublicKey(keypair.privateKey))
-
Generates a wireguard keypair consisting of a public and private key.
-
Generates a wireguard public key, given a private key.
To get started, install the required dependencies with:
aftman install
pnpm i
Run tests with:
pnpm test
Run any luau file with:
./lunew <path>
Run an example with:
./lunew example <example-name>