change proxy method for tor health check

This commit is contained in:
Keagan McClelland
2021-10-04 15:23:03 -06:00
committed by Aiden McClelland
parent fc0b9d1616
commit 898d018c2e
2 changed files with 3 additions and 2 deletions

View File

@@ -194,8 +194,8 @@ async fn inner_main(
let tor_health_ctx = rpc_ctx.clone();
let tor_client = Client::builder()
.proxy(
Proxy::all(format!(
"socks5h://{}:{}",
Proxy::http(format!(
"socks5://{}:{}",
rpc_ctx.tor_socks.ip(),
rpc_ctx.tor_socks.port()
))

View File

@@ -349,6 +349,7 @@ impl TorControllerInner {
}
pub async fn tor_health_check(client: &Client, tor_controller: &TorController) {
log::debug!("Attempting to self-check tor address");
let onion = tor_controller.embassyd_onion().await;
let result = client
.post(format!("http://{}/rpc/v1", onion))