Add fallback for compression algorithm

This commit is contained in:
Davide De Rosa 2022-09-23 23:01:57 +02:00
parent ca378c4999
commit 6018c30cc4
1 changed files with 5 additions and 5 deletions

View File

@ -491,6 +491,10 @@ extension OpenVPN {
public var fallbackCompressionFraming: CompressionFraming { public var fallbackCompressionFraming: CompressionFraming {
return compressionFraming ?? Fallback.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("\tCipher: \(fallbackCipher)")
log.info("\tDigest: \(fallbackDigest)") log.info("\tDigest: \(fallbackDigest)")
log.info("\tCompression framing: \(fallbackCompressionFraming)") log.info("\tCompression framing: \(fallbackCompressionFraming)")
log.info("\tCompression algorithm: \(fallbackCompressionAlgorithm)")
log.info("\tUsername authentication: \(authUserPass ?? false)") 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 { if let _ = clientCertificate {
log.info("\tClient verification: enabled") log.info("\tClient verification: enabled")
} else { } else {