| 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.
|
| |
|
|
|
|
|
|
|
| |
This adds the trait type `ConnectOptions` to `NetStreamProvider` and adds
this `ConnectOptions` as an argument to `NetStreamProvider::connect()`.
You probably want to look at the changes in tor-rtcompat first, then the
rest of this commit is updating the various places we use
`NetStreamProvider`.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This adds a structure to initialize metrics when the `ChanMgr` is
created, and adds a counter for the total number of channels built,
broken down by success and failure.
|
| | |
|
| |\
| |
| |
| |
| | |
ptmgr: pass outbound_proxy to managed PT processes
See merge request tpo/core/arti!4017
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Previously the [channel] outbound_proxy setting was applied to Arti's
own direct connections but was not forwarded to managed PT processes.
https://spec.torproject.org/pt-spec/configuration-environment.html
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
tor-chanmgr: notify waiters when a launch is cancelled
Closes #1716
See merge request tpo/core/arti!3946
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If a future that owns a pending channel launch is dropped after
publishing the pending entry, other waiters can see the oneshot sender
disappear and report "channel build task disappeared" as an
internal bug.
Fix this by tying pending-entry cleanup and waiter notification
together. Once we take responsibility for a pending launch, every exit
path now removes or upgrades the pending entry and notifies waiters with
the observed result. Cancellation reports RequestCancelled, while
post-build failures keep their original error instead of turning into
the internal bug or retrying the launch owner.
Add regression tests that cover both successive dropped launch-owner
futures and a failure while installing a newly built channel, so
waiters see the expected error in each case.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Set socket buffer sizes (`SO_SNDBUF` and `SO_RCVBUF`) for proxy sockets
Closes #2500
See merge request tpo/core/arti!3957
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the trait type `ListenOptions` to `NetStreamProvider` and adds
this `ListenOptions` as an argument to `NetStreamProvider::listen()`.
You probably want to look at the changes in tor-rtcompat first, then the
rest of this commit is updating the various places we use
`NetStreamProvider`.
|
| | |
| |
| |
| |
| |
| | |
Also, change the address type in the error to String for now.
In reality we need a better representation of this error,
but that shouldn't block this.
|
| | |
| |
| |
| |
| | |
Proxy belonged as a subcase of ChannelBuild. And ChannelBuild
was only about making an initial connection.
|
| |/
|
|
|
|
|
| |
This fixes the problem where we'd report all connect failures as
proxy failures.
Closes #2459.
|
| |
|
|
|
|
| |
Also set a better error message when validating channel target.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This trickles down to the tor-proto channel handshake code. But, the
real need is in the channel builder in order to validate the outbound
channel target.
Fixes #2440
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
It used to be only with the feature = relay but since client can have
that feature enabled, we now validate based on channel outbound type
instead.
Related to #2440
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of giving the `CreateRequestHandler` to the channel after it's
constructed, we integrate it into the handshake so that we can give it
to the channel constructor.
The `ChannelType` is no longer part of the `Channel`.
Some of the tests could be cleaned up slightly now that the channel
doesn't need the `ChannelType`, but I don't want to conflict with !3853.
|
| | |
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This object contains a melting pot of public keys, private keys and
certificates.
Rename it to reflect that it is channel authentication material and not
"identities.
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Mostly, identity a `ChanTarget` as a "target" since we juggle with
PeerInfo and OwnedChanTarget nowadays.
All certificate and keys have very specific names which attempts to
match the spec as much as possible.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This moves the client channel building code into build_client_channel()
to match the build_relay_channel() function pattern.
No behavior change, just code movement. Small changes were needeed
(reference for instance) but no behavior change.
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374448
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make sure the port is non zero and that all addresses are globally
reachable.
Notice the use of ChanProto error in this commit instead of
UnusableTarget. Relay channel initiator are opened by the circuit
reactor meaning from an EXTEND2 request meaning the target is not
controlled by us so any errors is a channel protocol violation.
UnusableTarget is an internat Bug.
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374447
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`warn_report!` is useful when there's an error that we need to ignore
and can't propagate up the call stack. But here we're using
`warn_report!` while also returning the error in a
`Error::ChannelBuild`.
This is not great because:
1. The caller should warn if it wants to, since it will have the error
message and the proper context.
2. This code is doing something like happy eyeballs, which means we only
care that one connection succeeds, not if any fail.
One instance where this is problematic is when running Arti on a machine
without IPv6 support. If connecting to a relay with both an IPv4 and
IPv6 address, the IPv6 attempt will always fail. We don't want to warn
about every outgoing IPv6 connection failure when the IPv4 connection
succeeds.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
No initiator present a TLS certificate and so don't try to get one.
Fixes #2388
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
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]>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
Run cargo update post-release
See merge request tpo/core/arti!3740
|