diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2019-05-02 15:04:50 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2019-05-14 15:00:56 +0200 |
| commit | c4cf8d870af5ba96dada7ef5514e28eb307b0312 (patch) | |
| tree | 912bab01e74d395393db5365c5f8fbd9f12e0621 | |
| parent | 38ed8b68dc98be0f160f891ee1f7ad5df4549bce (diff) | |
| download | mullvadvpn-c4cf8d870af5ba96dada7ef5514e28eb307b0312.tar.xz mullvadvpn-c4cf8d870af5ba96dada7ef5514e28eb307b0312.zip | |
Add RelayList types
| -rw-r--r-- | ios/MullvadVPN/RelayList.swift | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ios/MullvadVPN/RelayList.swift b/ios/MullvadVPN/RelayList.swift new file mode 100644 index 0000000000..07a34b07db --- /dev/null +++ b/ios/MullvadVPN/RelayList.swift @@ -0,0 +1,35 @@ + +// +// RelayList.swift +// MullvadVPN +// +// Created by pronebird on 02/05/2019. +// Copyright © 2019 Amagicom AB. All rights reserved. +// + +import Foundation + +struct RelayList: Decodable { + struct Country: Decodable { + let name: String + let code: String + let cities: [City] + } + + struct City: Decodable { + let name: String + let code: String + let latitude: Double + let longitude: Double + let relays: [Hostname] + } + + struct Hostname: Decodable { + let hostname: String + let ipv4AddrIn: String + let includeInCountry: Bool + let weight: Int32 + } + + let countries: [Country] +} |
