Initial commit
This commit is contained in:
19
wgenroll.go
Normal file
19
wgenroll.go
Normal 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())
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user