diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-01-04 17:33:21 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-01-10 10:42:49 +0100 |
| commit | e162d0b94c6e013e964ef9dff4bde80ccae4d58f (patch) | |
| tree | 820758d4b8dd1a1d1209e75b6fe08999b041f6e3 /mullvad-cli | |
| parent | edbd1f52c44ba6ee9a290146f714453fc87e689d (diff) | |
| download | mullvadvpn-e162d0b94c6e013e964ef9dff4bde80ccae4d58f.tar.xz mullvadvpn-e162d0b94c6e013e964ef9dff4bde80ccae4d58f.zip | |
Add patch export to the management interface
Diffstat (limited to 'mullvad-cli')
| -rw-r--r-- | mullvad-cli/src/cmds/mod.rs | 2 | ||||
| -rw-r--r-- | mullvad-cli/src/cmds/patch.rs (renamed from mullvad-cli/src/cmds/import_settings.rs) | 6 | ||||
| -rw-r--r-- | mullvad-cli/src/main.rs | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/mullvad-cli/src/cmds/mod.rs b/mullvad-cli/src/cmds/mod.rs index 29e0508d80..5a9cede691 100644 --- a/mullvad-cli/src/cmds/mod.rs +++ b/mullvad-cli/src/cmds/mod.rs @@ -9,10 +9,10 @@ pub mod bridge; pub mod custom_list; pub mod debug; pub mod dns; -pub mod import_settings; pub mod lan; pub mod lockdown; pub mod obfuscation; +pub mod patch; pub mod proxies; pub mod relay; pub mod relay_constraints; diff --git a/mullvad-cli/src/cmds/import_settings.rs b/mullvad-cli/src/cmds/patch.rs index a89c6814c3..d5a79aaef9 100644 --- a/mullvad-cli/src/cmds/import_settings.rs +++ b/mullvad-cli/src/cmds/patch.rs @@ -9,9 +9,9 @@ use std::{ /// Maximum size of a settings patch. Bigger files/streams cause the read to fail. const MAX_PATCH_BYTES: usize = 10 * 1024; -/// If source is specified, read from the provided file and send it as a settings patch to the -/// daemon. Otherwise, read the patch from standard input. -pub async fn handle(source: String) -> Result<()> { +/// If source is specified, read from the provided file and send it as a settings patch to the daemon. +/// Otherwise, read the patch from standard input. +pub async fn import(source: String) -> Result<()> { let json_blob = tokio::task::spawn_blocking(|| get_blob(source)) .await .unwrap()?; diff --git a/mullvad-cli/src/main.rs b/mullvad-cli/src/main.rs index 270d3c293e..a5887b39d5 100644 --- a/mullvad-cli/src/main.rs +++ b/mullvad-cli/src/main.rs @@ -169,7 +169,7 @@ async fn main() -> Result<()> { Cli::SplitTunnel(cmd) => cmd.handle().await, Cli::Status { cmd, args } => status::handle(cmd, args).await, Cli::CustomList(cmd) => cmd.handle().await, - Cli::ImportSettings { file } => import_settings::handle(file).await, + Cli::ImportSettings { file } => patch::import(file).await, #[cfg(all(unix, not(target_os = "android")))] Cli::ShellCompletions { shell, dir } => { |
