summaryrefslogtreecommitdiffhomepage
path: root/mullvad-api/src/bin
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2024-12-09 10:59:51 +0100
committerEmīls <emils@mullvad.net>2025-01-02 10:29:05 +0100
commit3093408a057020fcd912976b892fbb6bc26e6293 (patch)
tree56ac01255fdc7f0c29aa6a8c5a8cdd863ff4f496 /mullvad-api/src/bin
parent58efb1004f8ca762fe6aa95f541c6dc329ed790e (diff)
downloadmullvadvpn-3093408a057020fcd912976b892fbb6bc26e6293.tar.xz
mullvadvpn-3093408a057020fcd912976b892fbb6bc26e6293.zip
Remove global API endpoint
Diffstat (limited to 'mullvad-api/src/bin')
-rw-r--r--mullvad-api/src/bin/relay_list.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/mullvad-api/src/bin/relay_list.rs b/mullvad-api/src/bin/relay_list.rs
index def32303ea..3ea771cc81 100644
--- a/mullvad-api/src/bin/relay_list.rs
+++ b/mullvad-api/src/bin/relay_list.rs
@@ -2,14 +2,18 @@
//! Used by the installer artifact packer to bundle the latest available
//! relay list at the time of creating the installer.
-use mullvad_api::{proxy::ApiConnectionMode, rest::Error as RestError, RelayListProxy};
+use mullvad_api::{
+ proxy::ApiConnectionMode, rest::Error as RestError, ApiEndpoint, RelayListProxy,
+};
use std::process;
use talpid_types::ErrorExt;
#[tokio::main]
async fn main() {
- let runtime = mullvad_api::Runtime::new(tokio::runtime::Handle::current())
- .expect("Failed to load runtime");
+ let runtime = mullvad_api::Runtime::new(
+ tokio::runtime::Handle::current(),
+ &ApiEndpoint::from_env_vars(),
+ );
let relay_list_request =
RelayListProxy::new(runtime.mullvad_rest_handle(ApiConnectionMode::Direct.into_provider()))