| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The end result should be:
1. outgoing streams - enable sidechannel mitigations
2. incoming hs streams - enable sidechannel mitigations
3. incoming exit streams - disable sidechannel mitigations
|
| |\
| |
| |
| |
| | |
tor-proto: Some misc rust/clippy warning fixes
See merge request tpo/core/arti!4304
|
| | | |
|
| | |
| |
| |
| | |
This fixes a `clippy::large_enum_variant`.
|
| | | |
|
| |/ |
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
We have decided that instead of "uniq_id" in logging, we'll use the
"<domaine>-[<type>]-id" syntax to indicate who is that unique ID.
This commit only renames circuit's unique ID to "circ_uniq_id".
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This commit only affects logging. Whenever possible, log both the UniqId
and CircId.
This also changes the log lines which is now "uniq_id=" and "circ_id="
as the UniqId is internal and circ_id (CircId) is protocol level.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A CircId is now a circ_id and a UniqId is a unique_id so we stop
confusing them in the code.
Furthermore, channel_id that are CircId are now circ_id. Channel IDs are
different and encoded internally into a UniqId.
This is the first step to clarify semantic before we change the logging
to log both unique ID and circ ID.
No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature-gating has been a source of confusion, and it unnecessarily
complicates the stream message handling flow.
I've previously argued in favour of keeping it, in the spirit of a belt
and braces approach to message validation, but I've been convinced that
in this particular case, the feature-gate is more trouble than it's
worth.
What makes things worse is that the `CircHop::handle_msg()`
function was designed poorly (by yours truly). I plan on refactoring it
at some point, hopefully soon. There is a TODO about this below
its doc comment.
|
| | |
|
| |
|
|
| |
We do something similar with non-virtual hops at !4076.
|
| | |
|
| |
|
|
|
|
| |
Additionally, fix itertools usage in maybenot_padding.rs
The definition of `Position` changed in 0.15.0.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |\
| |
| |
| |
| | |
proto: Add a new channel -> circuit queue type
See merge request tpo/core/arti!4025
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Previously this would panic.
|
| |/
|
|
|
|
|
| |
We will reuse `DataStream` for relay exit streams, and those aren't
going to have a `ClientDataStreamCtrl`.
Part of #2557
|
| |\
| |
| |
| |
| | |
proto: Fix typo in ResolveCmdChecker docs
See merge request tpo/core/arti!4035
|
| | |
| |
| |
| | |
This returns a boxed `ResolveCmdChecker`, not a `DataCmdChecker`.
|
| |/
|
|
|
| |
`RawCellStream` was removed long ago, in
c559754116678866eabe525f5b189b50cc78b5cc.
|
| | |
|
| |
|
|
| |
This better matches nearby code.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously when initializing a stream, we constructed most of the
stream-related queues outside of the reactor and passed the relevant
halves of the queues (senders or receivers) into the reactor.
A downside of the above approach is that the reactor may be better
informed about what queues to construct, and how to construct them. For
example the reactor knows what type of flow control that the hop is
using, so it knows whether we need queues for passing rate limits and
drain rates for XON/XOFF flow control.
This commit moves the construction of these queues into the reactor and
passes the relevant halves out of the reactor. In the future we can make
better decisions about which queues are needed depending on the flow
control method used instead of always constructing them (see arti#2068).
Reviewing with `--color-moved` might be helpful as a few lines have been
moved.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The stream queue length (for messages incoming from the Tor network)
depends on the type of flow control we're using for the hop. Currently
we construct the stream queue outside of the circuit reactor, but we
don't have the flow control information here.
Instead of constructing the stream queue outside of the reactor and
passing the sender into the reactor, we construct the stream queue
inside of the reactor and pass the receiver out of the reactor.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This will make it possible to tell whether a path has been replaced
in the tunnel.
Since the UniqId type might change its representation in the future,
I've documented that we don't guarantee anything about the strings
used to distinguish paths.
|
| | |
|
| |
|
|
| |
Additionally, allow inspecting tunnel paths directly from streams.
|
| | |
|
| | |
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of copying the client unit tests into the channel module, just
make both current unit tests run on a client and relay handshake.
This required a bit of trickery with type HandshakeConnectFn but works
out in the end.
It also adds the RelayMsgBuf that wraps a MsgBuf in order to implement
CertifiedConn which is very relay only.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
No behavior change.
Make the const cells public as they will be useful for more upcoming
unit tests especially on the relay side.
Signed-off-by: David Goulet <[email protected]>
|
| |\
| |
| |
| |
| | |
Add support for handling CREATE_FAST cells and launching a circuit reactor
See merge request tpo/core/arti!3846
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of giving the `CreateRequestHandler` to the channel after it's
constructed, we integrate it into the handshake so that we can give it
to the channel constructor.
The `ChannelType` is no longer part of the `Channel`.
Some of the tests could be cleaned up slightly now that the channel
doesn't need the `ChannelType`, but I don't want to conflict with !3853.
|
| | |
| |
| |
| |
| |
| |
| | |
I think it was written like this because earlier versions of rust didn't
allow references to temporaries like `&mut rand::rng()` and needed them
to be bound to a variable. But this isn't necessary anymore and so the
comment doesn't make sense.
|