From c515603d2f610a86607c8912bf79b921ce3bd141 Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Wed, 18 Aug 2021 17:41:53 +0000 Subject: [PATCH] Fix: Openvpn custom config: remove user set --- internal/configuration/openvpn_test.go | 3 ++- internal/openvpn/custom.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/configuration/openvpn_test.go b/internal/configuration/openvpn_test.go index 4cd00717..f59367fe 100644 --- a/internal/configuration/openvpn_test.go +++ b/internal/configuration/openvpn_test.go @@ -28,7 +28,8 @@ func Test_OpenVPN_JSON(t *testing.T) { "custom_config": "", "version": "", "encryption_preset": "", - "ipv6": false + "ipv6": false, + "procuser": "" }`, string(data)) var out OpenVPN err = json.Unmarshal(data, &out) diff --git a/internal/openvpn/custom.go b/internal/openvpn/custom.go index 56d3d5ae..2c1ccbdb 100644 --- a/internal/openvpn/custom.go +++ b/internal/openvpn/custom.go @@ -64,6 +64,7 @@ func modifyCustomConfig(lines []string, strings.HasPrefix(line, "down "), strings.HasPrefix(line, "verb "), strings.HasPrefix(line, "auth-user-pass "), + strings.HasPrefix(line, "user "), len(settings.Cipher) > 0 && strings.HasPrefix(line, "cipher "), len(settings.Cipher) > 0 && strings.HasPrefix(line, "data-ciphers"), len(settings.Auth) > 0 && strings.HasPrefix(line, "auth "),