summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-10-05 11:20:09 +0200
committerLinus Färnstrand <linus@mullvad.net>2018-10-05 15:50:40 +0200
commit5cf09ec693285d9cfa947ce794b900645ca16e54 (patch)
treefe1bf132a1e29a3776059b8e32b1ee1484dd58be /mullvad-daemon/src
parent3e33f9dcfbdf9ac24ef222a12868798cf9f22cf8 (diff)
downloadmullvadvpn-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.rs5
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 {