summaryrefslogtreecommitdiff
path: root/crates/arti-relay
Commit message (Collapse)AuthorAgeFilesLines
* Bump versions for tor-* and arti-* cratesSteven Engler2026-08-031-31/+31
| | | | | | | ```bash readarray -t bump < <(maint/list-crates | grep -P '^tor-|^arti-') for crate in "${bump[@]}"; do cargo set-version --bump minor -p "${crate}"; done ```
* maint: ran fixup-featuresSteven Engler2026-08-031-0/+2
|
* relay: Keep desc publisher idle until encoding is implementedDavid Goulet2026-07-281-1/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Make build_descriptor() return Arc<str>David Goulet2026-07-281-9/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Add needeed changes to dirmirror todo commentDavid Goulet2026-07-281-1/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Get rid of our custom relay desc uploaderDavid Goulet2026-07-281-51/+20
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Use mpsc_channel_no_memquota for tasks' queueDavid Goulet2026-07-282-4/+5
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Move authorities ownership to TorRelayDavid Goulet2026-07-282-20/+12
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Adjust the try_send() error messageDavid Goulet2026-07-282-3/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Use warn_report on crypto task command failureDavid Goulet2026-07-281-1/+2
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Use DirectHttpUploader for the desc taskDavid Goulet2026-07-281-31/+12
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Return bug error if dir authority has no address(es)David Goulet2026-07-281-3/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Make compute_targets() not return an OptionDavid Goulet2026-07-281-10/+10
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Remove runtime from desc task structDavid Goulet2026-07-282-13/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Add crypto task command channelDavid Goulet2026-07-284-12/+97
| | | | | | | | | Give a tx to the descriptor task so it can request the keys when building a new descriptor. Implement the crypto task handling of that command channel. Signed-off-by: David Goulet <[email protected]>
* relay: Pass the desc task TX to the crypto taskDavid Goulet2026-07-284-6/+28
| | | | | | | | The crypto task can now signal the descriptor task that the keys have changed related to the relay descriptor (signing key and ntor keys) so a new descriptor can be built and uploaded. Signed-off-by: David Goulet <[email protected]>
* relay: Implement descriptor upload in desc taskDavid Goulet2026-07-282-10/+31
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Pass the dirauth list to the desc taskDavid Goulet2026-07-283-11/+53
| | | | | | | Config reload is not fully supported just yet but when that comes, we'll need to make a task command for new targets. Signed-off-by: David Goulet <[email protected]>
* relay: Initial skeleton of the descriptor upload taskDavid Goulet2026-07-284-0/+280
| | | | | | | | | This is the basics, with many TODO(relay), for a relay descriptor upload task which uses tor-dirpublish::Publisher. Future commits will implement the several todo!(). Signed-off-by: David Goulet <[email protected]>
* tor-proto: remove `CircNetParameters::extend_by_ed25519_id`Steven Engler2026-07-271-4/+1
| | | | | We never used this, it was just needed because we used to convert to a `CircParameters` which required this.
* Merge branch 'remove-expect-unused' into 'main'Ian Jackson2026-07-272-2/+2
|\ | | | | | | | | arti-relay: Remove unused_async clippy escape hatch See merge request tpo/core/arti!4239
| * arti-relay: Add back allow(clippy::unused_async)Gabriela Moldovan2026-07-272-0/+2
| | | | | | | | | | | | The clippy CI job that uses RECENT_RUST_IMAGE fails without the `allow` (RECENT_RUST_IMAGE uses Rust 1.96, where the `unused_async` false-positive still appears to trigger).
| * arti-relay: Remove unused_async clippy escape hatchGabriela Moldovan2026-07-272-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This was needed to work around two `unused_async` false-positives that would trigger on older Rust versions. This was fixed in https://github.com/rust-lang/rust-clippy/issues/15305 and released in 1.90, according to the [changelog]. Since these no longer trigger on 1.97.1, they are now causing the `expect(clippy::unused_async)` to fail. Removing the `expect`s seems like the most sensible fix. [changelog]: https://github.com/rust-lang/rust-clippy/issues/15305
* | Require derive-deftly 1.11.4Ian Jackson2026-07-231-1/+1
|/ | | | | | | | | We're about to *use* the fix that was in 1.11.4. We already updated the lockfile in !4228, so this is just Cargo.toml changes (which will prevent the minimal-versions tests failing when we change the code to rely on the fix). git-grep -l '^derive-deftly' |xargs perl -i~ -pe 's{\b\Q1.11.3\E\b}{1.11.4}g'
* arti-relay: Turn a TODO(relay-tuning) into TODO DIRMIRRORGabriela Moldovan2026-07-221-1/+1
| | | | | Context: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4222#note_3437336
* arti-relay: Add a TODO from @oparaGabriela Moldovan2026-07-221-0/+5
|
* arti-relay: s/stream/tor_stream for clarityGabriela Moldovan2026-07-221-5/+5
|
* arti-relay: Warn if incoming stream handler task can't be launchedGabriela Moldovan2026-07-221-2/+4
|
* arti-relay: Handle directory streamsGabriela Moldovan2026-07-222-2/+12
| | | | | | Directory streams are accepted and turned into `DataStreams` by an `arti-relay` task. The `DataStream`s are then passed to the `DirMirror` for handling.
* arti-relay: Spawn a DirMirror::serve() taskGabriela Moldovan2026-07-221-2/+6
|
* arti-relay: Store a DirMirror in TorRelayGabriela Moldovan2026-07-222-0/+16
| | | | | | | | | This will be used shortly, as we need to spawn a `DirMirror::serve()` task from `TorRelay::run()` for handling the incoming directory stream requests. The `DirMirror` is currently built from dummy data because there is no config for it yet.
* arti-relay: Add a task for handling incoming streamsGabriela Moldovan2026-07-225-1/+116
| | | | | This is just the skeleton of the task. The implementation will follow later.
* proto: Return the incoming streams from the create handlerGabriela Moldovan2026-07-221-2/+11
| | | | | | | | | | | We need to return the "futures::Stream of Tor streams" from the CREATE handler, because these need to be handled from `arti-relay`, as per `doc/dev/notes/relay-streams.md` This commit is intentionally (slightly) misformatted to make reviewing a bit easier (the next commit will rustfmt everything). Part of #2612
* arti-relay: simplify tests by removing some `Arc`sSteven Engler2026-07-203-14/+10
|
* arti-relay: remove `Arc` from around `KeyMgr`Steven Engler2026-07-202-17/+12
| | | | Fixes a TODO.
* arti-relay: make `FullKeyView` generic over a `Borrow<KeyMgr>`Steven Engler2026-07-203-8/+19
| | | | Now it can be used with `KeyMgr` and `&KeyMgr`, not only `Arc<KeyMgr>`.
* Remove now-unneeded allow(clippy::cognitive_complexity)Jim Newsome2026-07-151-1/+0
|
* add_warning: add reference to arti#2556Jim Newsome2026-07-151-1/+1
|
* Removed unnecessary lintpryty262026-07-151-1/+1
| | | | Removed unnecessary lint
* proto: Pass the allowed incoming commands to CreateRequestHandlerGabriela Moldovan2026-06-302-0/+7
| | | | | | | | | | | This enables us to make these configurable: any relays that are not configured to be an exit will exclude BEGIN and RESOLVE from their list of allowed commands, causing exit and DNS streams to be rejected as soon as the BEGIN/RESOLVE cell is received in the circuit reactor. Context: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4145#note_3430345 Part of #2606
* Merge branch 'version-bumps'Nick Mathewson2026-06-301-29/+30
|\
| * Version bumps for 2.5.0Nick Mathewson2026-06-301-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* | Run cargo sort in arti-relay.Nick Mathewson2026-06-301-4/+3
| |
* | arti-relay: Make "metrics" experimentalNick Mathewson2026-06-301-2/+0
| | | | | | | | | | It was both in "metrics" and in "experimental"; I think the latter was intended.
* | Run "fixup-features".Nick Mathewson2026-06-301-0/+2
|/
* arti-relay: Link IncomingStreamRequestFilter in RequestFilterGabriela Moldovan2026-06-291-1/+2
| | | | | Suggested by opara in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4145#note_3430815
* proto: Pass an IncomingStreamRequestFilter factory to the create handlerGabriela Moldovan2026-06-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements what we discussed in `doc/dev/notes/relay-streams.md` (lines 218-234): > Currently, to allow incoming stream requests on a circuit, > you first need to call `RelayCirc::allow_stream_requests()` > to install a `CmdChecker` and `IncomingStreamRequestFilter`. > This is not ideal, because `allow_stream_requests()` will need to be > called unconditionally, on each `RelayCirc`, > right after it's created in the `CreateHandler` impl > (which in turn, would mean making `handle_create()` async too, > because `allow_stream_requests()` is async, which wouldn't be great). > > So, the first step here is to rework the `RelayCirc` API to make relay circuits > be constructable with a list of allowed `RelayCmd`s and `IncomingStreamRequestFilter` > from the get-go ([#2582]), and to get rid of `allow_stream_requests()`, > which will enable the `CREATE*` handler to remain non-`async`. > > In any case, the `CREATE*` handler will still require some changes, > because it needs to be initialized with an `IncomingStreamRequestFilter`, I am not sure using an `IncomingStreamRequestFilter` "factory" is necessarily the right approach here, but the circuit `Reactor`'s constructor needs to take an `IncomingStreamRequestFilter`, and `IncomingStreamRequestFilter` is not `Clone` (and FWIW, I think it's better if we don't make it `Clone`). One obvious limitation is that the `IncomingStreamRequestFilter` of the circuit reactor is fixed for the entire lifetime of the circuit. In practice, I don't think this is going to be a problem, because the arti-relay `IncomingStreamRequestFilter` is only going be used for * preventing single-hop exit streams * per-circuit rate-limiting. Both of these checks will require the filter to have access to a recent `NetDir`, which is straightforward if the filter has an Arc<dyn NetDirProvider> (as mentioned in doc/dev/notes/relay-streams.md, `NetDirProvider` has a handy non-async `timely_netdir()` function we can use). And since these checks are based on consensus params, we don't really need to ever update an already-built circuit with a new `IncomingStreamRequestFilter` (because all `IncomingStreamRequestFilter` will have the ability to obtain a fresh `NetDir` as needed). Nevertheless, I left a TODO about this, because I expect this type to change once we figure out all the other pieces needed for #1448.
* arti-relay: Add an unimplemented stream request filterGabriela Moldovan2026-06-292-0/+24
| | | | | | This is currently just a placeholder that accepts all stream requests. It will be fleshed out later, as part of #1448
* Bump MSRV to 1.91Clara Engler2026-06-151-1/+1
| | | | | | | | | | | | | | | | | | | This commit bumps the MSRV to 1.91 which was released on 2025-10-30. The Cargo.toml files were updated as follows: ```sh git ls-files | \ grep ".*Cargo\.toml$" | \ xargs sed -i '' 's/^rust-version = "1\.89"$/rust-version = "1\.91"/g' ``` The following files were updated manually: ``` modified: .gitlab-ci.yml modified: README.md modified: flake.nix modified: maint/docker-android/Dockerfile ```
* Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-107-0/+7
|\ | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086