| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Closes #2210.
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
| |
We'll need it to tell the channel padder when padding is queued.
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
| |
I've added these in places that are useful for the debugging that I've
been doing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ChannelType indicates the type of channel in order to dictate which
message is allowed on it. The value use the Initiator and Responder
terminology from tor-spec documents.
At this commit, we only have client channel meaning the
"ClientInitiator" type.
In future commits, the channel type will be used by the channel reactor
to restrict which message is allowed or not.
Part of #1597
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
This is so a relay can build authenticated channels. Several keys/cert
are required for this that are within the key manager.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
```text
warning: duplicated attribute
--> crates/tor-hsservice/src/timeout_track.rs:630:14
|
630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| | |
|
| |
|
|
| |
Made with https://crates.io/crates/typos-cli
|
| |
|
|
| |
See #2060.
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
|
|
| |
MockSleepProvider and MockSleepRuntime have been declared deprecated
by the docs for some time. We're about to mark them `#[deprecated]`.
This commit has been split out for clarity of review.
|
| | |
|
| |
|
|
|
| |
This also removes the TODO that was addressed by adding the kist params
to this type.
|
| | |
|
| |
|
|
|
|
|
|
| |
This moves the `NetParameters -> KistParams` conversion to
`tor-chanmgr`.
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2706#note_3147557
|
| | |
|
| |
|
|
| |
Closes #1730, #1728
|
| |
|
|
|
| |
Needed for the chanmgr to be able to update existing channels with new
KIST settings read from the consensus.
|
| |
|
|
|
|
| |
This is unfortunately necessary, because after the channel handshake, we
need to give the channel reactor a `StreamOps` handle to the underlying
stream.
|
| |\
| |
| |
| |
| | |
clippy: deny `mod_module_files`
See merge request tpo/core/arti!2689
|
| | |
| |
| |
| |
| |
| | |
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 shouldn't be needed anymore now that we use a `Defer`.
|
| | |
|
| |
|
|
|
| |
This contains the `Defer` type, which can be used to defer a closure
until the `Defer` is dropped.
|
| |
|
|
|
|
|
| |
If the channel request was cancelled, we should be able to retry
immediately. Additionally, the `kind()` of `RequestCancelled` is
`TransientFailure`, and I don't think it make sense for a transient
error to return a `retry_time()` of `Never`.
|
| |
|
|
| |
We shouldn't actually reconfigure anything if given `CheckAllOrNothing`.
|
| |
|
|
|
|
| |
These were supposed to fail loudly in debug builds by panicking, but
panics are mostly useless for debugging in async applications that use a
runtime which catches panics. So we'll just log the error instead.
|
| |
|
|
| |
`upgrade_pending_channel_to_open`
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
An attempt to make sure that there are no code paths which forget to
remove a pending channel from the channel map.
This also adds error-level log messages and panics during debug builds
if a `PendingChannelHandle` is dropped without properly passing it to
`MgrState::remove_pending_channel` or
`MgrState::replace_pending_channel`.
|
| |
|
|
|
|
|
|
| |
This reverts commit f85bc3cf849109aaa2c4da9fc8c06e7173a0543f.
There were some small conflcits in
`AbstractChanMgr::get_or_launch_internal`, so this wasn't a clean
revert.
|
| |\
| |
| |
| |
| | |
tor-chanmgr: update comments about selecting pending channels
See merge request tpo/core/arti!2544
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This handle contains all of the details required to remove or replace a
pending channel entry from the channel map.
|
| | |
| |
| |
| |
| |
| | |
These methods on `MgrState` acquire a lock, and it's easy for calling
code to also try to acquire the same lock within the closure, causing a
deadlock. It's better to not expose these methods.
|
| | | |
|
| | |
| |
| |
| | |
Best reviewed with the '-w' flag to hide whitespace changes.
|
| |/
|
|
|
|
|
|
| |
This moves most of the channel map logic from
`AbstractChanMgr::choose_action` to `MgrState::request_channel`.
This is working towards being able to remove
`MgrState::with_channels{,_and_params}`.
|
| |
|
|
| |
Fixes a TODO.
|
| | |
|
| | |
|
| | |
|