diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c95668..d7d84e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Return error in install completion handler. [#206](https://github.com/passepartoutvpn/tunnelkit/issues/206) +- Relax handling of whitespaces in configuration file. ## 3.3.2 (2021-06-26) diff --git a/TunnelKit/Sources/Protocols/OpenVPN/ConfigurationParser.swift b/TunnelKit/Sources/Protocols/OpenVPN/ConfigurationParser.swift index 8c1895e..5b5a748 100644 --- a/TunnelKit/Sources/Protocols/OpenVPN/ConfigurationParser.swift +++ b/TunnelKit/Sources/Protocols/OpenVPN/ConfigurationParser.swift @@ -863,6 +863,7 @@ private extension String { func trimmedLines() -> [String] { return components(separatedBy: .newlines).map { $0.trimmingCharacters(in: .whitespacesAndNewlines) + .replacingOccurrences(of: "\\s", with: " ", options: .regularExpression) }.filter { !$0.isEmpty }