From 6018c30cc46be093aa05bc9ccb3fc72ac55ae941 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Fri, 23 Sep 2022 23:01:57 +0200 Subject: [PATCH] Add fallback for compression algorithm --- Sources/TunnelKitOpenVPNCore/Configuration.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sources/TunnelKitOpenVPNCore/Configuration.swift b/Sources/TunnelKitOpenVPNCore/Configuration.swift index 61345a7..e25a520 100644 --- a/Sources/TunnelKitOpenVPNCore/Configuration.swift +++ b/Sources/TunnelKitOpenVPNCore/Configuration.swift @@ -491,6 +491,10 @@ extension OpenVPN { public var fallbackCompressionFraming: CompressionFraming { return compressionFraming ?? Fallback.compressionFraming } + + public var fallbackCompressionAlgorithm: CompressionAlgorithm { + return compressionAlgorithm ?? Fallback.compressionAlgorithm + } } } @@ -559,12 +563,8 @@ extension OpenVPN.Configuration { log.info("\tCipher: \(fallbackCipher)") log.info("\tDigest: \(fallbackDigest)") log.info("\tCompression framing: \(fallbackCompressionFraming)") + log.info("\tCompression algorithm: \(fallbackCompressionAlgorithm)") log.info("\tUsername authentication: \(authUserPass ?? false)") - if let compressionAlgorithm = compressionAlgorithm, compressionAlgorithm != .disabled { - log.info("\tCompression algorithm: \(compressionAlgorithm)") - } else { - log.info("\tCompression algorithm: disabled") - } if let _ = clientCertificate { log.info("\tClient verification: enabled") } else {