Update TunnelKit with BoringSSL

- Optimize package granularity and imports
- Adjust targets to smaller TunnelKit components
- Raise iOS target to 13
- Drop support for TLS security level
This commit is contained in:
Davide De Rosa 2021-11-06 21:50:31 +01:00
parent 7ecbd48e18
commit 8833c4dbab
81 changed files with 51 additions and 158 deletions

View File

@ -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;

View File

@ -24,11 +24,7 @@
//
import Foundation
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitManager
import TunnelKitOpenVPN
public protocol UIDescriptible {
var uiDescription: String { get }

View File

@ -25,9 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitOpenVPN
import Convenience
private let log = SwiftyBeaver.self

View File

@ -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 {

View File

@ -25,10 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitOpenVPN
private let log = SwiftyBeaver.self

View File

@ -25,10 +25,7 @@
import Foundation
import MessageUI
import PassepartoutConstants
import PassepartoutCore
import TunnelKitManager
import TunnelKitOpenVPN
class IssueReporter: NSObject {
static let shared = IssueReporter()

View File

@ -24,7 +24,6 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
extension UIView {

View File

@ -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)

View File

@ -26,7 +26,6 @@
import UIKit
import MessageUI
import StoreKit
import PassepartoutConstants
import PassepartoutCore
struct Theme {

View File

@ -26,7 +26,6 @@
import Foundation
import Intents
import SwiftyBeaver
import TunnelKitManager
import PassepartoutCore
private let log = SwiftyBeaver.self

View File

@ -24,7 +24,6 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
import Convenience
import ConvenienceUI

View File

@ -24,7 +24,6 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -24,7 +24,7 @@
//
import Foundation
import TunnelKitOpenVPN
import PassepartoutCore
protocol ConfigurationModificationDelegate: AnyObject {
func configuration(didUpdate newConfiguration: OpenVPN.Configuration)

View File

@ -25,10 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitOpenVPN
import ConvenienceUI
private let log = SwiftyBeaver.self

View File

@ -25,9 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitManager
private let log = SwiftyBeaver.self

View File

@ -24,9 +24,7 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import ConvenienceUI
protocol EndpointViewControllerDelegate: AnyObject {

View File

@ -25,9 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import ConvenienceUI
private let log = SwiftyBeaver.self

View File

@ -26,7 +26,6 @@
import UIKit
import StoreKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import Convenience
import ConvenienceUI

View File

@ -24,9 +24,7 @@
//
import UIKit
import TunnelKitCore
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
private let log = SwiftyBeaver.self

View File

@ -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

View File

@ -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

View File

@ -25,7 +25,6 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -24,7 +24,6 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -24,7 +24,6 @@
//
import UIKit
import PassepartoutConstants
import PassepartoutCore
protocol ProviderPresetViewControllerDelegate: AnyObject {

View File

@ -25,7 +25,6 @@
import UIKit
import StoreKit
import PassepartoutConstants
import PassepartoutCore
import SwiftyBeaver
import ConvenienceUI

View File

@ -25,10 +25,7 @@
import UIKit
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitOpenVPN
import ConvenienceUI
private let log = SwiftyBeaver.self

View File

@ -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

View File

@ -25,7 +25,6 @@
import UIKit
import Intents
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -26,7 +26,6 @@
import UIKit
import Intents
import IntentsUI
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -26,7 +26,6 @@
import UIKit
import Intents
import IntentsUI
import PassepartoutConstants
import PassepartoutCore
import ConvenienceUI

View File

@ -24,10 +24,8 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import Convenience
import TunnelKitCore
import ServiceManagement
// comment on release

View File

@ -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

View File

@ -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()

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
class Macros {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
protocol TextInputViewControllerDelegate: AnyObject {

View File

@ -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
}

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
struct Theme {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
class WindowManager: NSObject {

View File

@ -25,11 +25,7 @@
import Cocoa
import StoreKit
import PassepartoutConstants
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitManager
import Convenience
class StatusMenu: NSObject {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
protocol OrganizerProfileTableViewDelegate: AnyObject {

View File

@ -25,9 +25,7 @@
import Cocoa
import SwiftyBeaver
import PassepartoutConstants
import PassepartoutCore
import TunnelKitManager
private let log = SwiftyBeaver.self

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitManager
class DebugLogViewController: NSViewController {
@IBOutlet private weak var labelExchangedCaption: NSTextField!

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import ServiceManagement

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
class PreferencesViewController: NSViewController {

View File

@ -25,7 +25,6 @@
import Cocoa
import StoreKit
import PassepartoutConstants
import PassepartoutCore
import SwiftyBeaver
import Convenience

View File

@ -24,8 +24,6 @@
//
import Cocoa
import TunnelKitCore
import PassepartoutConstants
import PassepartoutCore
protocol AccountViewControllerDelegate: AnyObject {

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitOpenVPN
class ConfigurationViewController: NSViewController, ProfileCustomization {
private struct Columns {

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
class DNSViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var popupChoice: NSPopUpButton!

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitOpenVPN
class DefaultGatewayViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var popupChoice: NSPopUpButton!

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
class EndpointViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var labelAddressCaption: NSTextField!

View File

@ -24,9 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
class MTUViewController: NSViewController, ProfileCustomization {
@IBOutlet private weak var popupChoice: NSPopUpButton!

View File

@ -24,10 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitOpenVPN
protocol ProfileCustomization: AnyObject {
var profile: ConnectionProfile? { get set }

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
class ProxyViewController: NSViewController, ProfileCustomization {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
protocol TrustedNetworksAddViewControllerDelegate: AnyObject {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
class TrustedNetworksViewController: NSViewController, ProfileCustomization {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
protocol HostServiceViewDelegate: AnyObject {

View File

@ -24,7 +24,6 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
protocol ProviderServiceViewDelegate: AnyObject {

View File

@ -24,10 +24,7 @@
//
import Cocoa
import PassepartoutConstants
import PassepartoutCore
import TunnelKitCore
import TunnelKitManager
import SwiftyBeaver
import Convenience

View File

@ -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) {

View File

@ -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
}
}

View File

@ -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(

View File

@ -0,0 +1,3 @@
@_exported import PassepartoutConstants
@_exported import TunnelKit
@_exported import TunnelKitOpenVPN

View File

@ -24,7 +24,6 @@
//
import Foundation
import TunnelKitCore
#if os(iOS)
import MessageUI
#endif

View File

@ -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 {

View File

@ -25,8 +25,7 @@
import Foundation
import SwiftyBeaver
import TunnelKitCore
import TunnelKitAppExtension
import TunnelKit
import PassepartoutConstants
private let log = SwiftyBeaver.self

View File

@ -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)
}

View File

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

View File

@ -25,8 +25,7 @@
import Foundation
import SwiftyBeaver
import TunnelKitCore
import TunnelKitManager
import TunnelKit
private let log = SwiftyBeaver.self

View File

@ -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

View File

@ -24,7 +24,7 @@
//
import Foundation
import TunnelKitCore
import TunnelKit
import TunnelKitOpenVPN
public enum NetworkChoice: String, Codable {

View File

@ -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
}

View File

@ -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")
}

View File

@ -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?")
}

View File

@ -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"

View File

@ -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()
}

View File

@ -24,7 +24,7 @@
//
import Foundation
import TunnelKitCore
import TunnelKit
public class Pool: Codable, Hashable {
public enum CodingKeys: String, CodingKey {

View File

@ -24,7 +24,7 @@
//
import Foundation
import TunnelKitManager
import TunnelKit
import TunnelKitOpenVPN
import PassepartoutConstants

View File

@ -0,0 +1 @@
@_exported import TunnelKitOpenVPNAppExtension

View File

@ -24,7 +24,7 @@
//
import XCTest
import TunnelKitCore
import TunnelKit
@testable import PassepartoutCore
class ConnectionServiceTests: XCTestCase {

View File

@ -24,7 +24,7 @@
//
import XCTest
import TunnelKitCore
import TunnelKit
@testable import PassepartoutCore
import DTFoundation