summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
diff options
context:
space:
mode:
authorJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-17 16:55:21 +0200
committerJonatan Rhodin <jonatan.rhodin@mullvad.net>2025-06-24 14:22:23 +0200
commit14fcbe159ea35ebd4e4d0adebd182e47631335cb (patch)
treeacc327998e3fa82c06c61c064bf0b370b6adc18b /mullvad-cli/src
parent41a021c7d4efdb74b1c71e7567d22ffc930411c4 (diff)
downloadmullvadvpn-14fcbe159ea35ebd4e4d0adebd182e47631335cb.tar.xz
mullvadvpn-14fcbe159ea35ebd4e4d0adebd182e47631335cb.zip
Enable support for creating a custom list with locations
Diffstat (limited to 'mullvad-cli/src')
-rw-r--r--mullvad-cli/src/cmds/bridge.rs2
-rw-r--r--mullvad-cli/src/cmds/custom_list.rs2
-rw-r--r--mullvad-cli/src/cmds/relay.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/mullvad-cli/src/cmds/bridge.rs b/mullvad-cli/src/cmds/bridge.rs
index 48458c9c1e..b5c436a893 100644
--- a/mullvad-cli/src/cmds/bridge.rs
+++ b/mullvad-cli/src/cmds/bridge.rs
@@ -155,7 +155,7 @@ impl Bridge {
let list =
super::custom_list::find_list_by_name(&mut rpc, &custom_list_name).await?;
let location =
- Constraint::Only(LocationConstraint::CustomList { list_id: list.id });
+ Constraint::Only(LocationConstraint::CustomList { list_id: list.id() });
Self::update_bridge_settings(&mut rpc, Some(location), None, None).await
}
SetCommands::Ownership { ownership } => {
diff --git a/mullvad-cli/src/cmds/custom_list.rs b/mullvad-cli/src/cmds/custom_list.rs
index edc6b4b0e2..06e177c634 100644
--- a/mullvad-cli/src/cmds/custom_list.rs
+++ b/mullvad-cli/src/cmds/custom_list.rs
@@ -160,7 +160,7 @@ impl CustomList {
async fn delete_list(name: String) -> Result<()> {
let mut rpc = MullvadProxyClient::new().await?;
let list = find_list_by_name(&mut rpc, &name).await?;
- rpc.delete_custom_list(list.id.to_string()).await?;
+ rpc.delete_custom_list(list.id()).await?;
Ok(())
}
diff --git a/mullvad-cli/src/cmds/relay.rs b/mullvad-cli/src/cmds/relay.rs
index 43010862a9..30d041ea86 100644
--- a/mullvad-cli/src/cmds/relay.rs
+++ b/mullvad-cli/src/cmds/relay.rs
@@ -587,7 +587,7 @@ impl Relay {
let mut rpc = MullvadProxyClient::new().await?;
let list_id = super::custom_list::find_list_by_name(&mut rpc, &custom_list_name)
.await?
- .id;
+ .id();
Self::update_constraints(|constraints| {
constraints.location = Constraint::Only(LocationConstraint::CustomList { list_id });
})
@@ -685,7 +685,7 @@ impl Relay {
Some(EntryArgs::CustomList { custom_list_name }) => {
let list_id = super::custom_list::find_list_by_name(&mut rpc, &custom_list_name)
.await?
- .id;
+ .id();
wireguard_constraints.entry_location =
Constraint::Only(LocationConstraint::CustomList { list_id });
}