diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2022-10-21 13:51:29 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-10-21 15:41:09 +0200 |
| commit | 2dad53758339452115944349e48777c155bba8d3 (patch) | |
| tree | 9befb0255097ce10b929a3da42f4c2b50ad8059c | |
| parent | e72d0d0ead3a872dfca8fb1e239b11651299685d (diff) | |
| download | mullvadvpn-2dad53758339452115944349e48777c155bba8d3.tar.xz mullvadvpn-2dad53758339452115944349e48777c155bba8d3.zip | |
Move PacketTunnelRelay and PacketTunnelStatus to MullvadTypes
| -rw-r--r-- | ios/MullvadTypes/PacketTunnelRelay.swift (renamed from ios/TunnelProviderMessaging/PacketTunnelRelay.swift) | 3 | ||||
| -rw-r--r-- | ios/MullvadTypes/PacketTunnelStatus.swift (renamed from ios/TunnelProviderMessaging/PacketTunnelStatus.swift) | 3 | ||||
| -rw-r--r-- | ios/MullvadVPN.xcodeproj/project.pbxproj | 16 | ||||
| -rw-r--r-- | ios/MullvadVPN/ConnectViewController.swift | 1 | ||||
| -rw-r--r-- | ios/MullvadVPN/SimulatorTunnelProviderHost.swift | 1 | ||||
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/TunnelState.swift | 1 | ||||
| -rw-r--r-- | ios/RelaySelector/RelaySelector.swift | 9 | ||||
| -rw-r--r-- | ios/TunnelProviderMessaging/RelaySelectorResult+PacketTunnelRelay.swift | 21 |
8 files changed, 20 insertions, 35 deletions
diff --git a/ios/TunnelProviderMessaging/PacketTunnelRelay.swift b/ios/MullvadTypes/PacketTunnelRelay.swift index f916dcc02a..ca4ff3eff6 100644 --- a/ios/TunnelProviderMessaging/PacketTunnelRelay.swift +++ b/ios/MullvadTypes/PacketTunnelRelay.swift @@ -1,13 +1,12 @@ // // PacketTunnelRelay.swift -// TunnelProviderMessaging +// MullvadTypes // // Created by pronebird on 21/10/2022. // Copyright © 2022 Mullvad VPN AB. All rights reserved. // import Foundation -import MullvadTypes /// Struct holding tunnel relay information. public struct PacketTunnelRelay: Codable, Equatable { diff --git a/ios/TunnelProviderMessaging/PacketTunnelStatus.swift b/ios/MullvadTypes/PacketTunnelStatus.swift index ad39c68212..a5844fddda 100644 --- a/ios/TunnelProviderMessaging/PacketTunnelStatus.swift +++ b/ios/MullvadTypes/PacketTunnelStatus.swift @@ -1,13 +1,12 @@ // // PacketTunnelStatus.swift -// TunnelProviderMessaging +// MullvadTypes // // Created by pronebird on 27/07/2021. // Copyright © 2021 Mullvad VPN AB. All rights reserved. // import Foundation -import MullvadTypes /// Struct describing packet tunnel process status. public struct PacketTunnelStatus: Codable, Equatable { diff --git a/ios/MullvadVPN.xcodeproj/project.pbxproj b/ios/MullvadVPN.xcodeproj/project.pbxproj index ca05f441b9..12256364e1 100644 --- a/ios/MullvadVPN.xcodeproj/project.pbxproj +++ b/ios/MullvadVPN.xcodeproj/project.pbxproj @@ -124,6 +124,8 @@ 584D26C4270C855B004EA533 /* PreferencesDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26C3270C855A004EA533 /* PreferencesDataSource.swift */; }; 584D26C6270C8741004EA533 /* SettingsDNSTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584D26C5270C8741004EA533 /* SettingsDNSTextCell.swift */; }; 584EBDBD2747C98F00A0C9FD /* NSAttributedString+Markdown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 584EBDBC2747C98F00A0C9FD /* NSAttributedString+Markdown.swift */; }; + 5856AD582902BE1A008E5127 /* PacketTunnelRelay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2B62902A9EA00EB5EBA /* PacketTunnelRelay.swift */; }; + 5856AD592902BE1A008E5127 /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; 5857F24324C8662600CF6F47 /* SelectLocationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5857F24224C8662600CF6F47 /* SelectLocationHeaderView.swift */; }; 5857F24724C882D700CF6F47 /* SelectLocationNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5857F24624C882D700CF6F47 /* SelectLocationNavigationController.swift */; }; 585B4B8726D9098900555C4C /* TunnelStatusNotificationProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58A94AE326CFD945001CB97C /* TunnelStatusNotificationProvider.swift */; }; @@ -194,8 +196,6 @@ 5898D2A129017EF400EB5EBA /* libRelaySelector.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5898D29829017DAC00EB5EBA /* libRelaySelector.a */; }; 5898D2A22901801000EB5EBA /* MullvadREST.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 06799ABC28F98E1D00ACD94E /* MullvadREST.framework */; }; 5898D2A32901807500EB5EBA /* MullvadEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5840250322B11AB700E4CFEC /* MullvadEndpoint.swift */; }; - 5898D2A52901815E00EB5EBA /* RelaySelectorResult+PacketTunnelRelay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2A42901815E00EB5EBA /* RelaySelectorResult+PacketTunnelRelay.swift */; }; - 5898D2A62901820C00EB5EBA /* PacketTunnelStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */; }; 5898D2A8290182B000EB5EBA /* TunnelProviderReply.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2A7290182B000EB5EBA /* TunnelProviderReply.swift */; }; 5898D2A92901844E00EB5EBA /* libRelaySelector.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5898D29829017DAC00EB5EBA /* libRelaySelector.a */; }; 5898D2AA2901844E00EB5EBA /* libTunnelProviderMessaging.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5898D28929017BD400EB5EBA /* libTunnelProviderMessaging.a */; }; @@ -205,7 +205,6 @@ 5898D2B32902A8F000EB5EBA /* RelayLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2AF2902A67C00EB5EBA /* RelayLocation.swift */; }; 5898D2B42902A8F000EB5EBA /* RelayConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58781CC822AE7CA8009B9D8E /* RelayConstraints.swift */; }; 5898D2B52902A8F000EB5EBA /* RelayConstraint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2B12902A6DE00EB5EBA /* RelayConstraint.swift */; }; - 5898D2B72902A9EA00EB5EBA /* PacketTunnelRelay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5898D2B62902A9EA00EB5EBA /* PacketTunnelRelay.swift */; }; 5898D2B82902ABC400EB5EBA /* KeychainError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58AEEF642344A36000C9BBD5 /* KeychainError.swift */; }; 589A454C28DDF5E100565204 /* Swizzle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 589A454B28DDF5E100565204 /* Swizzle.swift */; }; 589A455628E094B300565204 /* libOperations.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58E5126528DDF04200B0BCDE /* libOperations.a */; }; @@ -662,7 +661,6 @@ 5896CEF126972DEB00B0FAE8 /* AccountContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountContentView.swift; sourceTree = "<group>"; }; 5898D28929017BD400EB5EBA /* libTunnelProviderMessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTunnelProviderMessaging.a; sourceTree = BUILT_PRODUCTS_DIR; }; 5898D29829017DAC00EB5EBA /* libRelaySelector.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRelaySelector.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 5898D2A42901815E00EB5EBA /* RelaySelectorResult+PacketTunnelRelay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RelaySelectorResult+PacketTunnelRelay.swift"; sourceTree = "<group>"; }; 5898D2A7290182B000EB5EBA /* TunnelProviderReply.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TunnelProviderReply.swift; sourceTree = "<group>"; }; 5898D2AD290185D200EB5EBA /* ProxyURLResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProxyURLResponse.swift; sourceTree = "<group>"; }; 5898D2AF2902A67C00EB5EBA /* RelayLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayLocation.swift; sourceTree = "<group>"; }; @@ -994,6 +992,8 @@ 5898D2B12902A6DE00EB5EBA /* RelayConstraint.swift */, 58781CC822AE7CA8009B9D8E /* RelayConstraints.swift */, 5898D2AF2902A67C00EB5EBA /* RelayLocation.swift */, + 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */, + 5898D2B62902A9EA00EB5EBA /* PacketTunnelRelay.swift */, ); path = MullvadTypes; sourceTree = "<group>"; @@ -1077,11 +1077,8 @@ isa = PBXGroup; children = ( 587C575226D2615F005EF767 /* PacketTunnelOptions.swift */, - 585DA89826B0329200B8C587 /* PacketTunnelStatus.swift */, - 5898D2B62902A9EA00EB5EBA /* PacketTunnelRelay.swift */, 063687AF28EB083800BE7161 /* ProxyURLRequest.swift */, 5898D2AD290185D200EB5EBA /* ProxyURLResponse.swift */, - 5898D2A42901815E00EB5EBA /* RelaySelectorResult+PacketTunnelRelay.swift */, 585DA89226B0323E00B8C587 /* TunnelProviderMessage.swift */, 5898D2A7290182B000EB5EBA /* TunnelProviderReply.swift */, ); @@ -1948,9 +1945,11 @@ 586A95172901344A007BAF2B /* IPAddress+Codable.swift in Sources */, 063F026729002768001FA09F /* Cancellable.swift in Sources */, 586A9516290133ED007BAF2B /* AnyIPAddress.swift in Sources */, + 5856AD592902BE1A008E5127 /* PacketTunnelStatus.swift in Sources */, 5898D2A32901807500EB5EBA /* MullvadEndpoint.swift in Sources */, 5898D2B32902A8F000EB5EBA /* RelayLocation.swift in Sources */, 063F026A29002E44001FA09F /* IPv4Endpoint.swift in Sources */, + 5856AD582902BE1A008E5127 /* PacketTunnelRelay.swift in Sources */, 586A95122901321B007BAF2B /* IPv6Endpoint.swift in Sources */, 581943FA28F801B500B0CB5E /* WrappingError.swift in Sources */, ); @@ -1961,11 +1960,8 @@ buildActionMask = 2147483647; files = ( 5898D29129017C3100EB5EBA /* TunnelProviderMessage.swift in Sources */, - 5898D2A62901820C00EB5EBA /* PacketTunnelStatus.swift in Sources */, - 5898D2A52901815E00EB5EBA /* RelaySelectorResult+PacketTunnelRelay.swift in Sources */, 5898D29029017BEE00EB5EBA /* PacketTunnelOptions.swift in Sources */, 5898D2AE290185D200EB5EBA /* ProxyURLResponse.swift in Sources */, - 5898D2B72902A9EA00EB5EBA /* PacketTunnelRelay.swift in Sources */, 5898D29229017CA000EB5EBA /* ProxyURLRequest.swift in Sources */, 5898D2A8290182B000EB5EBA /* TunnelProviderReply.swift in Sources */, ); diff --git a/ios/MullvadVPN/ConnectViewController.swift b/ios/MullvadVPN/ConnectViewController.swift index 4f2ad13bc6..cb66dcccc7 100644 --- a/ios/MullvadVPN/ConnectViewController.swift +++ b/ios/MullvadVPN/ConnectViewController.swift @@ -8,6 +8,7 @@ import MapKit import MullvadLogging +import MullvadTypes import TunnelProviderMessaging import UIKit diff --git a/ios/MullvadVPN/SimulatorTunnelProviderHost.swift b/ios/MullvadVPN/SimulatorTunnelProviderHost.swift index d06a404f9a..688a6af3bc 100644 --- a/ios/MullvadVPN/SimulatorTunnelProviderHost.swift +++ b/ios/MullvadVPN/SimulatorTunnelProviderHost.swift @@ -11,6 +11,7 @@ import Foundation import MullvadLogging import MullvadREST +import MullvadTypes import enum NetworkExtension.NEProviderStopReason import RelayCache import RelaySelector diff --git a/ios/MullvadVPN/TunnelManager/TunnelState.swift b/ios/MullvadVPN/TunnelManager/TunnelState.swift index 9e6e3a68d7..176f58e514 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelState.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelState.swift @@ -7,6 +7,7 @@ // import Foundation +import MullvadTypes import TunnelProviderMessaging /// A struct describing the tunnel status. diff --git a/ios/RelaySelector/RelaySelector.swift b/ios/RelaySelector/RelaySelector.swift index bc88795b7d..9c3472cf74 100644 --- a/ios/RelaySelector/RelaySelector.swift +++ b/ios/RelaySelector/RelaySelector.swift @@ -171,6 +171,15 @@ public struct RelaySelectorResult: Codable { public var endpoint: MullvadEndpoint public var relay: REST.ServerRelay public var location: Location + + public var packetTunnelRelay: PacketTunnelRelay { + return PacketTunnelRelay( + ipv4Relay: endpoint.ipv4Relay, + ipv6Relay: endpoint.ipv6Relay, + hostname: relay.hostname, + location: location + ) + } } private struct RelayWithLocation { diff --git a/ios/TunnelProviderMessaging/RelaySelectorResult+PacketTunnelRelay.swift b/ios/TunnelProviderMessaging/RelaySelectorResult+PacketTunnelRelay.swift deleted file mode 100644 index 16fa3069d9..0000000000 --- a/ios/TunnelProviderMessaging/RelaySelectorResult+PacketTunnelRelay.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// RelaySelectorResult+PacketTunnelRelay.swift -// TunnelProviderMessaging -// -// Created by pronebird on 20/10/2022. -// Copyright © 2022 Mullvad VPN AB. All rights reserved. -// - -import Foundation -import RelaySelector - -extension RelaySelectorResult { - public var packetTunnelRelay: PacketTunnelRelay { - return PacketTunnelRelay( - ipv4Relay: endpoint.ipv4Relay, - ipv6Relay: endpoint.ipv6Relay, - hostname: relay.hostname, - location: location - ) - } -} |
