diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | mullvad-daemon/src/relays.rs | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c1f88d8fb..67cb7679f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ Line wrap the file at 100 chars. Th - Notifications shown when connecting to a server include its location. - Upgrade OpenVPN from 2.4.7 to 2.4.8. - Upgrade OpenSSL from 1.1.1c to 1.1.1d. +- When using WireGuard without specifying a specific relay port, port 53 will be used after 2 + failed connection attempts for 2 out of 4 each successive connection attempts #### Windows - Use a larger icon in notifications on Windows 10. diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs index def5dd313c..677dcb6da1 100644 --- a/mullvad-daemon/src/relays.rs +++ b/mullvad-daemon/src/relays.rs @@ -285,6 +285,15 @@ impl RelaySelector { Constraint::Only(TunnelProtocol::Wireguard) => { relay_constraints.wireguard_constraints = original_constraints.wireguard_constraints; + // This ensures that if after the first 2 failed attempts the daemon does not + // conenct, then afterwards 2 of each 4 successive attempts will try to connect on + // port 53. + if retry_attempt > 2 + && retry_attempt % 4 < 2 + && relay_constraints.wireguard_constraints.port.is_any() + { + relay_constraints.wireguard_constraints.port = Constraint::Only(53); + } } } |
