From 1406989d111c8361a69ae2c673ea27fd97c80203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 4 Jun 2024 12:07:32 +0200 Subject: [PATCH] Disable with file, bumped to v2 --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 1419723..a22f4a9 100644 --- a/main.go +++ b/main.go @@ -16,7 +16,7 @@ import ( "time" ) -const VERSION = "v1" +const VERSION = "v2" const SPOOLDIR = "C:\\Program Files\\Gibon\\wg-spool" const DOMAIN = "https://vpn.gibonuddevalla.se" @@ -59,6 +59,10 @@ func logError(where, e string) { } func main() { + if _, disabledDoesntExist := os.Stat(SPOOLDIR+`\disabled`); disabledDoesntExist == nil { + return + } + publicKeyPath = SPOOLDIR + "\\wireguard-mfa.url" iface := os.Getenv("WIREGUARD_TUNNEL_NAME")