Skip to content

Commit

Permalink
TMP: Set includeAllNetworks and excludeLocalNetworks
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkisemils committed Dec 5, 2024
1 parent 5b9d284 commit b40bf65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 6 additions & 7 deletions ios/MullvadTypes/Protocols/EphemeralPeerReceiver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,24 @@ public class EphemeralPeerReceiver: EphemeralPeerReceiving, TunnelProvider {
}

unowned let tunnelProvider: any TunnelProvider
let keyReceiver: any EphemeralPeerReceiving

public init(tunnelProvider: TunnelProvider, keyReceiver: any EphemeralPeerReceiving) {
public init(tunnelProvider: TunnelProvider, keyReceiver: any EphemeralPeerReceiving ) {
self.tunnelProvider = tunnelProvider
self.keyReceiver = keyReceiver
}

// MARK: - EphemeralPeerReceiving

public func receivePostQuantumKey(_ key: PreSharedKey, ephemeralKey: PrivateKey) {
guard let receiver = tunnelProvider as? EphemeralPeerReceiving else { return }
receiver.receivePostQuantumKey(key, ephemeralKey: ephemeralKey)
keyReceiver.receivePostQuantumKey(key, ephemeralKey: ephemeralKey)
}

public func receiveEphemeralPeerPrivateKey(_ ephemeralPeerPrivateKey: PrivateKey) {
guard let receiver = tunnelProvider as? EphemeralPeerReceiving else { return }
receiver.receiveEphemeralPeerPrivateKey(ephemeralPeerPrivateKey)
keyReceiver.receiveEphemeralPeerPrivateKey(ephemeralPeerPrivateKey)
}

public func ephemeralPeerExchangeFailed() {
guard let receiver = tunnelProvider as? EphemeralPeerReceiving else { return }
receiver.ephemeralPeerExchangeFailed()
keyReceiver.ephemeralPeerExchangeFailed()
}
}
2 changes: 2 additions & 0 deletions ios/MullvadVPN/TunnelManager/StartTunnelOperation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ class StartTunnelOperation: ResultOperation<Void> {
let protocolConfig = NETunnelProviderProtocol()
protocolConfig.providerBundleIdentifier = ApplicationTarget.packetTunnel.bundleIdentifier
protocolConfig.serverAddress = ""
protocolConfig.includeAllNetworks = true
protocolConfig.excludeLocalNetworks = false

let alwaysOnRule = NEOnDemandRuleConnect()
alwaysOnRule.interfaceTypeMatch = .any
Expand Down

0 comments on commit b40bf65

Please sign in to comment.