summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/RelayList.swift35
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]
+}