summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
diff options
context:
space:
mode:
authorEmīls Piņķis <emils@mullvad.net>2018-07-17 12:26:33 +0100
committerEmīls Piņķis <emils@mullvad.net>2018-07-17 12:26:33 +0100
commit0d5827f2d9be38e7c48deed7427feb189f13fcd6 (patch)
treeb5ade94eb9f6f32cc9ca7e64d972edf26b69b9a3 /mullvad-daemon/src
parent508fc0775e62f9361df2814cad5229b7706d4095 (diff)
parentf4125b8f3776ecdabd7a7eb0913ae47a39ab5c78 (diff)
downloadmullvadvpn-0d5827f2d9be38e7c48deed7427feb189f13fcd6.tar.xz
mullvadvpn-0d5827f2d9be38e7c48deed7427feb189f13fcd6.zip
Merge branch 'replace-list-relays-with-curl'
Diffstat (limited to 'mullvad-daemon/src')
-rw-r--r--mullvad-daemon/src/bin/list-relays.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/mullvad-daemon/src/bin/list-relays.rs b/mullvad-daemon/src/bin/list-relays.rs
deleted file mode 100644
index a330297e20..0000000000
--- a/mullvad-daemon/src/bin/list-relays.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-//! # License
-//!
-//! Copyright (C) 2017 Amagicom AB
-//!
-//! This program is free software: you can redistribute it and/or modify it under the terms of the
-//! GNU General Public License as published by the Free Software Foundation, either version 3 of
-//! the License, or (at your option) any later version.
-
-#[macro_use]
-extern crate error_chain;
-
-extern crate mullvad_paths;
-extern crate mullvad_rpc;
-extern crate serde_json;
-
-error_chain!{}
-
-quick_main!(run);
-
-fn run() -> Result<()> {
- let ca_path = mullvad_paths::resources::get_api_ca_path();
- let mut rpc_manager = mullvad_rpc::MullvadRpcFactory::new(ca_path);
- let rpc_http_handle = rpc_manager
- .new_connection()
- .chain_err(|| "Unable to connect RPC")?;
- let mut client = mullvad_rpc::RelayListProxy::new(rpc_http_handle);
-
- let relays = client
- .relay_list()
- .call()
- .chain_err(|| "Error during RPC call")?;
- println!("{}", serde_json::to_string_pretty(&relays).unwrap());
- Ok(())
-}