| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is neater, I think.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes #1627 / TROVE-2024-010
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
No functional change.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Our new API implementation will need this.
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This will support both the new and old API.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Remove redundant {} from construction of NextStepImpl::Finished.
(We kept these in the previous commit to reduce the size of the diff there.)
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We never say both "finished" and "reply". Make this explicit.
Our new caller API is going to depend on this.
Also, notice if the implementation's behaviour implies an infinite
loop, and call that an internal error instead.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This separates the public API from the internal API, which will allow
us to do more work centrally, and defend against various bugs on both
sides.
The name mirrors a new `NestStep` type we'll introduce as part of a
new caller API.
For now, we make only one centralisation change: Action.drain is now
computed centrally rather than ad-hoc in each protocol implementation
branch.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This deduplicates some docs and eliminates the two wrapper functiosn
for `run_handshake`, which is now just `handshake`.
We're going to make other API breaks too, and this isn't going to be
the primary API, so we might as well do this.
Proper description of the semver breakage will come at the end when
it's all done.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Speak of "peer" rather than being specific. Also, fix a copypaste
mistake: `SocksClientHandshake::handshake`'s doc says it's about
`SocksProxyHandshake`. Instead just speak of the "handshake".
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Code flow changes:
* We always construct the Reader, even on paths where we didn't
previously. That's fine because it's infallible and has no side
effects.
* In proxy.rs, the quirk with `input[0]` has gone away.
We can use the supplied `Reader` and peek the first byte.
No overall functional change.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This centralises the handling of return values, and paves the way for
further deduplication. (The two return paragraphs were identical.)
There's quite a lot of initial API surface to framework.rs. Some of
that is going to be hidden, but we're also going to extend this to do
more work.
No functional change.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Type inference seems fragile when comparing with empty slices.
Here's a ticket I filed where an earlier version of the tor-socksproto
API branch triggered this problem:
https://github.com/rust-lang/rust/issues/130480
The latest version seems to trigger it too.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
educe has bugs that mean it applies a Copy bound to its Clone impl.
Anyway, we just want to derive these normally, not do something weird.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This variant is deprecated but it still ought to have a message so
long as it exists.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reverts commit 0c595818f713916d94b7b0e4062f953fad7c9799.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reverts commit dceeb82f7d1154894ab9c7c607d68f8335bb9615.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
data"
This reverts commit 87e0109832559dec41a485b268579d58be0de278.
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reverts commit 8da8b88481c26d49ac96e79165538e01237ec9ed.
|
| |\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | / /
| | |_|_|/ /
| |/| | | | |
Introduce SinkTrySend trait and implement it
See merge request tpo/core/arti!2468
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Plumbing.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is the method try_send from mpsc::channel::Sender. We want to be
able to replace that type in tor-circmgr with a memquota wrapper, so
the call needs to be a trait method.
This API is deceptively simple.
Implementing it will involve more support machinery for error handling.
|
| |/ / / / /
| | | | |
| | | | |
| | | | | |
We're going to want this for try_send.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Provide a type-erased SleepProvider + CoarseTimeProvider and use it for memquota queues
See merge request tpo/core/arti!2460
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085583
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085582
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2460#note_3085581
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Nothing uses this yet, but we will do so.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Use tor_rtcompat::DynTimeProvider instead.
Ultimately, we're going to want one of these in Channel etc. The
CoarseTimeProvider generic argument then becomes pervasive.
Instead, erase it. This will involve an indirect function call each
time an item is inserted. I think that can't be helped.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This will replace the internal ad-hoc DynCoarseTimeProvider in
tor-memquota.
We need this to be public because it's going to be shared by many of our
protocol elements (eg ClientCirc, Channel, etc.) as they need to use
it for their mq queues.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It doesn't need an owned value here.
(clippy's note about this was defeated by this being a trait method.)
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I'm about to add some unsafe which I want tested in CI.
We must disable two tests.
|
| |\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | | |
Fix a couple of lifetime warnings from nightly.
See merge request tpo/core/arti!2478
|