diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-10-05 11:20:09 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-10-05 15:50:40 +0200 |
| commit | 5cf09ec693285d9cfa947ce794b900645ca16e54 (patch) | |
| tree | fe1bf132a1e29a3776059b8e32b1ee1484dd58be /mullvad-daemon/src | |
| parent | 3e33f9dcfbdf9ac24ef222a12868798cf9f22cf8 (diff) | |
| download | mullvadvpn-5cf09ec693285d9cfa947ce794b900645ca16e54.tar.xz mullvadvpn-5cf09ec693285d9cfa947ce794b900645ca16e54.zip | |
Don't rely on exit ip in relay_list
Instead, show the hostname in the UI
Diffstat (limited to 'mullvad-daemon/src')
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index 76ec9004ba..063e68d56e 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -61,7 +61,7 @@ use mullvad_types::{ version::{AppVersion, AppVersionInfo}, }; -use std::{mem, net::IpAddr, path::PathBuf, sync::mpsc, thread, time::Duration}; +use std::{mem, path::PathBuf, sync::mpsc, thread, time::Duration}; use talpid_core::{ mpsc::IntoSender, @@ -411,13 +411,14 @@ impl Daemon { fn on_get_current_location(&self, tx: OneshotSender<GeoIpLocation>) { if let Some(ref relay) = self.current_relay { let location = relay.location.as_ref().cloned().unwrap(); + let hostname = relay.hostname.clone(); let geo_ip_location = GeoIpLocation { - ip: IpAddr::V4(relay.ipv4_addr_exit), country: location.country, city: Some(location.city), latitude: location.latitude, longitude: location.longitude, mullvad_exit_ip: true, + hostname: Some(hostname), }; Self::oneshot_send(tx, geo_ip_location, "current location"); } else { |
