summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorBug Magnet <marco.nikic@mullvad.net>2023-09-11 14:38:59 +0200
committerBug Magnet <marco.nikic@mullvad.net>2023-09-11 14:58:50 +0200
commitb23b5f3a0792c782e5e1dfd4717d414ccb7d4c2c (patch)
treec792ad21e0e96e8928faf8b915e6d45057815b06 /ios
parent4d28de5b6add61bf879031dfe5271393134df924 (diff)
downloadmullvadvpn-b23b5f3a0792c782e5e1dfd4717d414ccb7d4c2c.tar.xz
mullvadvpn-b23b5f3a0792c782e5e1dfd4717d414ccb7d4c2c.zip
Re enable extensions on NetworkExtension types that were accidentally removed
Diffstat (limited to 'ios')
-rw-r--r--ios/MullvadVPN/SimulatorTunnelProvider/SimulatorTunnelProvider.swift22
-rw-r--r--ios/MullvadVPN/TunnelManager/VPNConnectionProtocol.swift22
2 files changed, 22 insertions, 22 deletions
diff --git a/ios/MullvadVPN/SimulatorTunnelProvider/SimulatorTunnelProvider.swift b/ios/MullvadVPN/SimulatorTunnelProvider/SimulatorTunnelProvider.swift
index bfbc9cb301..64b8b55b17 100644
--- a/ios/MullvadVPN/SimulatorTunnelProvider/SimulatorTunnelProvider.swift
+++ b/ios/MullvadVPN/SimulatorTunnelProvider/SimulatorTunnelProvider.swift
@@ -11,28 +11,6 @@ import NetworkExtension
#if targetEnvironment(simulator)
-protocol VPNTunnelProviderManagerProtocol: Equatable {
- associatedtype SelfType: VPNTunnelProviderManagerProtocol
- associatedtype ConnectionType: VPNConnectionProtocol
-
- var isEnabled: Bool { get set }
- var protocolConfiguration: NEVPNProtocol? { get set }
- var localizedDescription: String? { get set }
- var connection: ConnectionType { get }
-
- init()
-
- func loadFromPreferences(completionHandler: @escaping (Error?) -> Void)
- func saveToPreferences(completionHandler: ((Error?) -> Void)?)
- func removeFromPreferences(completionHandler: ((Error?) -> Void)?)
-
- static func loadAllFromPreferences(completionHandler: @escaping ([SelfType]?, Error?) -> Void)
-}
-
-extension NEVPNConnection: VPNConnectionProtocol {}
-extension NETunnelProviderSession: VPNTunnelProviderSessionProtocol {}
-extension NETunnelProviderManager: VPNTunnelProviderManagerProtocol {}
-
class SimulatorTunnelProviderDelegate {
var connection: SimulatorVPNConnection?
diff --git a/ios/MullvadVPN/TunnelManager/VPNConnectionProtocol.swift b/ios/MullvadVPN/TunnelManager/VPNConnectionProtocol.swift
index fbf9280b9b..43f4cfe975 100644
--- a/ios/MullvadVPN/TunnelManager/VPNConnectionProtocol.swift
+++ b/ios/MullvadVPN/TunnelManager/VPNConnectionProtocol.swift
@@ -9,6 +9,24 @@
import Foundation
import NetworkExtension
+protocol VPNTunnelProviderManagerProtocol: Equatable {
+ associatedtype SelfType: VPNTunnelProviderManagerProtocol
+ associatedtype ConnectionType: VPNConnectionProtocol
+
+ var isEnabled: Bool { get set }
+ var protocolConfiguration: NEVPNProtocol? { get set }
+ var localizedDescription: String? { get set }
+ var connection: ConnectionType { get }
+
+ init()
+
+ func loadFromPreferences(completionHandler: @escaping (Error?) -> Void)
+ func saveToPreferences(completionHandler: ((Error?) -> Void)?)
+ func removeFromPreferences(completionHandler: ((Error?) -> Void)?)
+
+ static func loadAllFromPreferences(completionHandler: @escaping ([SelfType]?, Error?) -> Void)
+}
+
protocol VPNConnectionProtocol: NSObject {
var status: NEVPNStatus { get }
var connectedDate: Date? { get }
@@ -21,3 +39,7 @@ protocol VPNConnectionProtocol: NSObject {
protocol VPNTunnelProviderSessionProtocol {
func sendProviderMessage(_ messageData: Data, responseHandler: ((Data?) -> Void)?) throws
}
+
+extension NEVPNConnection: VPNConnectionProtocol {}
+extension NETunnelProviderSession: VPNTunnelProviderSessionProtocol {}
+extension NETunnelProviderManager: VPNTunnelProviderManagerProtocol {}