Crates.io | tor-relay-selection |
lib.rs | tor-relay-selection |
version | |
source | src |
created_at | 2024-04-02 14:35:37.018862 |
updated_at | 2025-01-07 17:23:55.912274 |
description | Logic to select Tor relays for specific purposes |
homepage | https://gitlab.torproject.org/tpo/core/arti/-/wikis/home |
repository | https://gitlab.torproject.org/tpo/core/arti.git/ |
max_upload_size | |
id | 1193605 |
Cargo.toml error: | TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Logic to select Tor relays for specific purposes
The tor-relay-selection
crate provides higher-level functions
in order to select Tor relays for specific purposes,
or check whether they are suitable for those purposes.
It wraps lower-level functionality from tor-netdir
.
This crate is part of Arti, a project to implement Tor in Rust.
Our main types are RelayUsage
, RelayExclusion
, RelayRestriction
, and RelaySelector
.
A RelayUsage
answers the question "what is this relay for?"
A RelayExclusion
excludes one or more relays
as having already been selected,
or as sharing families with already-selected relays.
A RelayRestriction
imposes additional restrictions on a relay.
A RelaySelector
is a collection of a usage, an exclusion, and any number of restrictions.
In a RelaySelector
, usages and restrictions can be strict or flexible.
If we fail to pick a relay, and there are any flexible usages/restrictions,
then we remove those usages/restrictions to produce a relaxed selector
and we try again.
License: MIT OR Apache-2.0