diff --git a/Passepartout.xcodeproj/project.pbxproj b/Passepartout.xcodeproj/project.pbxproj index 08f8adbd..fe99cba8 100644 --- a/Passepartout.xcodeproj/project.pbxproj +++ b/Passepartout.xcodeproj/project.pbxproj @@ -1403,7 +1403,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -1462,7 +1462,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 10.15; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/Passepartout/App/Descriptible.swift b/Passepartout/App/Descriptible.swift index 33ef77f5..a9286943 100644 --- a/Passepartout/App/Descriptible.swift +++ b/Passepartout/App/Descriptible.swift @@ -24,11 +24,7 @@ // import Foundation -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitManager -import TunnelKitOpenVPN public protocol UIDescriptible { var uiDescription: String { get } diff --git a/Passepartout/App/iOS/AppDelegate.swift b/Passepartout/App/iOS/AppDelegate.swift index 0f783305..ac602ffa 100644 --- a/Passepartout/App/iOS/AppDelegate.swift +++ b/Passepartout/App/iOS/AppDelegate.swift @@ -25,9 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitOpenVPN import Convenience private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Cells/ActivityTableViewCell.swift b/Passepartout/App/iOS/Cells/ActivityTableViewCell.swift index 0935192f..16fe23e8 100644 --- a/Passepartout/App/iOS/Cells/ActivityTableViewCell.swift +++ b/Passepartout/App/iOS/Cells/ActivityTableViewCell.swift @@ -30,7 +30,7 @@ extension Cells { } class ActivityTableViewCell: UITableViewCell { - private lazy var activityIndicator = UIActivityIndicatorView(style: .gray) + private lazy var activityIndicator = UIActivityIndicatorView(style: .medium) } extension ActivityTableViewCell { diff --git a/Passepartout/App/iOS/Global/HostImporter.swift b/Passepartout/App/iOS/Global/HostImporter.swift index 9be8d8e0..748de951 100644 --- a/Passepartout/App/iOS/Global/HostImporter.swift +++ b/Passepartout/App/iOS/Global/HostImporter.swift @@ -25,10 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitOpenVPN private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Global/IssueReporter.swift b/Passepartout/App/iOS/Global/IssueReporter.swift index 42ceb1e5..8542485e 100644 --- a/Passepartout/App/iOS/Global/IssueReporter.swift +++ b/Passepartout/App/iOS/Global/IssueReporter.swift @@ -25,10 +25,7 @@ import Foundation import MessageUI -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager -import TunnelKitOpenVPN class IssueReporter: NSObject { static let shared = IssueReporter() diff --git a/Passepartout/App/iOS/Global/Macros.swift b/Passepartout/App/iOS/Global/Macros.swift index f1281196..a1ca1e8a 100644 --- a/Passepartout/App/iOS/Global/Macros.swift +++ b/Passepartout/App/iOS/Global/Macros.swift @@ -24,7 +24,6 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore extension UIView { diff --git a/Passepartout/App/iOS/Global/Theme+Cells.swift b/Passepartout/App/iOS/Global/Theme+Cells.swift index 1218b9eb..4f11da2f 100644 --- a/Passepartout/App/iOS/Global/Theme+Cells.swift +++ b/Passepartout/App/iOS/Global/Theme+Cells.swift @@ -24,10 +24,7 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager -import TunnelKitOpenVPN import ConvenienceUI extension UITableViewCell { @@ -96,7 +93,7 @@ extension SettingTableViewCell { accessoryType = .none } - func applyVPN(_ theme: Theme, with vpnStatus: VPNStatus?, error: OpenVPNTunnelProvider.ProviderError?) { + func applyVPN(_ theme: Theme, with vpnStatus: VPNStatus?, error: OpenVPNProviderError?) { textLabel?.font = .preferredFont(forTextStyle: .body) detailTextLabel?.font = .preferredFont(forTextStyle: .body) diff --git a/Passepartout/App/iOS/Global/Theme.swift b/Passepartout/App/iOS/Global/Theme.swift index 7f0c3585..c5e7fb62 100644 --- a/Passepartout/App/iOS/Global/Theme.swift +++ b/Passepartout/App/iOS/Global/Theme.swift @@ -26,7 +26,6 @@ import UIKit import MessageUI import StoreKit -import PassepartoutConstants import PassepartoutCore struct Theme { diff --git a/Passepartout/App/iOS/Intents/IntentDispatcher.swift b/Passepartout/App/iOS/Intents/IntentDispatcher.swift index d785f8e3..8c2b7b17 100644 --- a/Passepartout/App/iOS/Intents/IntentDispatcher.swift +++ b/Passepartout/App/iOS/Intents/IntentDispatcher.swift @@ -26,7 +26,6 @@ import Foundation import Intents import SwiftyBeaver -import TunnelKitManager import PassepartoutCore private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/About/AboutViewController.swift b/Passepartout/App/iOS/Scenes/About/AboutViewController.swift index 9c6772c5..8b9c1f11 100644 --- a/Passepartout/App/iOS/Scenes/About/AboutViewController.swift +++ b/Passepartout/App/iOS/Scenes/About/AboutViewController.swift @@ -24,7 +24,6 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore import Convenience import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/AccountViewController.swift b/Passepartout/App/iOS/Scenes/AccountViewController.swift index 27b0c369..235cbe7a 100644 --- a/Passepartout/App/iOS/Scenes/AccountViewController.swift +++ b/Passepartout/App/iOS/Scenes/AccountViewController.swift @@ -24,7 +24,6 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/ConfigurationModificationDelegate.swift b/Passepartout/App/iOS/Scenes/ConfigurationModificationDelegate.swift index e7ea7d05..c8a4da08 100644 --- a/Passepartout/App/iOS/Scenes/ConfigurationModificationDelegate.swift +++ b/Passepartout/App/iOS/Scenes/ConfigurationModificationDelegate.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitOpenVPN +import PassepartoutCore protocol ConfigurationModificationDelegate: AnyObject { func configuration(didUpdate newConfiguration: OpenVPN.Configuration) diff --git a/Passepartout/App/iOS/Scenes/ConfigurationViewController.swift b/Passepartout/App/iOS/Scenes/ConfigurationViewController.swift index 1146383d..2519dfa8 100644 --- a/Passepartout/App/iOS/Scenes/ConfigurationViewController.swift +++ b/Passepartout/App/iOS/Scenes/ConfigurationViewController.swift @@ -25,10 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitOpenVPN import ConvenienceUI private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/DebugLogViewController.swift b/Passepartout/App/iOS/Scenes/DebugLogViewController.swift index 10f23f87..1be32267 100644 --- a/Passepartout/App/iOS/Scenes/DebugLogViewController.swift +++ b/Passepartout/App/iOS/Scenes/DebugLogViewController.swift @@ -25,9 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/EndpointViewController.swift b/Passepartout/App/iOS/Scenes/EndpointViewController.swift index b489a409..a43e7cfc 100644 --- a/Passepartout/App/iOS/Scenes/EndpointViewController.swift +++ b/Passepartout/App/iOS/Scenes/EndpointViewController.swift @@ -24,9 +24,7 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore import ConvenienceUI protocol EndpointViewControllerDelegate: AnyObject { diff --git a/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift b/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift index ead5911e..a079aeb3 100644 --- a/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift +++ b/Passepartout/App/iOS/Scenes/NetworkSettingsViewController.swift @@ -25,9 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore import ConvenienceUI private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/Organizer/DonationViewController.swift b/Passepartout/App/iOS/Scenes/Organizer/DonationViewController.swift index 498703ba..55e948cf 100644 --- a/Passepartout/App/iOS/Scenes/Organizer/DonationViewController.swift +++ b/Passepartout/App/iOS/Scenes/Organizer/DonationViewController.swift @@ -26,7 +26,6 @@ import UIKit import StoreKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore import Convenience import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/Organizer/ImportedHostsViewController.swift b/Passepartout/App/iOS/Scenes/Organizer/ImportedHostsViewController.swift index 3afc1d42..2f81254e 100644 --- a/Passepartout/App/iOS/Scenes/Organizer/ImportedHostsViewController.swift +++ b/Passepartout/App/iOS/Scenes/Organizer/ImportedHostsViewController.swift @@ -24,9 +24,7 @@ // import UIKit -import TunnelKitCore import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/Organizer/OrganizerViewController.swift b/Passepartout/App/iOS/Scenes/Organizer/OrganizerViewController.swift index 62477e1a..714f022d 100644 --- a/Passepartout/App/iOS/Scenes/Organizer/OrganizerViewController.swift +++ b/Passepartout/App/iOS/Scenes/Organizer/OrganizerViewController.swift @@ -27,11 +27,7 @@ import UIKit import StoreKit import MessageUI import SystemConfiguration.CaptiveNetwork -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitManager -import TunnelKitOpenVPN import Convenience import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/Organizer/WizardHostViewController.swift b/Passepartout/App/iOS/Scenes/Organizer/WizardHostViewController.swift index ccdee543..efafc839 100644 --- a/Passepartout/App/iOS/Scenes/Organizer/WizardHostViewController.swift +++ b/Passepartout/App/iOS/Scenes/Organizer/WizardHostViewController.swift @@ -25,9 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitOpenVPN import ConvenienceUI private let log = SwiftyBeaver.self @@ -108,7 +106,7 @@ class WizardHostViewController: UITableViewController, StrongTableHost { } let profile = HostConnectionProfile(hostname: hostname) - let builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: result.configuration) + let builder = OpenVPNProvider.ConfigurationBuilder(sessionConfiguration: result.configuration) profile.parameters = builder.build() let service = TransientStore.shared.service diff --git a/Passepartout/App/iOS/Scenes/Organizer/WizardProviderViewController.swift b/Passepartout/App/iOS/Scenes/Organizer/WizardProviderViewController.swift index e3f650da..ac3a8c74 100644 --- a/Passepartout/App/iOS/Scenes/Organizer/WizardProviderViewController.swift +++ b/Passepartout/App/iOS/Scenes/Organizer/WizardProviderViewController.swift @@ -25,7 +25,6 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/ProviderPoolViewController.swift b/Passepartout/App/iOS/Scenes/ProviderPoolViewController.swift index 5f915de1..fc4a10cf 100644 --- a/Passepartout/App/iOS/Scenes/ProviderPoolViewController.swift +++ b/Passepartout/App/iOS/Scenes/ProviderPoolViewController.swift @@ -24,7 +24,6 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/ProviderPresetViewController.swift b/Passepartout/App/iOS/Scenes/ProviderPresetViewController.swift index 4d175012..ef7e09ce 100644 --- a/Passepartout/App/iOS/Scenes/ProviderPresetViewController.swift +++ b/Passepartout/App/iOS/Scenes/ProviderPresetViewController.swift @@ -24,7 +24,6 @@ // import UIKit -import PassepartoutConstants import PassepartoutCore protocol ProviderPresetViewControllerDelegate: AnyObject { diff --git a/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift b/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift index c2e46b4d..2fd020c0 100644 --- a/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift +++ b/Passepartout/App/iOS/Scenes/Purchase/PurchaseViewController.swift @@ -25,7 +25,6 @@ import UIKit import StoreKit -import PassepartoutConstants import PassepartoutCore import SwiftyBeaver import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/ServerNetworkViewController.swift b/Passepartout/App/iOS/Scenes/ServerNetworkViewController.swift index b7feb57d..a1fb95ac 100644 --- a/Passepartout/App/iOS/Scenes/ServerNetworkViewController.swift +++ b/Passepartout/App/iOS/Scenes/ServerNetworkViewController.swift @@ -25,10 +25,7 @@ import UIKit import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitOpenVPN import ConvenienceUI private let log = SwiftyBeaver.self diff --git a/Passepartout/App/iOS/Scenes/ServiceViewController.swift b/Passepartout/App/iOS/Scenes/ServiceViewController.swift index 9b783035..aa14df0e 100644 --- a/Passepartout/App/iOS/Scenes/ServiceViewController.swift +++ b/Passepartout/App/iOS/Scenes/ServiceViewController.swift @@ -27,11 +27,7 @@ import UIKit import NetworkExtension import CoreLocation import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitManager -import TunnelKitOpenVPN import Convenience import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsAddViewController.swift b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsAddViewController.swift index 0b6e0a33..5b671910 100644 --- a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsAddViewController.swift +++ b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsAddViewController.swift @@ -25,7 +25,6 @@ import UIKit import Intents -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsConnectToViewController.swift b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsConnectToViewController.swift index a8a306d6..b0e9ca52 100644 --- a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsConnectToViewController.swift +++ b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsConnectToViewController.swift @@ -26,7 +26,6 @@ import UIKit import Intents import IntentsUI -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsViewController.swift b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsViewController.swift index 7bb591d3..d4029c37 100644 --- a/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsViewController.swift +++ b/Passepartout/App/iOS/Scenes/Shortcuts/ShortcutsViewController.swift @@ -26,7 +26,6 @@ import UIKit import Intents import IntentsUI -import PassepartoutConstants import PassepartoutCore import ConvenienceUI diff --git a/Passepartout/App/macOS/AppDelegate.swift b/Passepartout/App/macOS/AppDelegate.swift index 4d543d9d..38d11fb9 100644 --- a/Passepartout/App/macOS/AppDelegate.swift +++ b/Passepartout/App/macOS/AppDelegate.swift @@ -24,10 +24,8 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore import Convenience -import TunnelKitCore import ServiceManagement // comment on release diff --git a/Passepartout/App/macOS/Global/HostImporter.swift b/Passepartout/App/macOS/Global/HostImporter.swift index 010d069d..c3c739e3 100644 --- a/Passepartout/App/macOS/Global/HostImporter.swift +++ b/Passepartout/App/macOS/Global/HostImporter.swift @@ -24,11 +24,8 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore import SwiftyBeaver -import TunnelKitCore -import TunnelKitOpenVPN private let log = SwiftyBeaver.self @@ -109,7 +106,7 @@ class HostImporter { let vc = StoryboardScene.Main.textInputViewController.instantiate() vc.caption = L10n.Service.Alerts.Rename.title.asCaption let profile = HostConnectionProfile(hostname: hostname) - let builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: result.configuration) + let builder = OpenVPNProvider.ConfigurationBuilder(sessionConfiguration: result.configuration) profile.parameters = builder.build() vc.text = title vc.placeholder = L10n.Global.Host.TitleInput.placeholder diff --git a/Passepartout/App/macOS/Global/IssueReporter.swift b/Passepartout/App/macOS/Global/IssueReporter.swift index 46c54004..9724d1fc 100644 --- a/Passepartout/App/macOS/Global/IssueReporter.swift +++ b/Passepartout/App/macOS/Global/IssueReporter.swift @@ -25,11 +25,7 @@ import Foundation import AppKit -import PassepartoutConstants -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager -import TunnelKitOpenVPN class IssueReporter: NSObject { static let shared = IssueReporter() diff --git a/Passepartout/App/macOS/Global/Macros.swift b/Passepartout/App/macOS/Global/Macros.swift index 5dfed35b..d5c21442 100644 --- a/Passepartout/App/macOS/Global/Macros.swift +++ b/Passepartout/App/macOS/Global/Macros.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore class Macros { diff --git a/Passepartout/App/macOS/Global/TextInputViewController.swift b/Passepartout/App/macOS/Global/TextInputViewController.swift index 24e7f40b..3a7f1b55 100644 --- a/Passepartout/App/macOS/Global/TextInputViewController.swift +++ b/Passepartout/App/macOS/Global/TextInputViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore protocol TextInputViewControllerDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Global/Theme+Views.swift b/Passepartout/App/macOS/Global/Theme+Views.swift index 1b796bc3..0dd6933d 100644 --- a/Passepartout/App/macOS/Global/Theme+Views.swift +++ b/Passepartout/App/macOS/Global/Theme+Views.swift @@ -24,13 +24,10 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager -import TunnelKitOpenVPN extension NSTextField { - func applyVPN(_ theme: Theme, isActive: Bool, with vpnStatus: VPNStatus?, error: OpenVPNTunnelProvider.ProviderError?) { + func applyVPN(_ theme: Theme, isActive: Bool, with vpnStatus: VPNStatus?, error: OpenVPNProviderError?) { guard isActive else { stringValue = L10n.Vpn.unused textColor = theme.palette.colorSecondaryText @@ -61,7 +58,7 @@ extension NSTextField { } } - private func disconnectionReason(for error: OpenVPNTunnelProvider.ProviderError?) -> String? { + private func disconnectionReason(for error: OpenVPNProviderError?) -> String? { guard let error = error else { return nil } diff --git a/Passepartout/App/macOS/Global/Theme.swift b/Passepartout/App/macOS/Global/Theme.swift index 1380660d..b3bc87bd 100644 --- a/Passepartout/App/macOS/Global/Theme.swift +++ b/Passepartout/App/macOS/Global/Theme.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore struct Theme { diff --git a/Passepartout/App/macOS/Global/WindowManager.swift b/Passepartout/App/macOS/Global/WindowManager.swift index ea5bc8f9..a5114b21 100644 --- a/Passepartout/App/macOS/Global/WindowManager.swift +++ b/Passepartout/App/macOS/Global/WindowManager.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore class WindowManager: NSObject { diff --git a/Passepartout/App/macOS/Menu/StatusMenu.swift b/Passepartout/App/macOS/Menu/StatusMenu.swift index e27df4bd..23ae98a9 100644 --- a/Passepartout/App/macOS/Menu/StatusMenu.swift +++ b/Passepartout/App/macOS/Menu/StatusMenu.swift @@ -25,11 +25,7 @@ import Cocoa import StoreKit -import PassepartoutConstants -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitManager import Convenience class StatusMenu: NSObject { diff --git a/Passepartout/App/macOS/Scenes/OrganizerProfileTableView.swift b/Passepartout/App/macOS/Scenes/OrganizerProfileTableView.swift index b678d252..bde25324 100644 --- a/Passepartout/App/macOS/Scenes/OrganizerProfileTableView.swift +++ b/Passepartout/App/macOS/Scenes/OrganizerProfileTableView.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore protocol OrganizerProfileTableViewDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Scenes/OrganizerViewController.swift b/Passepartout/App/macOS/Scenes/OrganizerViewController.swift index 4f65bc93..912602c2 100644 --- a/Passepartout/App/macOS/Scenes/OrganizerViewController.swift +++ b/Passepartout/App/macOS/Scenes/OrganizerViewController.swift @@ -25,9 +25,7 @@ import Cocoa import SwiftyBeaver -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager private let log = SwiftyBeaver.self diff --git a/Passepartout/App/macOS/Scenes/Preferences/DebugLogViewController.swift b/Passepartout/App/macOS/Scenes/Preferences/DebugLogViewController.swift index de320ad3..b4481dfd 100644 --- a/Passepartout/App/macOS/Scenes/Preferences/DebugLogViewController.swift +++ b/Passepartout/App/macOS/Scenes/Preferences/DebugLogViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitManager class DebugLogViewController: NSViewController { @IBOutlet private weak var labelExchangedCaption: NSTextField! diff --git a/Passepartout/App/macOS/Scenes/Preferences/PreferencesGeneralViewController.swift b/Passepartout/App/macOS/Scenes/Preferences/PreferencesGeneralViewController.swift index 73c88f87..bc39e095 100644 --- a/Passepartout/App/macOS/Scenes/Preferences/PreferencesGeneralViewController.swift +++ b/Passepartout/App/macOS/Scenes/Preferences/PreferencesGeneralViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore import ServiceManagement diff --git a/Passepartout/App/macOS/Scenes/Preferences/PreferencesViewController.swift b/Passepartout/App/macOS/Scenes/Preferences/PreferencesViewController.swift index 416cb929..6e685601 100644 --- a/Passepartout/App/macOS/Scenes/Preferences/PreferencesViewController.swift +++ b/Passepartout/App/macOS/Scenes/Preferences/PreferencesViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore class PreferencesViewController: NSViewController { diff --git a/Passepartout/App/macOS/Scenes/Purchase/PurchaseViewController.swift b/Passepartout/App/macOS/Scenes/Purchase/PurchaseViewController.swift index 64988ad6..715cd630 100644 --- a/Passepartout/App/macOS/Scenes/Purchase/PurchaseViewController.swift +++ b/Passepartout/App/macOS/Scenes/Purchase/PurchaseViewController.swift @@ -25,7 +25,6 @@ import Cocoa import StoreKit -import PassepartoutConstants import PassepartoutCore import SwiftyBeaver import Convenience diff --git a/Passepartout/App/macOS/Scenes/Service/AccountViewController.swift b/Passepartout/App/macOS/Scenes/Service/AccountViewController.swift index 26e45a7f..a292f03e 100644 --- a/Passepartout/App/macOS/Scenes/Service/AccountViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/AccountViewController.swift @@ -24,8 +24,6 @@ // import Cocoa -import TunnelKitCore -import PassepartoutConstants import PassepartoutCore protocol AccountViewControllerDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/ConfigurationViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/ConfigurationViewController.swift index 31c46af3..ae074181 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/ConfigurationViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/ConfigurationViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitOpenVPN class ConfigurationViewController: NSViewController, ProfileCustomization { private struct Columns { diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift index aebd397f..309a5f89 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/DNSViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore class DNSViewController: NSViewController, ProfileCustomization { @IBOutlet private weak var popupChoice: NSPopUpButton! diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/DefaultGatewayViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/DefaultGatewayViewController.swift index 53e1f939..e06f374e 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/DefaultGatewayViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/DefaultGatewayViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitOpenVPN class DefaultGatewayViewController: NSViewController, ProfileCustomization { @IBOutlet private weak var popupChoice: NSPopUpButton! diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/EndpointViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/EndpointViewController.swift index a58c99a9..9a83a199 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/EndpointViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/EndpointViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore class EndpointViewController: NSViewController, ProfileCustomization { @IBOutlet private weak var labelAddressCaption: NSTextField! diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/MTUViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/MTUViewController.swift index 764003f3..5b35b692 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/MTUViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/MTUViewController.swift @@ -24,9 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore class MTUViewController: NSViewController, ProfileCustomization { @IBOutlet private weak var popupChoice: NSPopUpButton! diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/ProfileCustomizationViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/ProfileCustomizationViewController.swift index 5b6da80e..b387d381 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/ProfileCustomizationViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/ProfileCustomizationViewController.swift @@ -24,10 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitOpenVPN protocol ProfileCustomization: AnyObject { var profile: ConnectionProfile? { get set } diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/ProxyViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/ProxyViewController.swift index 0d76e69f..c794890e 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/ProxyViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/ProxyViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore class ProxyViewController: NSViewController, ProfileCustomization { diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksAddViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksAddViewController.swift index be1dc0a1..a2f0d032 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksAddViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksAddViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore protocol TrustedNetworksAddViewControllerDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksViewController.swift b/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksViewController.swift index b3474738..e6eaf909 100644 --- a/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/Customization/TrustedNetworksViewController.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore class TrustedNetworksViewController: NSViewController, ProfileCustomization { diff --git a/Passepartout/App/macOS/Scenes/Service/HostServiceView.swift b/Passepartout/App/macOS/Scenes/Service/HostServiceView.swift index 5340514d..e4ae7978 100644 --- a/Passepartout/App/macOS/Scenes/Service/HostServiceView.swift +++ b/Passepartout/App/macOS/Scenes/Service/HostServiceView.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore protocol HostServiceViewDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Scenes/Service/ProviderServiceView.swift b/Passepartout/App/macOS/Scenes/Service/ProviderServiceView.swift index 0fb5bba0..58948fcc 100644 --- a/Passepartout/App/macOS/Scenes/Service/ProviderServiceView.swift +++ b/Passepartout/App/macOS/Scenes/Service/ProviderServiceView.swift @@ -24,7 +24,6 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore protocol ProviderServiceViewDelegate: AnyObject { diff --git a/Passepartout/App/macOS/Scenes/Service/ServiceViewController.swift b/Passepartout/App/macOS/Scenes/Service/ServiceViewController.swift index 09ab88d5..4ba1ed45 100644 --- a/Passepartout/App/macOS/Scenes/Service/ServiceViewController.swift +++ b/Passepartout/App/macOS/Scenes/Service/ServiceViewController.swift @@ -24,10 +24,7 @@ // import Cocoa -import PassepartoutConstants import PassepartoutCore -import TunnelKitCore -import TunnelKitManager import SwiftyBeaver import Convenience diff --git a/Passepartout/Tunnel/PacketTunnelProvider.swift b/Passepartout/Tunnel/PacketTunnelProvider.swift index 66048eb6..a1cbb280 100644 --- a/Passepartout/Tunnel/PacketTunnelProvider.swift +++ b/Passepartout/Tunnel/PacketTunnelProvider.swift @@ -24,8 +24,8 @@ // import Foundation -import TunnelKitOpenVPN import PassepartoutConstants +import PassepartoutOpenVPNTunnel class PacketTunnelProvider: OpenVPNTunnelProvider { override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void) { diff --git a/PassepartoutCore/Package.resolved b/PassepartoutCore/Package.resolved index c2e58c8a..58c7e34f 100644 --- a/PassepartoutCore/Package.resolved +++ b/PassepartoutCore/Package.resolved @@ -51,7 +51,7 @@ "repositoryURL": "https://github.com/keeshux/openssl-apple", "state": { "branch": null, - "revision": "1889136399ba40e4fc358cfe7fafef7170aac3f7", + "revision": "37043e7c92c9fb348d1d668b0402148c9fa9873c", "version": "1.1.112" } }, @@ -69,7 +69,7 @@ "repositoryURL": "https://github.com/passepartoutvpn/tunnelkit", "state": { "branch": null, - "revision": "d1f70171cb09c1e71e0f3cc23fccb7bb7a9a9d42", + "revision": "25b79508f0901d024cc31e073e55a33bd6e5fae2", "version": null } } diff --git a/PassepartoutCore/Package.swift b/PassepartoutCore/Package.swift index 357bfcd7..3cbc884b 100644 --- a/PassepartoutCore/Package.swift +++ b/PassepartoutCore/Package.swift @@ -7,7 +7,7 @@ let package = Package( name: "PassepartoutCore", defaultLocalization: "en", platforms: [ - .iOS(.v12), .macOS(.v10_15) + .iOS(.v13), .macOS(.v10_15) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. @@ -21,7 +21,7 @@ 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", .revision("d1f70171cb09c1e71e0f3cc23fccb7bb7a9a9d42")), + .package(name: "TunnelKit", url: "https://github.com/passepartoutvpn/tunnelkit", .revision("94d091c08846e7acb2d355375089409c572c25fd")), .package(name: "Convenience", url: "https://github.com/keeshux/convenience", .revision("347105ec0ce27cd4255acf9875fd60ad1f213801")), .package(url: "https://github.com/Cocoanetics/Kvitto", from: "1.0.0") ], @@ -35,6 +35,7 @@ let package = Package( name: "PassepartoutCore", dependencies: [ "PassepartoutConstants", + .product(name: "TunnelKit", package: "TunnelKit"), .product(name: "TunnelKitOpenVPN", package: "TunnelKit"), .product(name: "TunnelKitLZO", package: "TunnelKit"), "Convenience", @@ -48,7 +49,7 @@ let package = Package( name: "PassepartoutOpenVPNTunnel", dependencies: [ "PassepartoutConstants", - .product(name: "TunnelKitOpenVPN", package: "TunnelKit"), + .product(name: "TunnelKitOpenVPNAppExtension", package: "TunnelKit"), .product(name: "TunnelKitLZO", package: "TunnelKit") ]), .testTarget( diff --git a/PassepartoutCore/Sources/PassepartoutCore/Exports.swift b/PassepartoutCore/Sources/PassepartoutCore/Exports.swift new file mode 100644 index 00000000..ac6c708e --- /dev/null +++ b/PassepartoutCore/Sources/PassepartoutCore/Exports.swift @@ -0,0 +1,3 @@ +@_exported import PassepartoutConstants +@_exported import TunnelKit +@_exported import TunnelKitOpenVPN diff --git a/PassepartoutCore/Sources/PassepartoutCore/Issue.swift b/PassepartoutCore/Sources/PassepartoutCore/Issue.swift index 65d38b09..a70c9e4d 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Issue.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Issue.swift @@ -24,7 +24,6 @@ // import Foundation -import TunnelKitCore #if os(iOS) import MessageUI #endif diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionProfile.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionProfile.swift index 4ca6af50..e1feb922 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionProfile.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionProfile.swift @@ -25,9 +25,8 @@ import Foundation import NetworkExtension -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN -import TunnelKitAppExtension public enum Context: String, Codable { case provider @@ -52,7 +51,7 @@ public protocol ConnectionProfile: AnyObject, EndpointDataSource, CustomStringCo var serviceDelegate: ConnectionServiceDelegate? { get set } - func generate(from configuration: OpenVPNTunnelProvider.Configuration, preferences: Preferences) throws -> OpenVPNTunnelProvider.Configuration + func generate(from configuration: OpenVPNProvider.Configuration, preferences: Preferences) throws -> OpenVPNProvider.Configuration } public extension ConnectionProfile { diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService+Migration.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService+Migration.swift index 3ab437f9..fb946dce 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService+Migration.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService+Migration.swift @@ -25,8 +25,7 @@ import Foundation import SwiftyBeaver -import TunnelKitCore -import TunnelKitAppExtension +import TunnelKit import PassepartoutConstants private let log = SwiftyBeaver.self diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift index 0b014abc..65e917f8 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ConnectionService.swift @@ -26,9 +26,7 @@ import Foundation import NetworkExtension import SwiftyBeaver -import TunnelKitCore -import TunnelKitAppExtension -import TunnelKitManager +import TunnelKit import TunnelKitOpenVPN import PassepartoutConstants @@ -89,7 +87,7 @@ public class ConnectionService: Codable { private let keychain: Keychain - public var baseConfiguration: OpenVPNTunnelProvider.Configuration + public var baseConfiguration: OpenVPNProvider.Configuration private var cache: [ProfileKey: ConnectionProfile] @@ -125,7 +123,7 @@ public class ConnectionService: Codable { public weak var delegate: ConnectionServiceDelegate? - public init(withAppGroup appGroup: String, baseConfiguration: OpenVPNTunnelProvider.Configuration) { + public init(withAppGroup appGroup: String, baseConfiguration: OpenVPNProvider.Configuration) { guard let defaults = UserDefaults(suiteName: appGroup) else { fatalError("No entitlements for group '\(appGroup)'") } @@ -157,7 +155,7 @@ public class ConnectionService: Codable { self.defaults = defaults keychain = Keychain(group: appGroup) - baseConfiguration = try container.decode(OpenVPNTunnelProvider.Configuration.self, forKey: .baseConfiguration) + baseConfiguration = try container.decode(OpenVPNProvider.Configuration.self, forKey: .baseConfiguration) activeProfileKey = try container.decodeIfPresent(ProfileKey.self, forKey: .activeProfileKey) preferences = try container.decode(EditablePreferences.self, forKey: .preferences) @@ -608,7 +606,7 @@ public class ConnectionService: Codable { try? FileManager.default.removeItem(at: url) } - public var vpnLastError: OpenVPNTunnelProvider.ProviderError? { + public var vpnLastError: OpenVPNProviderError? { return baseConfiguration.lastError(in: appGroup) } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift index d39a6223..8e8a12ae 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/EndpointDataSource.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit public protocol EndpointDataSource { var mainAddress: String? { get } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift index 52c3a500..3fd00d48 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/GracefulVPN.swift @@ -25,8 +25,7 @@ import Foundation import SwiftyBeaver -import TunnelKitCore -import TunnelKitManager +import TunnelKit private let log = SwiftyBeaver.self diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ProductManager.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ProductManager.swift index d941a645..823bcaaa 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ProductManager.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ProductManager.swift @@ -28,8 +28,7 @@ import StoreKit import Convenience import SwiftyBeaver import Kvitto -import TunnelKitCore -import TunnelKitManager +import TunnelKit import PassepartoutConstants private let log = SwiftyBeaver.self diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/ProfileNetworkSettings.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/ProfileNetworkSettings.swift index 76ec26cf..527e26b1 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/ProfileNetworkSettings.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/ProfileNetworkSettings.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN public enum NetworkChoice: String, Codable { diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/HostConnectionProfile.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/HostConnectionProfile.swift index 0c800963..9501b2f7 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/HostConnectionProfile.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/HostConnectionProfile.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { @@ -52,7 +52,7 @@ public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { public let hostname: String - public var parameters: OpenVPNTunnelProvider.Configuration + public var parameters: OpenVPNProvider.Configuration public var customAddress: String? @@ -62,7 +62,7 @@ public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { id = UUID().uuidString self.hostname = hostname let sessionConfiguration = OpenVPN.ConfigurationBuilder().build() - parameters = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionConfiguration).build() + parameters = OpenVPNProvider.ConfigurationBuilder(sessionConfiguration: sessionConfiguration).build() trustedNetworks = TrustedNetworks() } @@ -89,7 +89,7 @@ public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { public weak var serviceDelegate: ConnectionServiceDelegate? - public func generate(from configuration: OpenVPNTunnelProvider.Configuration, preferences: Preferences) throws -> OpenVPNTunnelProvider.Configuration { + public func generate(from configuration: OpenVPNProvider.Configuration, preferences: Preferences) throws -> OpenVPNProvider.Configuration { guard let endpointProtocols = parameters.sessionConfiguration.endpointProtocols, !endpointProtocols.isEmpty else { preconditionFailure("No endpointProtocols") } @@ -108,7 +108,6 @@ public class HostConnectionProfile: ConnectionProfile, Codable, Equatable { // forcibly override hostname with profile hostname (never nil) var sessionBuilder = builder.sessionConfiguration.builder() sessionBuilder.hostname = hostname - sessionBuilder.tlsSecurityLevel = 0 // lowest, tolerate widest range of certificates if sessionBuilder.mtu == nil { sessionBuilder.mtu = configuration.sessionConfiguration.mtu } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/PlaceholderConnectionProfile.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/PlaceholderConnectionProfile.swift index 9783e110..d5e7386d 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/PlaceholderConnectionProfile.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/PlaceholderConnectionProfile.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN public class PlaceholderConnectionProfile: ConnectionProfile { @@ -51,7 +51,7 @@ public class PlaceholderConnectionProfile: ConnectionProfile { public weak var serviceDelegate: ConnectionServiceDelegate? - public func generate(from configuration: OpenVPNTunnelProvider.Configuration, preferences: Preferences) throws -> OpenVPNTunnelProvider.Configuration { + public func generate(from configuration: OpenVPNProvider.Configuration, preferences: Preferences) throws -> OpenVPNProvider.Configuration { fatalError("Generating configuration from a PlaceholderConnectionProfile") } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/ProviderConnectionProfile.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/ProviderConnectionProfile.swift index b842dc02..f54fad65 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/ProviderConnectionProfile.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/Profiles/ProviderConnectionProfile.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN import PassepartoutConstants @@ -152,7 +152,7 @@ public class ProviderConnectionProfile: ConnectionProfile, Codable, Equatable { public weak var serviceDelegate: ConnectionServiceDelegate? - public func generate(from configuration: OpenVPNTunnelProvider.Configuration, preferences: Preferences) throws -> OpenVPNTunnelProvider.Configuration { + public func generate(from configuration: OpenVPNProvider.Configuration, preferences: Preferences) throws -> OpenVPNProvider.Configuration { guard let pool = pool else { preconditionFailure("Nil pool?") } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Model/TransientStore.swift b/PassepartoutCore/Sources/PassepartoutCore/Model/TransientStore.swift index b9832a8b..960569ca 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Model/TransientStore.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Model/TransientStore.swift @@ -25,7 +25,7 @@ import Foundation import SwiftyBeaver -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN import PassepartoutConstants @@ -94,9 +94,9 @@ public class TransientStore { } } - public static var baseVPNConfiguration: OpenVPNTunnelProvider.ConfigurationBuilder { + public static var baseVPNConfiguration: OpenVPNProvider.ConfigurationBuilder { let sessionBuilder = OpenVPN.ConfigurationBuilder() - var builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) + var builder = OpenVPNProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) builder.shouldDebug = true // builder.debugLogFormat = "$Dyyyy-MM-dd HH:mm:ss.SSS$d $L $N.$F:$l - $M" // builder.debugLogFormat = "$DHH:mm:ss$d $N.$F:$l - $M" diff --git a/PassepartoutCore/Sources/PassepartoutCore/Services/InfrastructurePreset.swift b/PassepartoutCore/Sources/PassepartoutCore/Services/InfrastructurePreset.swift index 6f90f0ec..c65a3646 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Services/InfrastructurePreset.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Services/InfrastructurePreset.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit import TunnelKitOpenVPN import PassepartoutConstants @@ -94,7 +94,7 @@ public class InfrastructurePreset: Codable { public let comment: String - public let configuration: OpenVPNTunnelProvider.Configuration + public let configuration: OpenVPNProvider.Configuration public let external: [ExternalKey: String]? @@ -128,7 +128,7 @@ public class InfrastructurePreset: Codable { return nil } - public func injectExternalConfiguration(_ configuration: inout OpenVPNTunnelProvider.ConfigurationBuilder, with infrastructureName: InfrastructureName, pool: Pool) throws { + public func injectExternalConfiguration(_ configuration: inout OpenVPNProvider.ConfigurationBuilder, with infrastructureName: InfrastructureName, pool: Pool) throws { guard let external = external, !external.isEmpty else { return } @@ -194,7 +194,7 @@ public class InfrastructurePreset: Codable { // default to server settings sessionBuilder.routingPolicies = nil - let builder = OpenVPNTunnelProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) + let builder = OpenVPNProvider.ConfigurationBuilder(sessionConfiguration: sessionBuilder.build()) configuration = builder.build() } diff --git a/PassepartoutCore/Sources/PassepartoutCore/Services/Pool.swift b/PassepartoutCore/Sources/PassepartoutCore/Services/Pool.swift index bf418e58..9307431b 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/Services/Pool.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/Services/Pool.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitCore +import TunnelKit public class Pool: Codable, Hashable { public enum CodingKeys: String, CodingKey { diff --git a/PassepartoutCore/Sources/PassepartoutCore/VPN+Shared.swift b/PassepartoutCore/Sources/PassepartoutCore/VPN+Shared.swift index aa6a1cde..829dd15c 100644 --- a/PassepartoutCore/Sources/PassepartoutCore/VPN+Shared.swift +++ b/PassepartoutCore/Sources/PassepartoutCore/VPN+Shared.swift @@ -24,7 +24,7 @@ // import Foundation -import TunnelKitManager +import TunnelKit import TunnelKitOpenVPN import PassepartoutConstants diff --git a/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Dummy.swift b/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Dummy.swift deleted file mode 100644 index 8b137891..00000000 --- a/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Dummy.swift +++ /dev/null @@ -1 +0,0 @@ - diff --git a/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Exports.swift b/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Exports.swift new file mode 100644 index 00000000..9b506e72 --- /dev/null +++ b/PassepartoutCore/Sources/PassepartoutOpenVPNTunnel/Exports.swift @@ -0,0 +1 @@ +@_exported import TunnelKitOpenVPNAppExtension diff --git a/PassepartoutCore/Tests/PassepartoutCoreTests/ConnectionServiceTests.swift b/PassepartoutCore/Tests/PassepartoutCoreTests/ConnectionServiceTests.swift index 914c9c73..fdd0ca59 100644 --- a/PassepartoutCore/Tests/PassepartoutCoreTests/ConnectionServiceTests.swift +++ b/PassepartoutCore/Tests/PassepartoutCoreTests/ConnectionServiceTests.swift @@ -24,7 +24,7 @@ // import XCTest -import TunnelKitCore +import TunnelKit @testable import PassepartoutCore class ConnectionServiceTests: XCTestCase { diff --git a/PassepartoutCore/Tests/PassepartoutCoreTests/InfrastructureTests.swift b/PassepartoutCore/Tests/PassepartoutCoreTests/InfrastructureTests.swift index 3881a879..b9b1a6c7 100644 --- a/PassepartoutCore/Tests/PassepartoutCoreTests/InfrastructureTests.swift +++ b/PassepartoutCore/Tests/PassepartoutCoreTests/InfrastructureTests.swift @@ -24,7 +24,7 @@ // import XCTest -import TunnelKitCore +import TunnelKit @testable import PassepartoutCore import DTFoundation