diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-09-24 12:46:56 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-09-30 16:09:04 +0200 |
| commit | 37a0dfc745351ee0ab673c0da36b0d5ffc189876 (patch) | |
| tree | 81cfde8e83f73818c644928070acc99d2380f760 /mullvad-api/src | |
| parent | 51ede1644ebb79ef2f2d054a03b278ea78e5df63 (diff) | |
| download | mullvadvpn-37a0dfc745351ee0ab673c0da36b0d5ffc189876.tar.xz mullvadvpn-37a0dfc745351ee0ab673c0da36b0d5ffc189876.zip | |
Add LWO relay list feature and filtering
Diffstat (limited to 'mullvad-api/src')
| -rw-r--r-- | mullvad-api/src/relay_list.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mullvad-api/src/relay_list.rs b/mullvad-api/src/relay_list.rs index 6fdc073efd..f36a375b85 100644 --- a/mullvad-api/src/relay_list.rs +++ b/mullvad-api/src/relay_list.rs @@ -363,6 +363,7 @@ impl WireGuardRelay { daita: self.features.daita.map(|_| true).unwrap_or(self.daita), shadowsocks_extra_addr_in: HashSet::from_iter(self.shadowsocks_extra_addr_in), quic: self.features.quic.map(relay_list::Quic::from), + lwo: self.features.lwo.is_some(), }); into_mullvad_relay(relay, location, endpoint_data) @@ -374,6 +375,7 @@ impl WireGuardRelay { struct Features { daita: Option<Daita>, quic: Option<Quic>, + lwo: Option<Lwo>, } /// DAITA doesn't have any configuration options (exposed by the API). @@ -405,6 +407,12 @@ impl From<Quic> for relay_list::Quic { } } +/// LWO doesn't have any configuration options (exposed by the API). +/// +/// Note, an empty struct is not the same as an empty tuple struct according to serde_json! +#[derive(Debug, Clone, serde::Deserialize)] +struct Lwo {} + #[derive(Debug, serde::Deserialize)] struct Bridges { shadowsocks: Vec<relay_list::ShadowsocksEndpointData>, |
