diff --git a/mullvad-relay-selector/src/relay_selector/matcher.rs b/mullvad-relay-selector/src/relay_selector/matcher.rs index e937b159390e..c287e30fe642 100644 --- a/mullvad-relay-selector/src/relay_selector/matcher.rs +++ b/mullvad-relay-selector/src/relay_selector/matcher.rs @@ -113,11 +113,13 @@ pub const fn filter_openvpn(relay: &Relay) -> bool { matches!(relay.endpoint_data, RelayEndpointData::Openvpn) } -/// Returns whether the relay is a Wireguard relay. +/// Returns whether the relay matches the tunnel constraint `filter` pub const fn filter_tunnel_type(filter: &Constraint, relay: &Relay) -> bool { match filter { Constraint::Any => true, Constraint::Only(typ) => match typ { + // Do not keep OpenVPN relays on Android + TunnelType::OpenVpn if cfg!(target_os = "android") => false, TunnelType::OpenVpn => filter_openvpn(relay), TunnelType::Wireguard => filter_wireguard(relay), },