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 "),