diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2025-07-22 15:09:53 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2025-07-22 15:09:53 +0200 |
| commit | a537fd8aa92d8eda52ced9b124281d0d0d2e26ff (patch) | |
| tree | 3e748415ff5a3970ec0fae89762084683ca2679b | |
| parent | b2fc803af349205bc40d7cd00e0a480536c3d09e (diff) | |
| parent | f5cee2a612cf23b7c73dfcfff6d4e4654f0b3cbf (diff) | |
| download | mullvadvpn-a537fd8aa92d8eda52ced9b124281d0d0d2e26ff.tar.xz mullvadvpn-a537fd8aa92d8eda52ced9b124281d0d0d2e26ff.zip | |
Merge branch 'cleanup-unused-code'
| -rw-r--r-- | mullvad-daemon/src/migrations/v7.rs | 54 | ||||
| -rw-r--r-- | mullvad-daemon/src/migrations/v9.rs | 15 |
2 files changed, 0 insertions, 69 deletions
diff --git a/mullvad-daemon/src/migrations/v7.rs b/mullvad-daemon/src/migrations/v7.rs index 4223505a47..54587f4771 100644 --- a/mullvad-daemon/src/migrations/v7.rs +++ b/mullvad-daemon/src/migrations/v7.rs @@ -1,11 +1,8 @@ -use std::net::SocketAddr; - use super::{Error, Result}; use mullvad_types::{ relay_constraints::{BridgeConstraints, BridgeSettings as NewBridgeSettings, BridgeType}, settings::SettingsVersion, }; -use serde::{Deserialize, Serialize}; use talpid_types::net::{ Endpoint, TransportProtocol, proxy::{CustomProxy, Shadowsocks, Socks5Local, Socks5Remote, SocksAuth}, @@ -15,57 +12,6 @@ use talpid_types::net::{ // Section for vendoring types and values that // this settings version depend on. See `mod.rs`. -/// Specifies a specific endpoint or [`BridgeConstraints`] to use when `mullvad-daemon` selects a -/// bridge server. -#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize)] -#[serde(rename_all = "snake_case")] -#[allow(unused)] -pub enum BridgeSettings { - /// Let the relay selection algorithm decide on bridges, based on the relay list. - Normal(BridgeConstraints), - Custom(ProxySettings), -} - -/// Proxy server options to be used by `OpenVpnMonitor` when starting a tunnel. -#[derive(Debug, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)] -#[serde(rename_all = "snake_case")] -pub enum ProxySettings { - Local(LocalProxySettings), - Remote(RemoteProxySettings), - Shadowsocks(ShadowsocksProxySettings), -} - -/// Options for a generic proxy running on localhost. -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize)] -pub struct LocalProxySettings { - pub port: u16, - pub peer: SocketAddr, -} - -/// Options for a generic proxy running on remote host. -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize)] -pub struct RemoteProxySettings { - pub address: SocketAddr, - pub auth: Option<ProxyAuth>, -} - -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize)] -pub struct ProxyAuth { - pub username: String, - pub password: String, -} - -/// Options for a bundled Shadowsocks proxy. -#[derive(Debug, Clone, Eq, PartialEq, Hash, Deserialize, Serialize)] -pub struct ShadowsocksProxySettings { - pub peer: SocketAddr, - /// Password on peer. - pub password: String, - pub cipher: String, - #[cfg(target_os = "linux")] - pub fwmark: Option<u32>, -} - // ====================================================== // This is a closed migration. diff --git a/mullvad-daemon/src/migrations/v9.rs b/mullvad-daemon/src/migrations/v9.rs index 655b34acd4..f2fc86e472 100644 --- a/mullvad-daemon/src/migrations/v9.rs +++ b/mullvad-daemon/src/migrations/v9.rs @@ -1,4 +1,3 @@ -use serde::{Deserialize, Serialize}; #[cfg(target_os = "android")] use serde_json::json; #[cfg(target_os = "android")] @@ -30,21 +29,8 @@ const SPLIT_TUNNELING_APPS: &str = "split-tunnelling.txt"; #[cfg(target_os = "android")] const SPLIT_TUNNELING_STATE: &str = "split-tunnelling-enabled.txt"; -/// Tunnel protocol -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)] -#[serde(rename = "tunnel_type")] -#[allow(unused)] -pub enum TunnelType { - #[serde(rename = "openvpn")] - OpenVpn, - #[serde(rename = "wireguard")] - Wireguard, -} - // ====================================================== -/// This is an open migration -/// /// This migration onboards the Android app's split tunnel settings into the daemon's settings. /// /// Until now, split tunneling has been completely handled client side by the Android app. This @@ -57,7 +43,6 @@ pub enum TunnelType { /// This `migrate` function needs to get passed a `settings_dir` to work on Android. This is /// because the Android client will pass the settings directory when initializing the daemon, /// which means that we can not know ahead of time where the settings are stored. -#[allow(unused_variables)] pub fn migrate( settings: &mut serde_json::Value, #[cfg(target_os = "android")] directories: Option<Directories<'_>>, |
