Skip to content

Commit

Permalink
Implement daita use_anywhere feature indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
hulthe committed Aug 19, 2024
1 parent 4ab284e commit 7be3aef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mullvad-daemon/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3000,6 +3000,16 @@ impl Daemon {
#[cfg(daita)]
let daita = endpoint.daita;

#[cfg(daita)]
let daita_use_anywhere =
if let RelaySettings::Normal(constraints) = settings.relay_settings {
// Detect whether we're using "use_anywhere" by checking if multihop is
// in use but not explicitly enabled.
daita && multihop && !constraints.wireguard_constraints.use_multihop
} else {
false
};

vec![
(quantum_resistant, FeatureIndicator::QuantumResistance),
(multihop, FeatureIndicator::Multihop),
Expand All @@ -3008,6 +3018,8 @@ impl Daemon {
(mtu, FeatureIndicator::CustomMtu),
#[cfg(daita)]
(daita, FeatureIndicator::Daita),
#[cfg(daita)]
(daita_use_anywhere, FeatureIndicator::DaitaUseAnywhere),
]
}
};
Expand Down

0 comments on commit 7be3aef

Please sign in to comment.