Commit 57e363ea authored by juga's avatar juga
Browse files

chg: Adapt one hop circuit to arti 1.2.1

which changed tor_circmgr::path module crate-private
(tpo/core/arti@4c1eb941).
parent b8892e89
Loading
Loading
Loading
Loading
+5 −12
Original line number Diff line number Diff line
@@ -2,9 +2,8 @@ use anyhow::Result;
use async_trait::async_trait;
use clap::{Parser, Subcommand};
use std::fmt;
use std::ops::Deref;

use tor_chanmgr::ChannelUsage;
use tor_proto::circuit::CircParameters;
use tor_rtcompat::Runtime;

use crate::cli::queries;
@@ -35,16 +34,10 @@ impl ExtendCmd {
            let fp =
                relay.rsa_id().to_string().replace('$', "").to_uppercase();
            let nickname = relay.rs().nickname().to_string();
            let path = tor_circmgr::path::TorPath::new_one_hop(relay);
            let params = CircParameters::default();
            let usage = ChannelUsage::UselessCircuit;
            let circ = arti_client
                .circmgr()
                .builder()
                .build(&path, &params, usage)
                .await;

            match circ {
            let circuit = arti_client.circmgr().deref();
            let one_hop_circ =
                circuit.get_or_launch_dir_specific(&relay).await;
            match one_hop_circ {
                Err(e) => println!("[-] Unable to extend: {}", e),
                Ok(_) => println!(
                    "[+] Successful one hop to: {} - {}",