| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Put channel without relay identities in the unauth_channels list.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Needed to handle client/bridge -> relay channels which are not
authenticated meaning they don't have a RelayIds so they can't be put in
the ListByRelayIds<>.
Feature gate it to "relay" as a client will never have those kind of
channels.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
futures 0.3.32 has deprecated UnboundedReceiver::try_next() in favor of
UnboundedReceiver::try_recv(), but try_recv() was only introduced in
0.3.32, so using it would cause our minimal versions checks to fail
(rightfully so, because our code wouldn't build with futures 0.3.x for x
< 32).
|
| | |
|
| |
|
|
|
|
| |
No need to pass from the arti relay binary our addresses when handling
an incoming channel, use the one in the channel builder that an
initiator channel uses.
|
| |
|
|
|
|
|
|
|
|
| |
The arti-relay crate rotates the keys at regular interval which we need
to give to the ChanMgr to update its builder.
This function boldly replace the default factory with the new identities
including the TLS acceptor can pick up the new key.
Signed-off-by: David Goulet <[email protected]>
|
| |\
| |
| |
| |
| | |
Implement channel canonicity
See merge request tpo/core/arti!3668
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
We will want our channel selection functions (`open_channel_is_allowed`,
`pending_channel_maybe_allowed`, and `choose_best_channel`) to inspect
the requested target addresses in the future (see their TODOs), so these
functions need to take a `HasAddrs` to get those addresses.
|
| |/
|
|
|
| |
This will be needed later so that our channel selection functions can
take a `HasAddrs`.
|
| |
|
|
|
|
|
|
|
| |
Also, allow the `ChanMgr::runtime` to be unused as client don't use it
yet but might one day.
Simpler this way than feature gating it for relay only.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
We need the advertised addresses for the NETINFO cell when opening a
relay channel. Keep them in the TorRelay object so we can pass them to
the ChanMgr channel handler.
This will also help with config reload where only the local values in
TorRelay will need to be updated.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This struct is used to pass configuration parameters to the ChanMgr when
building it.
At the moment, it holds the ChannelConfig and RelayIdentities (feature
gated) which will be used in subsequent commits.
Note that relays do require RelayIdentities to build channels.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |\
| |
| |
| |
| | |
arti-relay: Add OR port listener task
See merge request tpo/core/arti!3396
|
| | |
| |
| |
| |
| | |
For incoming connections, wrap the peer address in `Sensitive` as it
could be a client.
|
| |/
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
We'll need it to tell the channel padder when padding is queued.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Made with https://crates.io/crates/typos-cli
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| | |
|
| |
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | | |
|