[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [fallback-scripts/main] Support latest arti and cargo update
commit d2a628291cc6ecc6d6b9672d5665f68248885efd
Author: David Goulet <dgoulet@xxxxxxxxxxxxxx>
Date: Fri Feb 25 09:07:04 2022 -0500
Support latest arti and cargo update
Signed-off-by: David Goulet <dgoulet@xxxxxxxxxxxxxx>
---
src/main.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 6413139..7b85d04 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,7 +4,7 @@ use rand::seq::SliceRandom;
use std::fs::File;
use std::io::{BufWriter, Write};
use tokio_crate as tokio;
-use tor_rtcompat::tokio::TokioRuntimeHandle;
+use tor_rtcompat::tokio::TokioNativeTlsRuntime;
use arti_client::{self, TorClientConfig};
use tor_netdir;
@@ -96,14 +96,14 @@ fn write_header_to_file(writer: &mut BufWriter<&File>) -> Result<()> {
#[tokio::main]
async fn main() -> Result<()> {
let config = TorClientConfig::default();
- let rt: TokioRuntimeHandle = tokio_crate::runtime::Handle::current().into();
+ let rt: TokioNativeTlsRuntime = tokio_crate::runtime::Handle::current().into();
println!("[+] Fetching onionoo relays...");
let onionoo_relays_fprs = onionoo::get_relay_fprs_from_onionoo().await?;
println!("[+] Bootstrapping to the Tor network...");
- let arti_client = arti_client::TorClient::bootstrap(rt, config).await?;
- let netdir = arti_client.dirmgr().netdir();
+ let arti_client = arti_client::TorClient::create_bootstrapped(rt, config).await?;
+ let netdir = arti_client.dirmgr().netdir()?;
println!("[+] Cross-referencing relays between Onionoo and Tor consensus...");
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits