summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2023-12-06 15:09:36 +0100
committerDavid Lönnhager <david.l@mullvad.net>2023-12-12 16:45:05 +0100
commit1e30f44b14df3f1c515ab5a8d79fa6cdf4ccf67e (patch)
tree07e1f6cec747b65fa113fb6b58daf047055c3dc3
parentdb9c774d36b2d8180acd01705f44c805f7dd2276 (diff)
downloadmullvadvpn-1e30f44b14df3f1c515ab5a8d79fa6cdf4ccf67e.tar.xz
mullvadvpn-1e30f44b14df3f1c515ab5a8d79fa6cdf4ccf67e.zip
Remove mention of special automatic tunnel protocol logic on Windows,
and other vestiges
-rw-r--r--docs/relay-selector.md12
-rw-r--r--mullvad-relay-selector/src/lib.rs33
2 files changed, 4 insertions, 41 deletions
diff --git a/docs/relay-selector.md b/docs/relay-selector.md
index 4db6700f1d..a4c4b8a249 100644
--- a/docs/relay-selector.md
+++ b/docs/relay-selector.md
@@ -49,15 +49,9 @@ Endpoints may be filtered by:
Whilst all user selected constraints are always honored, when the user hasn't selected any specific
constraints, following default ones will take effect:
-- If no tunnel protocol is specified for tunnel endpoints, then the behavior is different on Windows
- and other platforms.
- - On MacOS and Linux, first two connection attempts will use WireGuard, over a random port at
- first and then port 53. From the third attempt onwards, OpenVPN will be used, alternating
- between UDP on any port and TCP on port 443.
- - On Windows, a migration to WireGuard is ongoing and a percentage value provided by the API tells
- clients to randomly decide if they will use WireGuard as a default or OpenVPN as a default.
- The client's decision will persist over time.
- If the client decides to use WireGuard it will have the same behavior as MacOS and Linux.
+- If no tunnel protocol is specified, the first two connection attempts will use WireGuard, over a
+ random port at first and then port 53. From the third attempt onwards, OpenVPN will be used,
+ alternating between UDP on any port and TCP on port 443.
- If the tunnel protocol is specified as WireGuard and obfuscation mode is set to _Auto_:
- First two attempts will be used without _udp2tcp_, using a random port on first attempt, and
diff --git a/mullvad-relay-selector/src/lib.rs b/mullvad-relay-selector/src/lib.rs
index 1e477d0c31..174454995b 100644
--- a/mullvad-relay-selector/src/lib.rs
+++ b/mullvad-relay-selector/src/lib.rs
@@ -1185,9 +1185,7 @@ impl RelaySelector {
// between protocols.
// If the tunnel type constraint is set OpenVpn, from the 4th attempt onwards, the first
// two retry attempts OpenVpn constraints should be set to TCP as a bridge will be used,
- // and to UDP or TCP for the next two attempts. If the tunnel type is specified to be _Any_
- // and on not-Windows, the first two tries are used for WireGuard and don't
- // affect counting here.
+ // and to UDP or TCP for the next two attempts.
match retry_attempt {
0 | 1 => (Constraint::Any, TransportProtocol::Udp),
2 | 3 => (Constraint::Only(443), TransportProtocol::Tcp),
@@ -1574,35 +1572,6 @@ mod test {
)
.is_ok());
}
-
- // Prefer OpenVPN on Windows when possible
- #[cfg(windows)]
- {
- let relay_constraints = RelayConstraints::default();
- for attempt in 0..10 {
- let preferred = relay_selector.preferred_constraints(
- &relay_constraints,
- BridgeState::Off,
- attempt,
- TunnelType::OpenVpn,
- &CustomListsSettings::default(),
- );
- assert_eq!(
- preferred.tunnel_protocol,
- Constraint::Only(TunnelType::OpenVpn)
- );
- match relay_selector.get_any_tunnel_endpoint(
- &relay_constraints,
- BridgeState::Off,
- attempt,
- TunnelType::OpenVpn,
- &CustomListsSettings::default(),
- ) {
- Ok(result) if matches!(result.endpoint, MullvadEndpoint::OpenVpn(_)) => (),
- _ => panic!("OpenVPN endpoint was not selected"),
- }
- }
- }
}
#[test]