diff options
| author | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-12-11 15:24:17 +0100 |
|---|---|---|
| committer | Jonatan Rhodin <jonatan.rhodin@mullvad.net> | 2023-12-11 15:24:17 +0100 |
| commit | 821d36f77be449085eb8d4ebf4a9ea3db27259d3 (patch) | |
| tree | 2e731c02ce8123d30a6700e38595a3ebab7f21c9 | |
| parent | 6f7893979538c04583cec4fa27c522f53e185861 (diff) | |
| parent | 5bc23d344fd6e7f9a71b8ed6e41f3b058f0ceaac (diff) | |
| download | mullvadvpn-821d36f77be449085eb8d4ebf4a9ea3db27259d3.tar.xz mullvadvpn-821d36f77be449085eb8d4ebf4a9ea3db27259d3.zip | |
Merge branch 'openvpn-servers-used-by-relay-selector-droid-565'
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | mullvad-relay-selector/src/lib.rs | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a21548dd3..2c7d3608ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ Line wrap the file at 100 chars. Th #### Linux - Prevent fragmentation when multihop is enabled by setting a default route MTU. +#### Android +- Fix issue with the app under some circumstances trying to connect to OpenVPN relays. ## [2023.6] - 2023-12-06 ### Changed diff --git a/mullvad-relay-selector/src/lib.rs b/mullvad-relay-selector/src/lib.rs index 7c8583493c..d069da4bc0 100644 --- a/mullvad-relay-selector/src/lib.rs +++ b/mullvad-relay-selector/src/lib.rs @@ -331,6 +331,7 @@ impl RelaySelector { /// Returns a random relay and relay endpoint matching the given constraints and with /// preferences applied. + #[cfg_attr(target_os = "android", allow(unused_variables))] fn get_tunnel_endpoint( &self, relay_constraints: &RelayConstraints, @@ -339,6 +340,12 @@ impl RelaySelector { default_tunnel_type: TunnelType, custom_lists: &CustomListsSettings, ) -> Result<NormalSelectedRelay, Error> { + #[cfg(target_os = "android")] + { + self.get_wireguard_endpoint(relay_constraints, retry_attempt, custom_lists) + } + + #[cfg(not(target_os = "android"))] match relay_constraints.tunnel_protocol { Constraint::Only(TunnelType::OpenVpn) => self.get_openvpn_endpoint( relay_constraints, @@ -402,6 +409,7 @@ impl RelaySelector { /// Returns an OpenVpn endpoint, should only ever be used when the user has specified the tunnel /// protocol as only OpenVPN. + #[cfg_attr(target_os = "android", allow(dead_code))] fn get_openvpn_endpoint( &self, relay_constraints: &RelayConstraints, @@ -585,6 +593,7 @@ impl RelaySelector { } /// Like [Self::get_tunnel_endpoint_internal] but also selects an entry endpoint if applicable. + #[cfg_attr(target_os = "android", allow(dead_code))] fn get_multihop_tunnel_endpoint_internal( &self, relay_constraints: &RelayConstraints, @@ -674,6 +683,7 @@ impl RelaySelector { /// Returns a tunnel endpoint of any type, should only be used when the user hasn't specified a /// tunnel protocol. + #[cfg_attr(target_os = "android", allow(dead_code))] fn get_any_tunnel_endpoint( &self, relay_constraints: &RelayConstraints, @@ -719,6 +729,7 @@ impl RelaySelector { } // This function ignores the tunnel type constraint on purpose. + #[cfg_attr(target_os = "android", allow(dead_code))] fn preferred_constraints( &self, original_constraints: &RelayConstraints, |
