Skip to content

Commit

Permalink
Moving MullvadTransport into MullvadREST
Browse files Browse the repository at this point in the history
  • Loading branch information
mojganii authored and buggmagnet committed Dec 11, 2023
1 parent fef5f92 commit fa4bc70
Show file tree
Hide file tree
Showing 39 changed files with 76 additions and 575 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ publish = false
resolver = "2"
members = [
"android/translations-converter",
"ios/MullvadTransport/shadowsocks-proxy",
"ios/MullvadREST/shadowsocks-proxy",
"ios/TunnelObfuscation/tunnel-obfuscator-proxy",
"mullvad-daemon",
"mullvad-cli",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

import Foundation
import MullvadREST
import MullvadTypes

private let defaultPort: UInt16 = 53
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@

import Foundation
import Logging
import MullvadREST
import MullvadTypes
import RelaySelector

public final class TransportProvider: RESTTransportProvider {
private let urlSessionTransport: URLSessionTransport
private let urlSessionTransport: REST.URLSessionTransport
private let relayCache: RelayCacheProtocol
private let logger = Logger(label: "TransportProvider")
private let addressCache: REST.AddressCache
Expand All @@ -26,7 +24,7 @@ public final class TransportProvider: RESTTransportProvider {
private let constraintsUpdater: RelayConstraintsUpdater

public init(
urlSessionTransport: URLSessionTransport,
urlSessionTransport: REST.URLSessionTransport,
relayCache: RelayCacheProtocol,
addressCache: REST.AddressCache,
shadowsocksCache: ShadowsocksConfigurationCache,
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions ios/MullvadTransport/Info.plist

This file was deleted.

19 changes: 0 additions & 19 deletions ios/MullvadTransport/MullvadTransport.h

This file was deleted.

33 changes: 0 additions & 33 deletions ios/MullvadTransport/URLSessionTransport.swift

This file was deleted.

487 changes: 69 additions & 418 deletions ios/MullvadVPN.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

3 changes: 1 addition & 2 deletions ios/MullvadVPN/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import BackgroundTasks
import MullvadLogging
import MullvadREST
import MullvadSettings
import MullvadTransport
import MullvadTypes
import Operations
import StoreKit
Expand Down Expand Up @@ -84,7 +83,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
transactionLog: .default
)

let urlSessionTransport = URLSessionTransport(urlSession: REST.makeURLSession())
let urlSessionTransport = REST.URLSessionTransport(urlSession: REST.makeURLSession())
let shadowsocksCache = ShadowsocksConfigurationCache(cacheDirectory: containerURL)

// This init cannot fail as long as the security group identifier is valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ import Foundation
import MullvadLogging
import MullvadREST
import MullvadSettings
import MullvadTransport
import MullvadTypes
import NetworkExtension
import PacketTunnelCore
import RelaySelector

final class SimulatorTunnelProviderHost: SimulatorTunnelProviderDelegate {
private var observedState: ObservedState = .disconnected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import Foundation
import MullvadREST
import MullvadTransport
import MullvadTypes
import Operations
import PacketTunnelCore
Expand Down
2 changes: 0 additions & 2 deletions ios/MullvadVPN/TransportMonitor/TransportMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import Foundation
import MullvadLogging
import MullvadREST
import MullvadTransport
import MullvadTypes
import RelaySelector

final class TransportMonitor: RESTTransportProvider {
private let tunnelManager: TunnelManager
Expand Down
1 change: 0 additions & 1 deletion ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import NetworkExtension
import Operations
import PacketTunnelCore
import MullvadREST
import RelaySelector

class StartTunnelOperation: ResultOperation<Void> {
typealias EncodeErrorHandler = (Error) -> Void
Expand Down
1 change: 0 additions & 1 deletion ios/MullvadVPN/TunnelManager/Tunnel+Messaging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import MullvadREST
import MullvadTypes
import Operations
import PacketTunnelCore
import RelaySelector

/// Shared operation queue used for IPC requests.
private let operationQueue = AsyncOperationQueue()
Expand Down
1 change: 0 additions & 1 deletion ios/MullvadVPN/TunnelManager/TunnelManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import MullvadTypes
import NetworkExtension
import Operations
import PacketTunnelCore
import RelaySelector
import StoreKit
import UIKit
import WireGuardKitTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import MullvadREST
import MullvadTypes
import RelaySelector
import UIKit

protocol LocationDataSourceItemProtocol {
Expand Down
2 changes: 1 addition & 1 deletion ios/MullvadVPNTests/CoordinatesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

import CoreLocation
@testable import RelaySelector
@testable import MullvadREST
import XCTest

final class CoordinatesTests: XCTestCase {
Expand Down
1 change: 0 additions & 1 deletion ios/MullvadVPNTests/RelayCacheTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

@testable import MullvadREST
import MullvadTransport
import XCTest

final class RelayCacheTests: XCTestCase {
Expand Down
1 change: 0 additions & 1 deletion ios/MullvadVPNTests/RelaySelectorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
@testable import MullvadREST
import MullvadTypes
import Network
import RelaySelector
import XCTest

private let portRanges: [[UInt16]] = [[4000, 4001], [5000, 5001]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import MullvadREST
import MullvadSettings
import MullvadTypes
import PacketTunnelCore
import RelaySelector
import WireGuardKit

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import Foundation
import MullvadLogging
import MullvadREST
import MullvadTransport
import MullvadTypes
import NetworkExtension
import PacketTunnelCore
Expand Down Expand Up @@ -37,7 +36,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
let relayCache = RelayCache(cacheDirectory: containerURL)

let urlSession = REST.makeURLSession()
let urlSessionTransport = URLSessionTransport(urlSession: urlSession)
let urlSessionTransport = REST.URLSessionTransport(urlSession: urlSession)
let shadowsocksCache = ShadowsocksConfigurationCache(cacheDirectory: containerURL)

// This init cannot fail as long as the security group identifier is valid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Foundation
import MullvadTypes
import PacketTunnelCore
import MullvadREST
import RelaySelector

struct RelaySelectorWrapper: RelaySelectorProtocol {
let relayCache: RelayCache
Expand Down
1 change: 0 additions & 1 deletion ios/PacketTunnelCoreTests/AppMessageHandlerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Combine
@testable import MullvadREST
import MullvadTypes
import PacketTunnelCore
import RelaySelector
import XCTest

final class AppMessageHandlerTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion ios/PacketTunnelCoreTests/PacketTunnelActorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Combine
import MullvadTypes
import Network
@testable import PacketTunnelCore
@testable import RelaySelector
@testable import MullvadREST
import WireGuardKitTypes
import XCTest

Expand Down

0 comments on commit fa4bc70

Please sign in to comment.