Skip to content

Commit

Permalink
Fix mullvad status -v not printing udp2tcp port and transport protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Sep 18, 2024
1 parent 63c1abe commit a908741
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions mullvad-cli/src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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 entry relay only.
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(),
Expand Down

0 comments on commit a908741

Please sign in to comment.