@@ -7,9 +7,7 @@ use mullvad_management_interface::{client::DaemonEvent, MullvadProxyClient};
7
7
use mullvad_types:: {
8
8
location:: Location ,
9
9
relay_constraints:: {
10
- BridgeSettings , BridgeState , Constraint , GeographicLocationConstraint , LocationConstraint ,
11
- ObfuscationSettings , OpenVpnConstraints , RelayConstraints , RelaySettings ,
12
- WireguardConstraints ,
10
+ BridgeSettings , Constraint , GeographicLocationConstraint , LocationConstraint , RelaySettings ,
13
11
} ,
14
12
relay_list:: { Relay , RelayList } ,
15
13
states:: TunnelState ,
@@ -335,48 +333,6 @@ impl<T> Drop for AbortOnDrop<T> {
335
333
}
336
334
}
337
335
338
- /// Disconnect and reset all relay, bridge, and obfuscation settings.
339
- ///
340
- /// See [`mullvad_types::relay_constraints::RelayConstraints`] for details, but in short:
341
- /// * Location constraint is [`Constraint::Any`]
342
- /// * Provider constraint is [`Constraint::Any`]
343
- /// * Ownership constraint is [`Constraint::Any`]
344
- /// * The default tunnel protocol is [`talpid_types::net::TunnelType::Wireguard`]
345
- /// * Wireguard settings are default (i.e. any port is used, no obfuscation ..)
346
- /// see [`mullvad_types::relay_constraints::WireguardConstraints`] for details.
347
- /// * OpenVPN settings are default (i.e. any port is used, no obfuscation ..)
348
- /// see [`mullvad_types::relay_constraints::OpenVpnConstraints`] for details.
349
- pub async fn reset_relay_settings ( mullvad_client : & mut MullvadProxyClient ) -> Result < ( ) , Error > {
350
- disconnect_and_wait ( mullvad_client) . await ?;
351
-
352
- let relay_settings = RelaySettings :: Normal ( RelayConstraints {
353
- location : Constraint :: Any ,
354
- tunnel_protocol : Constraint :: Any ,
355
- openvpn_constraints : OpenVpnConstraints :: default ( ) ,
356
- wireguard_constraints : WireguardConstraints :: default ( ) ,
357
- providers : Constraint :: Any ,
358
- ownership : Constraint :: Any ,
359
- } ) ;
360
- let bridge_state = BridgeState :: Auto ;
361
- let obfuscation_settings = ObfuscationSettings :: default ( ) ;
362
-
363
- set_relay_settings ( mullvad_client, relay_settings)
364
- . await
365
- . map_err ( |error| Error :: Daemon ( format ! ( "Failed to reset relay settings: {}" , error) ) ) ?;
366
-
367
- mullvad_client
368
- . set_bridge_state ( bridge_state)
369
- . await
370
- . map_err ( |error| Error :: Daemon ( format ! ( "Failed to reset bridge mode: {}" , error) ) ) ?;
371
-
372
- mullvad_client
373
- . set_obfuscation_settings ( obfuscation_settings)
374
- . await
375
- . map_err ( |error| Error :: Daemon ( format ! ( "Failed to reset obfuscation: {}" , error) ) ) ?;
376
-
377
- Ok ( ( ) )
378
- }
379
-
380
336
pub async fn set_relay_settings (
381
337
mullvad_client : & mut MullvadProxyClient ,
382
338
relay_settings : RelaySettings ,
0 commit comments