diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-08-01 20:39:34 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2019-08-02 22:13:23 +0000 |
| commit | c4839a5a82b9f3fcc82533c1c2c6e44ef9b88e58 (patch) | |
| tree | df37ef0517c65f350a3f2aacdd4d0965445c5fb5 /android/src | |
| parent | 3b94c972586c02b8ea0cdfc5a0e449504e71d4d4 (diff) | |
| download | mullvadvpn-c4839a5a82b9f3fcc82533c1c2c6e44ef9b88e58.tar.xz mullvadvpn-c4839a5a82b9f3fcc82533c1c2c6e44ef9b88e58.zip | |
Include output IP addresses in `GeoIpLocation`
Diffstat (limited to 'android/src')
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt | 12 | ||||
| -rw-r--r-- | android/src/main/kotlin/net/mullvad/mullvadvpn/model/GeoIpLocation.kt | 10 |
2 files changed, 19 insertions, 3 deletions
diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt index 2f3b6fc84b..2cfa32883b 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/dataproxy/LocationInfoCache.kt @@ -63,9 +63,17 @@ class LocationInfoCache( val relayItem = relayListListener.selectedRelayItem when (relayItem) { - is RelayCountry -> return GeoIpLocation(relayItem.name, null, null) - is RelayCity -> return GeoIpLocation(relayItem.country.name, relayItem.name, null) + is RelayCountry -> return GeoIpLocation(null, null, relayItem.name, null, null) + is RelayCity -> return GeoIpLocation( + null, + null, + relayItem.country.name, + relayItem.name, + null + ) is Relay -> return GeoIpLocation( + null, + null, relayItem.city.country.name, relayItem.city.name, relayItem.name diff --git a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/GeoIpLocation.kt b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/GeoIpLocation.kt index ed7ccb7e66..1f4acef73f 100644 --- a/android/src/main/kotlin/net/mullvad/mullvadvpn/model/GeoIpLocation.kt +++ b/android/src/main/kotlin/net/mullvad/mullvadvpn/model/GeoIpLocation.kt @@ -1,3 +1,11 @@ package net.mullvad.mullvadvpn.model -data class GeoIpLocation(val country: String, val city: String?, val hostname: String?) +import java.net.InetAddress + +data class GeoIpLocation( + val ipv4: InetAddress?, + val ipv6: InetAddress?, + val country: String, + val city: String?, + val hostname: String? +) |
