-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'show-outgoing-address-in-connection-view-ios-301'
- Loading branch information
Showing
17 changed files
with
585 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
} | ||
} |
Oops, something went wrong.