diff --git a/docs/relay-selector.md b/docs/relay-selector.md index 4db6700f1d8c..a4c4b8a249b1 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 1e477d0c3129..174454995bc8 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]