14 breaking releases

new 0.25.0 Dec 2, 2024
0.24.0 Oct 31, 2024
0.23.0 Sep 30, 2024
0.20.0 Jun 27, 2024
0.4.0 Oct 31, 2023

#772 in Cryptography

Download history 201/week @ 2024-08-12 472/week @ 2024-08-19 290/week @ 2024-08-26 697/week @ 2024-09-02 319/week @ 2024-09-09 245/week @ 2024-09-16 866/week @ 2024-09-23 825/week @ 2024-09-30 162/week @ 2024-10-07 140/week @ 2024-10-14 276/week @ 2024-10-21 654/week @ 2024-10-28 972/week @ 2024-11-04 790/week @ 2024-11-11 588/week @ 2024-11-18 1073/week @ 2024-11-25

3,535 downloads per month
Used in 19 crates (8 directly)

MIT/Apache and maybe LGPL-3.0-only

5MB
85K SLoC

tor-hsservice

Provide an onion service on the Tor network.

Overview

This crate is part of Arti, a project to implement Tor in Rust.

It provides a service-side implementation of the onion service protocol, which enables Tor clients to provide a responder-anonymous service on the network. Other parties can connect to an onion service without learning where it is hosted.

This crate provides a low-level implementation of the onion service protocol that may not be suitable for typical users. Most users will instead want to use the arti binary to run an onion service proxy, or use the TorClient::launch_onion_service API in the arti-client crate.

Limitations

This crate is a work in progress.

As of February 2024, there are some features missing that are necessary for running a secure, private onion service. Notably these include:

  • Resistance to denial of service attacks
    • Support for proof-of-work checking and validation
    • Detection and response to out-of-memory conditions
  • Vanguard relays for resistance to path discovery
  • Descriptor encryption keys, so that only certain clients to connect to the service.
  • Removal of old keys and state information. (Currently, the on-disk state will grow slowly but without bound, with sensitive information retained indefinitely.)

Reference

You can learn more about the protocols here as part of the onion services Specification.

LICENSE: MIT OR Apache-2.0

Dependencies

~25–37MB
~570K SLoC