11 releases

0.3.5 Sep 3, 2024
0.3.4 Sep 3, 2024
0.3.1 Oct 15, 2023
0.3.0 Jun 29, 2023
0.1.0 Mar 14, 2023

#1922 in Network programming

Download history 2/week @ 2024-07-05 82/week @ 2024-07-26 8/week @ 2024-08-02 413/week @ 2024-08-30 63/week @ 2024-09-06 52/week @ 2024-09-13 42/week @ 2024-09-20 49/week @ 2024-09-27 8/week @ 2024-10-04

151 downloads per month
Used in bjorn-acme

MIT license

370KB
9K SLoC

Rust 8K SLoC // 0.0% comments Bitbake 1K SLoC

A Tor library for Rust

Example usage

#[tokio::main]
async fn main() {
    pretty_env_logger::init();

    let storage = torrosion::storage::FileStorage::new("./storage").await.unwrap();
    let mut client = torrosion::Client::new(storage);

    client.run().await;

    while !client.ready().await {
        tokio::time::sleep(std::time::Duration::from_secs(1)).await;
    }
    
    let hs_uri = hyper::Uri::from_static("https://www.bbcweb3hytmzhn5d532owbu6oqadra5z3ar726vq5kgwwn6aucdccrad.onion");
    let hs_client = torrosion::hs::http::new_hs_client(client);
    
    hs_client.get(hs_uri).await.unwrap();
}

Acknowledgements

With thanks to the Open Technology Fund for funding the work going into this library.

Open Technology Fund Logo

Dependencies

~32–46MB
~850K SLoC