Initial commit

This commit is contained in:
2024-02-18 00:13:52 -08:00
commit 10fd07812c
4 changed files with 79 additions and 0 deletions

19
wgenroll.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"log"
"golang.zx2c4.com/wireguard/wgctrl"
)
func main() {
client, err := wgctrl.New()
defer client.Close()
if err != nil {
log.Fatalf("Unable to create wireguard client. Is wireguard installed? %v", err)
}
log.Println(client.Devices())
}