summaryrefslogtreecommitdiffhomepage
path: root/Cargo.lock
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2024-02-16 16:24:33 +0100
committerMarkus Pettersson <markus.pettersson@mullvad.net>2024-03-27 11:43:44 +0100
commit707ecf44bd2b21642e51c8b9f5440bc287bcc511 (patch)
tree1c4e914a879cc6d1c126db1e47019cc2f5f2cea4 /Cargo.lock
parent66f2127aed8bea1e1434c7e8efc50293ebdd9223 (diff)
downloadmullvadvpn-707ecf44bd2b21642e51c8b9f5440bc287bcc511.tar.xz
mullvadvpn-707ecf44bd2b21642e51c8b9f5440bc287bcc511.zip
Refactor `mullvad-relay-selector`
Implement a system built on 'queries' for selecting appropriate relays. A query is a set of constraints which dictates which relay(s) that *can* be chosen by the relay selector. The user's settings can naturally be expressed as a query. The semantics of merging two queries in a way that always prefer user settings is defined by the new `Intersection` trait. Split `mullvad-relay-selector` into several modules: - `query.rs`: Definition of a query on different types of relays. This module is integral to the new API of `mullvad-relay-selector` - `matcher.rs`: Logic for filtering out candidate relays based on a query. - `detailer.rs`: Logic for deriving connection details for the selected relay. - `tests/`: Integration tests for the new relay selector. These tests only use the public APIs of `RelaySelector` and make sure that the output matches the expected output in different scenarios.
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock17
1 files changed, 14 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 70bea27236..b1df8038f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1619,6 +1619,15 @@ dependencies = [
]
[[package]]
+name = "itertools"
+version = "0.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
+dependencies = [
+ "either",
+]
+
+[[package]]
name = "itoa"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1935,7 +1944,7 @@ dependencies = [
"clap",
"clap_complete",
"futures",
- "itertools",
+ "itertools 0.10.5",
"mullvad-management-interface",
"mullvad-types",
"mullvad-version",
@@ -2101,9 +2110,11 @@ version = "0.0.0"
dependencies = [
"chrono",
"ipnetwork",
+ "itertools 0.12.1",
"log",
"mullvad-types",
"once_cell",
+ "proptest",
"rand 0.8.5",
"serde_json",
"talpid-types",
@@ -2828,7 +2839,7 @@ checksum = "30d3e647e9eb04ddfef78dfee2d5b3fefdf94821c84b710a3d8ebc89ede8b164"
dependencies = [
"bytes",
"heck",
- "itertools",
+ "itertools 0.10.5",
"log",
"multimap",
"once_cell",
@@ -2849,7 +2860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56075c27b20ae524d00f247b8a4dc333e5784f889fe63099f8e626bc8d73486c"
dependencies = [
"anyhow",
- "itertools",
+ "itertools 0.10.5",
"proc-macro2",
"quote",
"syn 2.0.51",