diff options
Diffstat (limited to 'WireGuard/Shared/Model/Legacy/LegacyPeerConfiguration.swift')
-rw-r--r-- | WireGuard/Shared/Model/Legacy/LegacyPeerConfiguration.swift | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/WireGuard/Shared/Model/Legacy/LegacyPeerConfiguration.swift b/WireGuard/Shared/Model/Legacy/LegacyPeerConfiguration.swift deleted file mode 100644 index 5a61b4a..0000000 --- a/WireGuard/Shared/Model/Legacy/LegacyPeerConfiguration.swift +++ /dev/null @@ -1,29 +0,0 @@ -// SPDX-License-Identifier: MIT -// Copyright © 2018 WireGuard LLC. All Rights Reserved. - -import Foundation - -struct LegacyPeerConfiguration: Codable { - let publicKey: Data - let preSharedKey: Data? - let allowedIPs: [LegacyIPAddressRange] - let endpoint: LegacyEndpoint? - let persistentKeepAlive: UInt16? -} - -extension LegacyPeerConfiguration { - var migrated: PeerConfiguration { - var configuration = PeerConfiguration(publicKey: publicKey) - configuration.preSharedKey = preSharedKey - configuration.allowedIPs = allowedIPs.migrated - configuration.endpoint = endpoint?.migrated - configuration.persistentKeepAlive = persistentKeepAlive - return configuration - } -} - -extension Array where Element == LegacyPeerConfiguration { - var migrated: [PeerConfiguration] { - return map { $0.migrated } - } -} |