diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2019-03-26 14:02:12 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2019-03-26 14:02:12 +0100 |
| commit | 893b279542915e5e2332686141382146b8aa7efe (patch) | |
| tree | c987fa46f4e0e61667d963aaee8f2dc16e4e3302 /mullvad-cli | |
| parent | 0d95132e5ab6eb072ede73e901d783eaef12cad1 (diff) | |
| parent | 492e60e9c4907e3574ef6137a68215d5303012d7 (diff) | |
| download | mullvadvpn-893b279542915e5e2332686141382146b8aa7efe.tar.xz mullvadvpn-893b279542915e5e2332686141382146b8aa7efe.zip | |
Merge branch 'fetch-both-ipv-exit-addrs'
Diffstat (limited to 'mullvad-cli')
| -rw-r--r-- | mullvad-cli/src/cmds/status.rs | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/mullvad-cli/src/cmds/status.rs b/mullvad-cli/src/cmds/status.rs index b1fb696b7f..f39d9cef68 100644 --- a/mullvad-cli/src/cmds/status.rs +++ b/mullvad-cli/src/cmds/status.rs @@ -78,15 +78,22 @@ fn print_location(rpc: &mut DaemonRpcClient) -> Result<()> { return Ok(()); } }; - let city_and_country = if let Some(city) = location.city { - format!("{}, {}", city, location.country) - } else { - format!("{}", location.country) - }; if let Some(hostname) = location.hostname { println!("Relay: {}", hostname); } - println!("Location: {}", city_and_country); + if let Some(ipv4) = location.ipv4 { + println!("IPv4: {}", ipv4); + } + if let Some(ipv6) = location.ipv6 { + println!("IPv6: {}", ipv6); + } + + print!("Location: "); + if let Some(city) = location.city { + print!("{}, ", city); + } + println!("{}", location.country); + println!( "Position: {:.5}°N, {:.5}°W", location.latitude, location.longitude |
