| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Mostly relating to typos and dependencies.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This contains configuration types that are shared between arti and
arti-rely.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
| |
We never used this, it was just needed because we used to convert to a
`CircParameters` which required this.
|
| |
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Context:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4222#note_3437336
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Directory streams are accepted and turned into `DataStreams` by an
`arti-relay` task. The `DataStream`s are then passed to the `DirMirror`
for handling.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This is just the skeleton of the task. The implementation will follow
later.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
Fixes a TODO.
|
| |
|
|
| |
Now it can be used with `KeyMgr` and `&KeyMgr`, not only `Arc<KeyMgr>`.
|
| | |
|
| | |
|
| |
|
|
| |
Removed unnecessary lint
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Suggested by opara in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4145#note_3430815
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
This is currently just a placeholder that accepts all stream requests.
It will be fleshed out later, as part of #1448
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The recompute of the valid_until cache is done now in the constructor of
FullKeyView so the view is directly usable once built.
Else, the caller always need to call the recompute function which is
error prone especially when used as a throwaway view.
Also, without this change, building the view and then attempting to log
the public keys would fail.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Move all key related action function to keys.rs in order to alleviate
crypto.rs.
The Reactor will get more functionnalities soon so cleanup.
No behavior change, just code movement.
Related to #2548
|
| |
|
|
|
|
| |
Remove the _no_lock() since no more locks now.
Signed-off-by: David Goulet <[email protected]>
|