summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2022-03-28 16:44:37 +0200
committerLinus Färnstrand <faern@faern.net>2022-03-28 17:12:20 +0200
commit019a804be56926d5ad4b032069a78371da862d17 (patch)
treeae94dfa268a15b49f2877088bd89f135b298a009 /mullvad-cli/src
parent0ff72eec37d0435749b981650685b556a8bcbc29 (diff)
downloadmullvadvpn-019a804be56926d5ad4b032069a78371da862d17.tar.xz
mullvadvpn-019a804be56926d5ad4b032069a78371da862d17.zip
Format a protocol as "/TCP" instead of "over TCP"
This has the following benefits: * It's a somewhat standard way of representing such a thing * It's shorter * It ties the protocol closer to the SocketAddr data it's associated to
Diffstat (limited to 'mullvad-cli/src')
-rw-r--r--mullvad-cli/src/format.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-cli/src/format.rs b/mullvad-cli/src/format.rs
index 76ffcf7fb1..13e084707a 100644
--- a/mullvad-cli/src/format.rs
+++ b/mullvad-cli/src/format.rs
@@ -41,7 +41,7 @@ pub fn print_state(state: &TunnelState) {
fn format_endpoint(endpoint: &TunnelEndpoint) -> String {
let tunnel_type = TunnelType::from_i32(endpoint.tunnel_type).expect("invalid tunnel protocol");
let mut out = format!(
- "{} {} over {}",
+ "{} {}/{}",
match tunnel_type {
TunnelType::Wireguard => "WireGuard",
TunnelType::Openvpn => "OpenVPN",
@@ -57,7 +57,7 @@ fn format_endpoint(endpoint: &TunnelEndpoint) -> String {
if let Some(ref proxy) = endpoint.proxy {
write!(
&mut out,
- " via {} {} over {}",
+ " via {} {}/{}",
match ProxyType::from_i32(proxy.proxy_type).expect("invalid proxy type") {
ProxyType::Shadowsocks => "Shadowsocks",
ProxyType::Custom => "custom bridge",
@@ -75,7 +75,7 @@ fn format_endpoint(endpoint: &TunnelEndpoint) -> String {
if let Some(ref entry_endpoint) = endpoint.entry_endpoint {
write!(
&mut out,
- " via {} over {}",
+ " via {}/{}",
entry_endpoint.address,
format_protocol(
TransportProtocol::from_i32(entry_endpoint.protocol)
@@ -87,7 +87,7 @@ fn format_endpoint(endpoint: &TunnelEndpoint) -> String {
if let Some(ref obfuscation) = endpoint.obfuscation {
write!(
&mut out,
- " via {} {}:{} over {}",
+ " via {} {}:{}/{}",
match ObfuscationType::from_i32(obfuscation.obfuscation_type)
.expect("invalid obfuscation type")
{