| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| | |
|
| |
|
|
|
| |
This will make it possible to use on a DropCounter and get a
DropCounter back.
|
| | |
|
| |
|
|
| |
This will be clearer
|
| |\
| |
| |
| |
| | |
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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes
cargo check --all-features -p tor-async-utils --all-targets
which otherwise prints
warning: function `new_unnamed_socketaddr` is never used
--> crates/tor-rtcompat/src/unix.rs:14:15
|
14 | pub(crate) fn new_unnamed_socketaddr() -> std::io::Result<SocketAddr> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| | |
|
| |
|
|
|
| |
It turns out that these types are generally useful, and that they
are in fact needed for tor-rtmock to compile without a PreferredRuntime.
|
| | |
|
| |
|
|
| |
(The trait no longer has any async methods.)
|
| | |
|
| |
|
|
|
| |
This is feature-complete, but will need tests.
I'm holding off at this point so we can discuss naming on these types.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Since there is no way to construct a unix::SocketAddr on these
platforms, it's harmless to provide an implementation for
NetStreamProvider. What's more, doing so greatly simplifies our
AbstractAddr implementation.
|
| | |
|
| | |
|
| |
|
|
|
| |
As before, this commit does nothing interesting: it's a separate commit
because it reindents a lot of code.
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit does nothing interesting yet: it's a separate commit
because it reindents a lot of code.
|
| |
|
|
|
|
|
|
|
| |
This change will let us make a NetStreamProvider that works for
AF_UNIX addresses, and for "abstract" addresses.
I've decided to let this parameter have a default value of
`std::net::SocketAddr` for now. We can remove the default later
if we decide it's confusing.
|
| |
|
|
|
|
| |
Stop referring to TCP streams in its documentation;
update other documentation to refer to NetStreamProvider
rather than TcpProvider.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(And similarly rename TcpListener to NetStreamListener,
along with their TcpStream/TcpListener associated types.)
These types are about to become generic over addresses,
and therefore shouldn't be named after TCP.
Renaming was done mostly with Rust Analyzer,
except for some macros that needed to be hand-edited.
(I'll revise the comments in the next commit;
this one is all about renaming.)
|
| |
|
|
|
|
|
|
|
|
| |
It's redundant with the incoming() method (which turns the
TcpListener into a Stream of connections), and nothing actually used
it outside of tests.
Removing this method allows us to simplify our TcpListener code a
good deal, as can be seen by some of the implementations we removed
from our example and testing code.
|
| | |
|
| |
|
|
|
|
|
| |
With this extension trait, we no longer need to construct
`CompoundRuntime` directly outside of tor-rtcompat. This in turn
will make it a little less painful when we have to add more generics
to CompoundRuntime.
|
| |
|
|
| |
New tests should usually use tor_rtmock::MockRuntime.
|
| |
|
|
|
| |
This warning complains when we say `where T: SomeTrait + ?Sized`
when `SomeTrait` is inherently Sized.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to get the keying material as detailed by RFC 5705.
Because native-tls doesn't have such support, there is a place holder
panic!() for now.
This means that for the forseable future, relay would only work with
rustls until we figure out a solution for native-tls.
Closes #1432
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
When using openssl on Linux, this saves us about 1.4 MB due to not
loading the default CAs and CRLs (which Tor doesn't use.)
Addresses part of #1027.
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The rustls upgrade will solve #1377 and CVE-2024-32650.
Note that we've had to patch our RustlsProvider impl a bit in order
to keep the tests passing. See comments.
Closes #1377.
|
| |
|
|
| |
I overlooked this, apparently.
|
| |
|
|
|
| |
Modules with the same name as external crates don't work well with our
MSRV.
|
| | |
|
| |
|
|
| |
We must also impl CoarseTimeProvider for mocked runtimes.
|
| |
|
|
| |
Now all our non-mock runtime types impl CoarseTimeProvider.
|
| | |
|