diff options
| -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<'_>>, |
