diff --git a/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift b/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift index eae8246..efc7cd7 100644 --- a/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift +++ b/TunnelKit/Sources/AppExtension/TunnelKitProvider.swift @@ -221,8 +221,11 @@ open class TunnelKitProvider: NEPacketTunnelProvider { sessionConfiguration.clientCertificatePath = clientCertificatePath sessionConfiguration.clientKeyPath = clientKeyPath sessionConfiguration.compressionFraming = cfg.compressionFraming + if let keepAliveSeconds = cfg.keepAliveSeconds { + sessionConfiguration.keepAliveInterval = TimeInterval(keepAliveSeconds) + } if let renegotiatesAfterSeconds = cfg.renegotiatesAfterSeconds { - sessionConfiguration.renegotiatesAfter = Double(renegotiatesAfterSeconds) + sessionConfiguration.renegotiatesAfter = TimeInterval(renegotiatesAfterSeconds) } sessionConfiguration.keepAliveInterval = CoreConfiguration.pingInterval