From 897af77b335e7e20367925d73e96c483038e0d68 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Tue, 23 Nov 2021 16:54:08 +0100 Subject: [PATCH] Update TunnelKit - Keychain adjustments - Revisited package dependencies --- PassepartoutCore/Package.swift | 4 +++- .../Sources/PassepartoutCore/Model/ConnectionService.swift | 2 +- .../Sources/PassepartoutCore/Model/EndpointDataSource.swift | 1 + .../Sources/PassepartoutCore/Model/GracefulVPN.swift | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PassepartoutCore/Package.swift b/PassepartoutCore/Package.swift index de1a7a3b..24a22fe4 100644 --- a/PassepartoutCore/Package.swift +++ b/PassepartoutCore/Package.swift @@ -21,7 +21,9 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), - .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.0.1"), +// .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", from: "4.0.1"), + .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("c40863d36687c4d44985e7ba804cac41608038e0")), +// .package(name: "TunnelKit", path: "../../tunnelkit"), .package(name: "Convenience", url: "https://github.com/keeshux/convenience", .revision("347105ec0ce27cd4255acf9875fd60ad1f213801")), .package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0") ], diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift index 65e917f8..e88551e0 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift @@ -541,7 +541,7 @@ public class ConnectionService: Codable { withBundleIdentifier: AppConstants.App.tunnelBundleId, appGroup: appGroup, context: profile.passwordContext, - username: creds?.username + credentials: creds ) protocolConfiguration.disconnectOnSleep = preferences.disconnectsOnSleep diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift index 8e8a12ae..8cac3f71 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift @@ -25,6 +25,7 @@ import Foundation import TunnelKit +import TunnelKitCore public protocol EndpointDataSource { var mainAddress: String? { get } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift index 3fd00d48..3667e87a 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift @@ -66,7 +66,7 @@ public class GracefulVPN { } do { log.info("Reconnecting...") - try vpn.reconnect(configuration: service.vpnConfiguration(), completionHandler: completionHandler) + try vpn.reconnect(configuration: service.vpnConfiguration(), delay: nil, completionHandler: completionHandler) } catch let e { guard e as? ApplicationError != .externalResources else { completionHandler?(e)