Skip to content

Commit

Permalink
Merge branch 'fix-blocked-state-leaks'
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkisemils committed Nov 22, 2023
2 parents 6dc527e + 6cd825b commit 285cf6f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ios/PacketTunnelCore/Actor/PacketTunnelActor+ErrorState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//

import Foundation
import MullvadTypes
import Network
import WireGuardKitTypes

extension PacketTunnelActor {
Expand Down Expand Up @@ -114,7 +116,15 @@ extension PacketTunnelActor {
privateKey: PrivateKey(),
interfaceAddresses: []
)
try await tunnelAdapter.start(configuration: configurationBuilder.makeConfiguration())
var config = try configurationBuilder.makeConfiguration()
config.dns = [IPv4Address.loopback]
config.interfaceAddresses = [IPAddressRange(from: "10.64.0.1/8")!]
config.peer = TunnelPeer(
endpoint: .ipv4(IPv4Endpoint(string: "127.0.0.1:9090")!),
publicKey: PrivateKey().publicKey
)
try? await tunnelAdapter.stop()
try await tunnelAdapter.start(configuration: config)
} catch {
logger.error(error: error, message: "Unable to configure the tunnel for error state.")
}
Expand Down

0 comments on commit 285cf6f

Please sign in to comment.