Skip to content

Commit e39e1ca

Browse files
committed
fixup: indicator
1 parent bfd2fec commit e39e1ca

File tree

2 files changed

+15
-5
lines changed
  • mullvad-daemon/src
  • mullvad-management-interface/src/types/conversions

2 files changed

+15
-5
lines changed

mullvad-daemon/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,9 @@ impl Daemon {
29132913
let shadowsocks = endpoint
29142914
.obfuscation
29152915
.as_ref()
2916-
.filter(|obfuscation| obfuscation.obfuscation_type == ObfuscationType::Shadowsocks)
2916+
.filter(|obfuscation| {
2917+
obfuscation.obfuscation_type == ObfuscationType::Shadowsocks
2918+
})
29172919
.is_some();
29182920

29192921
let mtu = settings.tunnel_options.wireguard.mtu.is_some();

mullvad-management-interface/src/types/conversions/net.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ impl From<talpid_types::net::TunnelEndpoint> for proto::TunnelEndpoint {
1717
address: proxy_ep.endpoint.address.to_string(),
1818
protocol: i32::from(proto::TransportProtocol::from(proxy_ep.endpoint.protocol)),
1919
proxy_type: match proxy_ep.proxy_type {
20-
net::proxy::ProxyType::Shadowsocks => i32::from(proto::proxy_endpoint::ProxyType::Shadowsocks),
21-
net::proxy::ProxyType::Custom => i32::from(proto::proxy_endpoint::ProxyType::Custom),
20+
net::proxy::ProxyType::Shadowsocks => {
21+
i32::from(proto::proxy_endpoint::ProxyType::Shadowsocks)
22+
}
23+
net::proxy::ProxyType::Custom => {
24+
i32::from(proto::proxy_endpoint::ProxyType::Custom)
25+
}
2226
},
2327
}),
2428
obfuscation: endpoint.obfuscation.map(|obfuscation_endpoint| {
@@ -77,11 +81,15 @@ impl TryFrom<proto::TunnelEndpoint> for talpid_types::net::TunnelEndpoint {
7781
)?,
7882
protocol: try_transport_protocol_from_i32(proxy_ep.protocol)?,
7983
},
80-
proxy_type: match proto::proxy_endpoint::ProxyType::try_from(proxy_ep.proxy_type) {
84+
proxy_type: match proto::proxy_endpoint::ProxyType::try_from(
85+
proxy_ep.proxy_type,
86+
) {
8187
Ok(proto::proxy_endpoint::ProxyType::Shadowsocks) => {
8288
talpid_net::proxy::ProxyType::Shadowsocks
8389
}
84-
Ok(proto::proxy_endpoint::ProxyType::Custom) => talpid_net::proxy::ProxyType::Custom,
90+
Ok(proto::proxy_endpoint::ProxyType::Custom) => {
91+
talpid_net::proxy::ProxyType::Custom
92+
}
8593
Err(_) => {
8694
return Err(FromProtobufTypeError::InvalidArgument(
8795
"unknown proxy type",

0 commit comments

Comments
 (0)