blob: 9e3aa25cea4dcb96a60d30daf02fa3d7a1f543f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
//
// OutgoingConnectionData.swift
// MullvadVPN
//
// Created by Mojgan on 2023-11-15.
// Copyright © 2023 Mullvad VPN AB. All rights reserved.
//
import Foundation
import Network
typealias IPV4ConnectionData = OutgoingConnectionData<IPv4Address>
typealias IPV6ConnectionData = OutgoingConnectionData<IPv6Address>
// MARK: - OutgoingConnectionData
struct OutgoingConnectionData<T: Codable & IPAddress>: Codable, Equatable {
let ip: T
let exitIP: Bool
enum CodingKeys: String, CodingKey {
case ip, exitIP = "mullvad_exit_ip"
}
static func == (lhs: Self, rhs: Self) -> Bool {
lhs.ip.rawValue == rhs.ip.rawValue && lhs.exitIP == rhs.exitIP
}
}
|