diff --git a/mullvad-types/src/wireguard.rs b/mullvad-types/src/wireguard.rs index 77ed60e1b2d2..ca4f49a1ffc2 100644 --- a/mullvad-types/src/wireguard.rs +++ b/mullvad-types/src/wireguard.rs @@ -81,14 +81,28 @@ impl FromStr for QuantumResistantState { pub struct QuantumResistantStateParseError; #[cfg(daita)] -#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct DaitaSettings { pub enabled: bool, #[serde(default)] + /// Whether to use multihop if the selected relay is not DAITA-compatible. Note that this is + /// the inverse of of "Direct only" in the GUI. pub use_multihop_if_necessary: bool, } +#[cfg(daita)] +impl Default for DaitaSettings { + fn default() -> Self { + Self { + enabled: false, + // This setting should be enabled by default, expect on Android where multihop is not + // supported. + use_multihop_if_necessary: cfg!(not(target_os = "android")), + } + } +} + /// Contains account specific wireguard data #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct WireguardData {