| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
This reworks `get_or_spawn_reactor()` to return `Error` instead of
`ReactorError`.
The main change here is that we now have a dedicated `Error::Spawn`
variant for `SpawnError`s, instead of mapping these to `ReactorError`
(which actually triggers a clean shutdown, which is not quite what we
want here).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| | |
|
| | |
|
| |
|
|
| |
Typos found with codespell
|
| |
|
|
|
|
|
|
| |
As a responder, we should check the AUTHENTICATE auth type and make sure
we support it. We were not doing that, we were simply putting in our max
version.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 04ab3cd848d7977baf58dd64ebfcad6aa54ecb17.
Reverted because we no longer need to "peek" into the opaque
`CircChanMsg` of a circuit reactor: now the implementation-dependent
part of the reactor is in charge of handling the channel messages,
and extracting `Relay` objects out of RELAY/RELAY_EARLY cells,
which then get processed in the base reactor.
|
| |
|
|
|
|
| |
This will be needed by relays, for wrapping tor_linkspec decode errors
(which can happen if the link specifiers in the EXTEND2 cell can't be
converted to a channel target).
|
| |
|
|
|
|
|
|
|
| |
This will be used in a future commit, inside the new generic circuit
reactor.
We need it because RELAY cells are handled very similarly, so we need
some way of finding out if a given generic chancell is actually a RELAY
cell that we can handle in an implementation-agnostic way.
|
| |
|
|
|
| |
This will be used in the stream reactor too (and the stream reactor will
eventually replace the corresponding client impl).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is part of an implementation for proposal 368.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
It was decided that the comparison chain was actually preferrable for
readability. So instead, we're just `allow`ing it until it stops being
a problem.
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a comparison chain in
`tor_proto::util::poll_all::test::ResolveAfter::poll` which was causing
a clippy warning. The lint in question, `clippy::comparison_chain`, was
a `clippy::style` lint in 1.85.1 and got moved to `clippy::pedantic` in
1.87.0 (see [rust-clippy!14219]).
Since some of us (like me) develop on MSRV, I'm fixing this lint now.
Gabi didn't have any strong opinions on whether I did it like this or
with an `allow` attribute, so I decided this was better since it means
we don't have to come back later just to remove the `allow`.
It should be noted that using a match like this can sometimes be a
performance regression (see [rust-clippy#5354] and [rust-clippy!6390]).
I would expect in this case the effect will be very little, if any, but
if tests in `tor_proto::util::poll_all::test` start taking much longer
and having an impact on CI or something, this could be why.
[rust-clippy!14219]: https://github.com/rust-lang/rust-clippy/pull/14219
[rust-clippy#5354]: https://github.com/rust-lang/rust-clippy/issues/5354
[rust-clippy!6390]: https://github.com/rust-lang/rust-clippy/pull/6390
Signed-off-by: hashcatHitman <[email protected]>
|
| |
|
|
| |
With this commit we now actually generate padding when we're told to.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
We no longer want to _ever_ block non-DATA cells, per discussion
in circuit-padding.md.
Closes #2190.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Remove half-streams when they expire.
Closes #264
See merge request tpo/core/arti!3267
|
| | |
| |
| |
| |
| | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3267#note_3261239
|
| |\ \
| | |
| | |
| | |
| | | |
Migrate to waker noop
See merge request tpo/core/arti!3250
|
| | | | |
|
| | | | |
|
| | |/
|/| |
|
| |\ \
| | |
| | |
| | |
| | | |
Validate incoming padding, and permit it when it is valid.
See merge request tpo/core/arti!3241
|
| | |/ |
|
| |/
|
|
|
|
|
|
|
|
|
| |
Previously we would replace padding with any cell that was already
in the queue. But that doesn't make sense: If we have a cell queued
for hop 1, then we shouldn't use it as padding for hop 2, since hop
2 will never see it! Instead, we look at the target hops for the
already queued cells.
Ref:
- https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3225/diffs?commit_id=3998e0559fbcc06f8ea88968051cebca71489a52
|
| | |
|
| |
|
|
| |
Include suitable dire warnings about actually using it.
|
| | |
|
| |
|
|
|
| |
Explain how exactly its "you-must-poll-me" behavior relates to the
rest of the Sink ecosystem.
|
| | |
|
| |
|
|
|
|
|
|
| |
This type wraps a futures::Sink, and allows it to be temporarily blocked
and unblocked.
I'm going to use this to implement padding-based circuit blocking,
according to the designs in !3225.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the ChannelFrame<> for the entirety of the outbound client handshake
that is the ClientInitiator channel type.
With this change, the codec.rs code is not needed anymore along its
CodecError as well which has been normalized onto the crate::Error
instead in order to simplify error handling and avoid duplication of
error types.
Unit tests have been modified to reflect this change of what can be done
with a channel frame. Also renamed to focus on client behavior.
Part of #1597
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
To be able to return a crate::Error from the Decoded/Encoder trait, it
needs to implement this conversion.
Part of #1597
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
```text
warning: duplicated attribute
--> crates/tor-hsservice/src/timeout_track.rs:630:14
|
630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|