summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2025-03-13 09:34:44 +0100
committerMarkus Pettersson <markus.pettersson@mullvad.net>2025-04-04 16:17:49 +0200
commitf2a77bab45ebfdbd1122a2195f9ccd8368babb47 (patch)
tree59fd54f54482541a89e175040c9e5fb868a734e4 /mullvad-management-interface/src
parentf8f47dcb7543193a7b03fd0528a3540dcb5eed01 (diff)
downloadmullvadvpn-f2a77bab45ebfdbd1122a2195f9ccd8368babb47.tar.xz
mullvadvpn-f2a77bab45ebfdbd1122a2195f9ccd8368babb47.zip
Implement new debug commands: `relay disable` and `relay enable`
Add two new `mullvad debug` subcommands: - mullvad debug relay enable <country|city|hostname|openvpn|wireguard> - mullvad debug relay disable <country|city|hostname|openvpn|wireguard> These commands are used to update the state of relays the current relay list. This is useful to mock relays going offline or coming online from an offline state. These new debug commands were conceived during the development of the feature for adding warnings for the upcoming OpenVPN deprecation, as there wasn't a convenient way of mocking this.
Diffstat (limited to 'mullvad-management-interface/src')
-rw-r--r--mullvad-management-interface/src/client.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/mullvad-management-interface/src/client.rs b/mullvad-management-interface/src/client.rs
index fd038cc37f..6d17e923f6 100644
--- a/mullvad-management-interface/src/client.rs
+++ b/mullvad-management-interface/src/client.rs
@@ -768,6 +768,17 @@ impl MullvadProxyClient {
.map(|response| response.into_inner())
.map(FeatureIndicators::from)
}
+
+ // Debug features
+ pub async fn disable_relay(&mut self, relay: String) -> Result<()> {
+ self.0.disable_relay(relay).await.map_err(Error::Rpc)?;
+ Ok(())
+ }
+
+ pub async fn enable_relay(&mut self, relay: String) -> Result<()> {
+ self.0.enable_relay(relay).await.map_err(Error::Rpc)?;
+ Ok(())
+ }
}
#[cfg(not(target_os = "android"))]