| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
|
| |
This contains the `Defer` type, which can be used to defer a closure
until the `Defer` is dropped.
|
| |
|
|
| |
We shouldn't actually reconfigure anything if given `CheckAllOrNothing`.
|
| | |
|
| |
|
|
|
|
|
|
| |
We use the *channel*'s memquota account. This is arguably wrong, but
it's hard to get right now. See #1652.
Change the type of the queue, and the places it's constructed.
The use sites can all stay the same.
|
| |
|
|
|
| |
This gets it as far as the outbound circuit->channel mpsc queue creation.
Also, we provide an accessor for it.
|
| |
|
|
|
|
|
|
|
| |
Plumb through a top-level account. This doesn't have any
channel-specific, circuit-specific or stream-specific accounts yet.
tor-circmgr's and tor-hsclient's *tests* need fake account.
In arti-relay, use a dummy account for now.
|
| | |
|
| |
|
|
|
|
| |
Make it have a summary line of only reasonable size.
While we're here, wrap the body with semantic linefeeds.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.)
|
| |
|
|
|
|
|
|
|
| |
The channel manager in the future will need to be able to receive
incoming streams. The type of the stream depends on an associated type
within `ChannelFactory`, so this commit exposes this associated type
through several other types, eventually to the `ChanMgr`.
The new methods are behind the experimental "relay" feature flag.
|
| |
|
|
|
|
|
|
|
|
| |
This has two advantages:
1. Code is a little easier to follow with generics rather than dynamic
dispatch, especially since the type is fixed at compile time anyways.
2. It allows us to access associated types of the `ChannelFactory`,
which will be useful later for getting the stream type from the
`ChanBuilder`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, Channel was a type that you could Clone that implicitly
its state. Now, Channel always appears as an Arc<Channel>.
This change has several benefits:
* It makes the relationship between Channel struct and the
underlying channel more clear.
* It enables Channel to participate in the RPC system,
where everything has to be an Arc<.>
* It enables us to have a Weak<Channel>, if we ever want to.
* It will let us move various members out of ChannelDetails.
We did this change a while ago with ClientCirc.
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rust 1.66, std's default works properly for enums, provided that
the default variant is a unit.
Review all uses of `#[educe(default)]` on enums and replace them with
std where possible, which is most of them.
In 1.66 and later, std's `#[derive(Default)]` doesn't infer any
generic bounds on the derived impl, where it's an enum - since the
unit variant can always be constructed. So this change doesn't add
any generic bounds and is not API-visible.
|
| |
|
|
|
|
|
|
|
| |
Without this change, if the delay is less than one second, the code will
effectively busy-loop until the delay has elapsed. This
potentially leads to deadlock in shadow simulations, and
wastes CPU in real usage.
https://shadow.github.io/docs/guide/limitations.html?highlight=busy#busy-loops
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Basically, it's all ChanBuilder at some point, and ChanBuilder
has a timeout.
|
| |
|
|
|
| |
This method will let the user construct a channel that isn't
stored or monitored by the ChanMgr.
|
| | |
|
| |\
| |
| |
| |
| | |
Expose channel builder in order to create channels more efficiently in external code
See merge request tpo/core/arti!1374
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I identified the cases to replace by searching for the string
`.report()`. There are a few that I didn't change:
* A couple of cases that used anyhow::Error,
* One case that reported two Errors.
* Two cases in `tor_hsclient::err` that just did
`error!("Bug: {}")`.
I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.
Nonetheless, closes #949.
|
| |/
|
|
| |
Closes #950.
|
| |
|
|
|
| |
Adjust formatting, add more references to lower-level APIs, and
clarify lifetimes a little more.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This warning kind of snuck up on us! (See #748) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748.
|
| |
|
|
|
|
| |
The comment says
// TODO pt-client: It's not clear to me that we really need this method.
and empirically, deleting it, and its callee, is fine.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit makes the `ChanBuilder` type in `tor-chanmgr` usable by
consumers outside of that crate, like the doc comment for
`ChannelFactory` says you need to be able to do in order to turn your
`TransportHelper` into something useful.
As part of doing this, the `event_sender` its constructor takes needed
to be dealt with, since it was a crate-internal type that came from
inside the `ChanMgr`.
Enter `BootstrapReporter`: an opaque wrapper around that sender, now
provided as an additional argument to
`ChannelFactory::connect_via_transport`. You can now construct a
`ChanBuilder` outside this crate, and it'll still be able to report its
bootstrap status by unwrapping this new type that's threaded through
from the `ChanMgr`. (This was a fair deal of manually threading the type
through all the layers in this crate!)
Note that you cannot implement bootstrap updating using something that
isn't `ChanBuilder` yet due to the type being entirely opaque (but, of
course, we can figure out exactly what API the reporter should have
later, and add that capability in).
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This commit makes it possible to replace the default channel factory
(used when there is no PtMgr), and to replace the PtMgr.
This is part of #659.
|