| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | | |
This is going to be useful in a moment.
|
| | | |
| | |
| | |
| | | |
This is going to be able to fail in other ways too, sadly.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The chanmgr remembers the last dormancy state it was told.
We invent a chanmgr-specific Dormancy which the arti-client code knows
how to convert from the richer top-level dormant status. This avoids
having to have everyone know all the variants of the top-level state.
To call reconfigure_general, we must also obtain and plumb through a
netdir. Right now we must return an internal error if there is in
fact no netdir, because reconfigure_general does not yet cope with a
missing netdir.
Nothing actually *uses* the dormancy yet.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
We're going to need to reuse this, so we can plumb the dormancy to
more places. Breaking it out avoids having repeat the initial
dormancy value in two places.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This function is going to become the code for controlling channels, in
general. (Including padding control.) Right now it doesn't do most
of the things.
In this commit:
* Change the prototype and the name now.
* Pass `()` for the dormancy and config, adding TODOs.
* Provide update_netdir method on AbstractChanMgr, and call that,
rather than having the ChanMgr go directly into the channel.
(That will enable us to test that `update_netdir` method
with test cases that don't have a complete ChanMgr.)
|
| | | |
| | |
| | |
| | |
| | | |
We're going to need this because the frontend is going to need to
defer some channel padding parameters updates.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unfortunately, because we don't have derive-adhoc here yet, rustfmt
didn't get to notice that this comma was needed.
We are going to add field(s), so add the comma now.
|
| | | |
| | |
| | |
| | | |
The semantics of this are going to become a bit more subtle.
|
| | | |
| | |
| | |
| | |
| | | |
This exists so that we handle this case specially, as we will need to,
and so that we can represent disablement in a Parameters.
|
| | | |
| | |
| | |
| | |
| | | |
The channel manager is going to use this as part of constructing the
right cell for padding neogotiattion.
|
| | | |
| | |
| | |
| | | |
We're going to want this so that we can do reduced padding.
|
| | | |
| | |
| | |
| | |
| | | |
As proposed in
https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/77
|
| | | |
| | |
| | |
| | |
| | | |
This gets rid of some random hardcoded literals. We're going to want
to reuse this, too.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't really want the caller to pass ignored timeout parameters.
And this makes more semantic sense.
The stop constructor uses zero, which is what C Tor does. See
https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/76
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This will be convenient for managing when to send these negotiation
messages.
While we're here, edit the comment to explain how this is (going to
be) used.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Much of this does not exist yet. It will do by the end of this
branch.
Expand a doc note for ChannelsParamsUpdates too.
|
| | | |
| | |
| | |
| | | |
This is going to change. Centralise it first.
|
| | | |
| | |
| | |
| | | |
This is going to change. Centralise it first.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Replaces 4 open-coded call sites.
I am going to add one more.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is more standard. It also provides the ::build() method.
This isn't a config type, and build failures ought not to happen,
so we use Bug for the error.
|
| | |/
| |
| |
| |
| | |
The rustfmt-mandated different formatting of these two very similar
blocks is bad enough, without them being smooshed together.
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
Mark some circuit-building errors as "transient".
Closes #517
See merge request tpo/core/arti!676
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A "transient" error is one that does not indicate a true failure,
but rather an _expected_ need to retry. When we hit one of these,
we do not count it against the total number of permitted failures.
(We do impose a higher limit on "real failures plus transient
failures", though, to prevent infinite loops in the event of a
programming error.
Closes #517.
|
| |\ \
| | |
| | |
| | |
| | | |
Clarify `REASON_DONE`
See merge request tpo/core/arti!677
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
arti: Add support for process hardening
Closes #364
See merge request tpo/core/arti!672
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a compile-time feature with an associated configuration
flag, both enabled by default.
When it's turned on, hardening prevents the arti process from
dumping core or being attached to by low-privileged processes.
(This is a defense-in-depth measure, not an absolute way to prevent
attacks. For more information, see
[`secmem_proc`](https://docs.rs/secmem-proc/0.1.1/secmem_proc/).)
Closes #364.
|
| |\ \
| |/
|/|
| |
| | |
Fix nightly CI: allow print_stderr in rtt tests.
See merge request tpo/core/arti!673
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
tor-rtcompat: Require that TcpStream be Send
See merge request tpo/core/arti!675
|
| | | | |
|
| |/ /
| |
| |
| | |
The lack of this seems to have been an oversight.
|
| |\ \
| |/
|/|
| |
| | |
fix error running check_licenses
See merge request tpo/core/arti!674
|
| |/
|
|
|
|
|
|
| |
--version was removed in a recent update
we use that to detected whether cargo-license is installed,
now use --help instead
|
| |\
| |
| |
| |
| |
| |
| | |
Reduce the arti crate's API surface; improve semver documentation.
Closes #522, #530, and #532
See merge request tpo/core/arti!664
|
| | | |
|
| | |
| |
| |
| | |
Closes #522.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The remaining unconditionally public APIs are those related to our
configuration objects, and the main_main() API.
The rationale for making main_main() public is to have an actual
entry point.
The rationale for making the config APIs public is:
1. We really do intend for others to be able to read our
configuration files using this API.
2. The structure of our configuration files is already part of our
interface.
Closes #530.
|
| | |
| |
| |
| |
| |
| |
| | |
It remains on-by-default, so users shouldn't notice a difference,
but it may help when we want to save a few bytes of binary size.
Closes #532
|
| |\ \
| | |
| | |
| | |
| | | |
tor-congestion: WIP implementation of RTT estimation
See merge request tpo/core/arti!525
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit implements the round-trip-time estimation algorithm from Tor
proposal 324, validating the implementation against the test vectors
found in C tor. (Note that at the time of writing, the new test vectors
may not be committed to C tor yet, but they will be soon.)
This also adds the necessary consensus parameters to `NetParameters`.
Some of them have been renamed in order to (hopefully) make them more
understandable.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
tor-proto: Add a comment about the tor-proto layer.
Closes #531
See merge request tpo/core/arti!665
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We want to clarify that the tor-proto crate should only know _how_
its objects behave, not _why they behave that way_. (In other
words, we can have a "padding strategy" setting on a channel, but
not a "general usage" setting.)
Closes #531.
|
| |/ / |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Refactor tor-linkspec once more.
Closes #428
See merge request tpo/core/arti!662
|
| | |\ \
| |/ /
|/| |
| | | |
# Conflicts:
# crates/tor-netdir/semver.md
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Decrease the lifetimes for storing descriptors.
Closes #527
See merge request tpo/core/arti!669
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
These values were chosen experimentally, based on those from Tor, to
save disk space without wasting much bandwidth.
Closes #527.
|