Skip to content

Hyper with TLS consistently fails on macOS

Summary

Doing a HTTP TLS (HTTPS) request with hyper and arti-client consistently fails on my macOS machine. A minimal reproducible example is the provided hyper-http-client-example example but I've also observed this in a project I'm working on.

@opara tried to help me IIRC but we have yet to figure out the issue.

Steps to reproduce:

  1. Clone
  2. Run RUST_LOG=debug cargo run --bin hyper-http-client-example
  3. Observe this error: Error: connection closed via error

What is the current bug behavior?

TlsConnector::connect always throws Error { code: -9806, message: "connection closed via error" } (error)

What is the expected behavior?

TLS Handshake should be successful.

Environment

  • Version: Built from d695a
  • Operating system: macOS 26.0 Beta (25A5295e)
  • Install method: Compiled from Git

Relevant logs and/or screenshots:

RUST_LOG=debug cargo run --bin hyper-http-client-example

2025-08-13T21:44:07.652910Z  INFO tor_memquota::mtracker: Memory quota tracking initialised max=8.00 GiB low_water=6.00 GiB
2025-08-13T21:44:07.655692Z DEBUG tor_guardmgr::sample: Guard set loaded. n_guards=20 n_confirmed=2
2025-08-13T21:44:07.655715Z DEBUG tor_guardmgr::sample: Guard set loaded. n_guards=0 n_confirmed=0
2025-08-13T21:44:07.657556Z DEBUG tor_guardmgr::sample: Updated primary guards. old=[] new=[GuardId(RelayIds { ed_identity: Some(Ed25519Identity { g/BUnU3oKzo0ag5/0vJTMPotS2dCFnMmHwMXHe42/co }), rsa_identity: Some(RsaIdentity { $a86b8708baac8a1fe66f0fe9270d23a364a1601b }) }), GuardId(RelayIds { ed_identity: Some(Ed25519Identity { Frk36r+atW5C01ltrJCAH/+O1LTldTVA1ZhtOlMfJbY }), rsa_identity: Some(RsaIdentity { $b0c0caae60b8ff0a712e0c06cbe722fd80af943f }) }), GuardId(RelayIds { ed_identity: Some(Ed25519Identity { CZaSqWXks0jdUmwHwUY1rC9lDPXC3RIBzixxIHlPs9k }), rsa_identity: Some(RsaIdentity { $8ebafe8010dbd42146eb4865687d20941a685773 }) })]
2025-08-13T21:44:07.657844Z DEBUG tor_guardmgr::vanguards: Vanguard state file not found, selecting new vanguards
2025-08-13T21:44:07.661199Z DEBUG arti_client::protostatus: Recommended protocols (FlowCtrl=2) are missing, but that's expected: we haven't built them them yet in Arti.
2025-08-13T21:44:07.661405Z DEBUG tor_circmgr::hspool: launching 3 NAIVE  and 1 GUARDED circuits
2025-08-13T21:44:07.662321Z DEBUG arti_client::status: 0%: connecting to the internet; not downloading
2025-08-13T21:44:07.662395Z DEBUG arti_client::status: 0%: connecting to the internet; not downloading
2025-08-13T21:44:07.662403Z DEBUG arti_client::status: 0%: connecting to the internet; not downloading
2025-08-13T21:44:07.720329Z  INFO arti_client::client: Using keystore from "/Users/mohan/Library/Application Support/org.torproject.Arti/keystore"
2025-08-13T21:44:07.720466Z DEBUG arti_client::client: It appears we have the lock on our state files.
2025-08-13T21:44:08.503059Z DEBUG arti_client::status: 21%: connecting to the internet; directory is fetching authority certificates (0/9)
2025-08-13T21:44:08.566136Z DEBUG arti_client::status: 26%: connecting to the internet; directory is fetching authority certificates (5/9)
2025-08-13T21:44:08.567012Z DEBUG arti_client::status: 26%: connecting to the internet; directory is fetching authority certificates (5/9)
2025-08-13T21:44:14.987119Z DEBUG tor_dirmgr::state: Consensus now usable, with 1484 microdescriptors missing. The current consensus is fresh until 2025-08-13 21:00:00.0 +00:00:00, and valid until 2025-08-13 23:00:00.0 +00:00:00. I've picked 2025-08-13 22:36:46.093764346 +00:00:00 as the earliest time to replace it.
2025-08-13T21:44:16.109717Z DEBUG arti_client::status: 85%: connecting to the internet; directory is fetching microdescriptors (9164/9164)
2025-08-13T21:44:16.109741Z  INFO tor_dirmgr: Marked consensus usable.
2025-08-13T21:44:16.109841Z DEBUG tor_circmgr: Launching a circuit to test build times.
2025-08-13T21:44:16.126836Z DEBUG arti_client::status: 85%: connecting to the internet; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:16.127306Z  INFO tor_dirmgr: Loaded a good directory from cache.
2025-08-13T21:44:16.127375Z DEBUG arti_client::client: It appears we have the lock on our state files.
2025-08-13T21:44:16.127383Z DEBUG tor_dirmgr: Attempted to bootstrap twice; ignoring.
2025-08-13T21:44:16.127351Z DEBUG arti_client::status: 85%: connecting to the internet; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:17.000710Z DEBUG arti_client::status: 26%: connecting to the internet; directory is fetching authority certificates (5/9)
2025-08-13T21:44:17.075289Z DEBUG tor_dirmgr::state: Consensus now usable, with 0 microdescriptors missing. The current consensus is fresh until 2025-08-13 21:00:00.0 +00:00:00, and valid until 2025-08-13 23:00:00.0 +00:00:00. I've picked 2025-08-13 22:26:45.806068329 +00:00:00 as the earliest time to replace it.
2025-08-13T21:44:17.075398Z  INFO tor_dirmgr: Marked consensus usable.
2025-08-13T21:44:17.080501Z  INFO tor_dirmgr: Directory is complete. attempt=1
2025-08-13T21:44:17.080537Z DEBUG arti_client::status: 85%: connecting to the internet; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:17.102790Z DEBUG tor_chanmgr::factory: Attempting to open a new channel to [137.226.34.45:9002+ ed25519:g/BUnU3oKzo0ag5/0vJTMPotS2dCFnMmHwMXHe42/co $a86b8708baac8a1fe66f0fe9270d23a364a1601b]
2025-08-13T21:44:17.103974Z DEBUG tor_chanmgr::transport::default: Connecting to 137.226.34.45:9002
2025-08-13T21:44:17.132024Z DEBUG arti_client::status: 93%: handshaking with Tor relays; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:17.251245Z DEBUG tor_proto::channel::handshake: starting Tor handshake with Direct([137.226.34.45:9002]) stream_id=Chan 0
2025-08-13T21:44:17.280362Z DEBUG tor_proto::channel::handshake: Completed handshake with g/BUnU3oKzo0ag5/0vJTMPotS2dCFnMmHwMXHe42/co [$a86b8708baac8a1fe66f0fe9270d23a364a1601b] stream_id=Chan 0
2025-08-13T21:44:17.280581Z DEBUG arti_client::status: 100%: connecting successfully; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:17.425584Z  INFO tor_guardmgr::guard: We have found that guard [scrubbed] is usable.
2025-08-13T21:44:17.426185Z DEBUG arti_client::status: 100%: connecting successfully; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:17.477540Z DEBUG tor_circmgr: Preeemptive circuit was created for Preemptive { port: None, circs: 2, require_stability: false }
2025-08-13T21:44:17.477616Z DEBUG tor_circmgr: Preeemptive circuit was created for Preemptive { port: Some(TargetPort { ipv6: false, port: 443 }), circs: 2, require_stability: false }
2025-08-13T21:44:17.477637Z DEBUG tor_circmgr: Preeemptive circuit was created for Preemptive { port: Some(TargetPort { ipv6: false, port: 80 }), circs: 2, require_stability: false }
2025-08-13T21:44:17.479069Z DEBUG arti_client::client: Got a circuit for [scrubbed]:443
2025-08-13T21:44:17.529927Z DEBUG arti_client::status: 100%: connecting successfully; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
[+] Making request to: https://check.torproject.org/api/ip
2025-08-13T21:44:17.851618Z DEBUG arti_client::status: 100%: connecting successfully; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:27.103499Z DEBUG tor_circmgr: Launching a circuit to test build times.
2025-08-13T21:44:37.636992Z DEBUG tor_circmgr: Launching a circuit to test build times.
2025-08-13T21:44:37.660822Z DEBUG tor_circmgr::hspool: launching 3 NAIVE  and 1 GUARDED circuits
2025-08-13T21:44:37.837943Z DEBUG tor_chanmgr::factory: Attempting to open a new channel to [162.19.252.137:9000 ed25519:Frk36r+atW5C01ltrJCAH/+O1LTldTVA1ZhtOlMfJbY $b0c0caae60b8ff0a712e0c06cbe722fd80af943f]
2025-08-13T21:44:37.839156Z DEBUG tor_chanmgr::transport::default: Connecting to 162.19.252.137:9000
2025-08-13T21:44:37.996185Z DEBUG tor_proto::channel::handshake: starting Tor handshake with Direct([162.19.252.137:9000]) stream_id=Chan 1
2025-08-13T21:44:38.016951Z DEBUG tor_proto::channel::handshake: Completed handshake with Frk36r+atW5C01ltrJCAH/+O1LTldTVA1ZhtOlMfJbY [$b0c0caae60b8ff0a712e0c06cbe722fd80af943f] stream_id=Chan 1
2025-08-13T21:44:38.277908Z  INFO tor_guardmgr::guard: We have found that guard [scrubbed] is usable.
2025-08-13T21:44:38.278234Z DEBUG arti_client::status: 100%: connecting successfully; directory is usable, fresh until 2025-08-13 21:00:00 UTC, and valid until 2025-08-13 23:00:00 UTC
2025-08-13T21:44:48.162944Z DEBUG tor_circmgr: Launching a circuit to test build times.
2025-08-13T21:44:56.794085Z  INFO tor_circmgr: Flushed persistent state at exit.
Error: connection closed via error
Edited by binarybaron