Update TunnelKit

- Keychain adjustments
- Revisited package dependencies
This commit is contained in:
Davide De Rosa 2021-11-23 16:54:08 +01:00
parent f0020dfba6
commit 897af77b33
4 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,9 @@ let package = Package(
dependencies: [ dependencies: [
// Dependencies declare other packages that this package depends on. // Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"), // .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(name: "Convenience", url: "https://github.com/keeshux/convenience", .revision("347105ec0ce27cd4255acf9875fd60ad1f213801")),
.package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0") .package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0")
], ],

View File

@ -541,7 +541,7 @@ public class ConnectionService: Codable {
withBundleIdentifier: AppConstants.App.tunnelBundleId, withBundleIdentifier: AppConstants.App.tunnelBundleId,
appGroup: appGroup, appGroup: appGroup,
context: profile.passwordContext, context: profile.passwordContext,
username: creds?.username credentials: creds
) )
protocolConfiguration.disconnectOnSleep = preferences.disconnectsOnSleep protocolConfiguration.disconnectOnSleep = preferences.disconnectsOnSleep

View File

@ -25,6 +25,7 @@
import Foundation import Foundation
import TunnelKit import TunnelKit
import TunnelKitCore
public protocol EndpointDataSource { public protocol EndpointDataSource {
var mainAddress: String? { get } var mainAddress: String? { get }

View File

@ -66,7 +66,7 @@ public class GracefulVPN {
} }
do { do {
log.info("Reconnecting...") log.info("Reconnecting...")
try vpn.reconnect(configuration: service.vpnConfiguration(), completionHandler: completionHandler) try vpn.reconnect(configuration: service.vpnConfiguration(), delay: nil, completionHandler: completionHandler)
} catch let e { } catch let e {
guard e as? ApplicationError != .externalResources else { guard e as? ApplicationError != .externalResources else {
completionHandler?(e) completionHandler?(e)