summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2024-09-18 16:37:14 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2024-09-19 09:58:44 +0200
commitab1bc4b275378050c96abbbef718d47d11b3afdf (patch)
tree4f84562b7be26cf20670cdff3fd47c148e4aed26 /mullvad-cli/src
parentb5fdd26939cdbaf1e8c4226f0d96ac7db3369f4d (diff)
downloadmullvadvpn-ab1bc4b275378050c96abbbef718d47d11b3afdf.tar.xz
mullvadvpn-ab1bc4b275378050c96abbbef718d47d11b3afdf.zip
Fix `mullvad status -v` not printing udp2tcp port and transport protocol
Diffstat (limited to 'mullvad-cli/src')
-rw-r--r--mullvad-cli/src/format.rs23
1 files changed, 16 insertions, 7 deletions
diff --git a/mullvad-cli/src/format.rs b/mullvad-cli/src/format.rs
index 00c990f170..ada97cbd5d 100644
--- a/mullvad-cli/src/format.rs
+++ b/mullvad-cli/src/format.rs
@@ -229,16 +229,14 @@ fn format_relay_connection(
location: Option<&GeoIpLocation>,
verbose: bool,
) -> String {
- let exit_endpoint = format_endpoint(
- location.and_then(|l| l.hostname.as_deref()),
- &endpoint.endpoint,
- verbose,
- );
-
let first_hop = endpoint.entry_endpoint.as_ref().map(|entry| {
let endpoint = format_endpoint(
location.and_then(|l| l.entry_hostname.as_deref()),
- entry,
+ // Check if we *actually* want to print an obfuscator endpoint ..
+ match endpoint.obfuscation {
+ Some(ref obfuscation) => &obfuscation.endpoint,
+ _ => entry,
+ },
verbose,
);
format!(" via {endpoint}")
@@ -254,6 +252,17 @@ fn format_relay_connection(
format!(" via {proxy_endpoint}")
});
+ let exit_endpoint = format_endpoint(
+ location.and_then(|l| l.hostname.as_deref()),
+ // Check if we *actually* want to print an obfuscator endpoint ..
+ // The obfuscator information should be printed for the exit relay if multihop is disabled
+ match (endpoint.obfuscation, &first_hop) {
+ (Some(ref obfuscation), None) => &obfuscation.endpoint,
+ _ => &endpoint.endpoint,
+ },
+ verbose,
+ );
+
format!(
"{exit_endpoint}{first_hop}{bridge}",
first_hop = first_hop.unwrap_or_default(),