diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-10-16 17:17:16 +0200 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-10-18 15:49:31 +0200 |
| commit | 34d7f3fb102144940503e1db95bbc9a24b5e1154 (patch) | |
| tree | 347e5c165803e1a197a6a0af943ae6e303bb51d5 | |
| parent | 3eb234444144bc139e766c8eb5a7ff6fe81019ee (diff) | |
| download | mullvadvpn-34d7f3fb102144940503e1db95bbc9a24b5e1154.tar.xz mullvadvpn-34d7f3fb102144940503e1db95bbc9a24b5e1154.zip | |
Tidy up imports
| -rw-r--r-- | mullvad-relay-selector/src/relay_selector/mod.rs | 63 |
1 files changed, 29 insertions, 34 deletions
diff --git a/mullvad-relay-selector/src/relay_selector/mod.rs b/mullvad-relay-selector/src/relay_selector/mod.rs index 1adb49c2b9..7f7517923c 100644 --- a/mullvad-relay-selector/src/relay_selector/mod.rs +++ b/mullvad-relay-selector/src/relay_selector/mod.rs @@ -6,45 +6,39 @@ mod matcher; mod parsed_relays; pub mod query; -use chrono::{DateTime, Local}; -use itertools::Itertools; -use query::ObfuscationQuery; -use std::{ - path::Path, - sync::{Arc, LazyLock, Mutex}, - time::SystemTime, -}; +use matcher::{filter_matching_bridges, filter_matching_relay_list}; +use parsed_relays::ParsedRelays; -use mullvad_types::{ - constraints::Constraint, - custom_list::CustomListsSettings, - endpoint::MullvadWireguardEndpoint, - location::{Coordinates, Location}, - relay_constraints::{ - BridgeSettings, BridgeState, InternalBridgeConstraints, ObfuscationSettings, - OpenVpnConstraints, RelayConstraints, RelayOverride, RelaySettings, ResolvedBridgeSettings, - WireguardConstraints, - }, - relay_list::{Relay, RelayEndpointData, RelayList}, - settings::Settings, - wireguard::QuantumResistantState, - CustomTunnelEndpoint, Intersection, -}; -use talpid_types::{ - net::{ - obfuscation::ObfuscatorConfig, proxy::CustomProxy, Endpoint, TransportProtocol, TunnelType, - }, - ErrorExt, +use crate::detailer::{openvpn_endpoint, wireguard_endpoint}; +use crate::error::{EndpointErrorDetails, Error}; +use crate::query::{ + BridgeQuery, ObfuscationQuery, OpenVpnRelayQuery, RelayQuery, WireguardRelayQuery, }; -use crate::error::{EndpointErrorDetails, Error}; +use std::path::Path; +use std::sync::{Arc, LazyLock, Mutex}; +use std::time::SystemTime; + +use chrono::{DateTime, Local}; +use itertools::Itertools; -use self::{ - detailer::{openvpn_endpoint, wireguard_endpoint}, - matcher::{filter_matching_bridges, filter_matching_relay_list}, - parsed_relays::ParsedRelays, - query::{BridgeQuery, OpenVpnRelayQuery, RelayQuery, WireguardRelayQuery}, +use mullvad_types::constraints::Constraint; +use mullvad_types::custom_list::CustomListsSettings; +use mullvad_types::endpoint::MullvadWireguardEndpoint; +use mullvad_types::location::{Coordinates, Location}; +use mullvad_types::relay_constraints::{ + BridgeSettings, BridgeState, InternalBridgeConstraints, ObfuscationSettings, + OpenVpnConstraints, RelayConstraints, RelayOverride, RelaySettings, ResolvedBridgeSettings, + WireguardConstraints, +}; +use mullvad_types::relay_list::{Relay, RelayEndpointData, RelayList}; +use mullvad_types::settings::Settings; +use mullvad_types::wireguard::QuantumResistantState; +use mullvad_types::{CustomTunnelEndpoint, Intersection}; +use talpid_types::net::{ + obfuscation::ObfuscatorConfig, proxy::CustomProxy, Endpoint, TransportProtocol, TunnelType, }; +use talpid_types::ErrorExt; /// [`RETRY_ORDER`] defines an ordered set of relay parameters which the relay selector should /// prioritize on successive connection attempts. Note that these will *never* override user @@ -221,6 +215,7 @@ pub enum GetRelay { Custom(CustomTunnelEndpoint), } +// TODO: Import `Either` and convert `Multihop` and `Singlehop` into concrete types. /// This struct defines the different Wireguard relays the the relay selector can end up selecting /// for an arbitrary Wireguard [`query`]. /// |
