From 66f02634ab8c1bb4337aadf0679d2834ee3ad02e Mon Sep 17 00:00:00 2001 From: Patrick MARIE Date: Thu, 9 Feb 2023 18:19:36 +0100 Subject: [PATCH] Fix version used. It seems like using an older version breaks things, as the server will only return AUTH_FAILED. Making a bigger channel so the tool does not block after the preflight query. --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index a4684e8..c1fd1ea 100644 --- a/main.go +++ b/main.go @@ -75,13 +75,13 @@ func localServer(tokenChannel chan<- Token) { func main() { flag.Parse() - fmt.Println("Hello World!") - if checkOpenVPNFile() != nil { return } - tokenChannel := make(chan Token) + // Make a some big room for the channel. + tokenChannel := make(chan Token, 65535) + // Open a quick local httpd before redirecting user to go to saml auth page. go localServer(tokenChannel) @@ -103,7 +103,7 @@ func main() { "--config", ovpnFile, "--auth-user-pass", tmpCredentialsFile, "--script-security", "2", "--up-restart", "--up", "scripts/linux.sh", "--down", "scripts/linux.sh", - "--setenv", "IV_PLAT", "linux", "--setenv", "IV_GUI_VER", "AVPNC-2.14.14", "--push-peer-info", "--log", logFile, + "--setenv", "IV_PLAT", "linux", "--setenv", "IV_GUI_VER", "AVPNC-2.16.42", "--push-peer-info", "--log", logFile, ) err = cmd.Run()