| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| | |
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
|
| | |
|
| |
|
|
|
|
| |
Closes #2210.
Edited-by: Nick Mathewson <[email protected]>
|
| |
|
|
|
| |
I've added these in places that are useful for the debugging that I've
been doing.
|
| |
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Needed for the chanmgr to be able to update existing channels with new
KIST settings read from the consensus.
|
| |
|
|
|
| |
This gets it as far as the outbound circuit->channel mpsc queue creation.
Also, we provide an accessor for it.
|
| |
|
|
|
| |
This delivers a fresh account per channel to the places where channels
are actually made, but doesn't pass them to tor-proto yet.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.)
|
| |
|
|
|
|
|
|
|
|
| |
It's redundant with the incoming() method (which turns the
TcpListener into a Stream of connections), and nothing actually used
it outside of tests.
Removing this method allows us to simplify our TcpListener code a
good deal, as can be seen by some of the implementations we removed
from our example and testing code.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Proto: Refactor Channel to always be Arc.
See merge request tpo/core/arti!2163
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 isn't a bugfix, but it helps avoid the appearance of a
function calling itself. This _would_ become a bug if we imported
the wrong trait into scope here.)
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This panics on error, and we're fine with a panic on misbehavior in
tests.
|
| |
|
|
|
| |
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
|
| |\
| |
| |
| |
| |
| |
| | |
Renaming a couple of items for arti 1.1.0
Closes #623
See merge request tpo/core/arti!916
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/issues/668#note_2858220
This commit is difficult to split up.
The innards of BridgeAddr and PtTargetAddr are still a bit entangled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
1. Makes the errors smaller (in the case of Io's PtTargetAddr;
ChannelBuild's addresses are already indirected in a Vec).
2. Redacts (currently, scrubs) the PtTargetAddr and SocketAddr
when safe logging is enabled
These are the remaining error variants in tor-chanmgr that contain
information that should become sensitive as part of bridge support.
|
| |
|
|
|
|
|
|
|
| |
This
1. Makes the errors smaller
2. Redacts (currently, scrubs) the chantarget when safe logging is enabled
This commit doesn't treat other should-be-sensitive inforemation in
errors just yet. That will come in a moment.
|
| |
|
|
|
| |
Thanks to our previous changes, we no longer need this type, or the
methods that access it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is necessary so that we can look up channels (open and pending)
by all of the Ids that we know about them.
The operations needed here are pretty complex: to get them right,
I've replaced most of the accessors on the inner `ChannelMap` with a
function that holds the lock while another `FnOnce` is called. This
still gets us the invariant that we can't accidentally await while
holding the lock on the `ChannelMap`.
I've removed the tests for the accessors that are no longer there.
There are some subtleties here. Now that we have more than one kind
of Id, it's possible to have a partial match. I've tried to explain
all these cases in the comments.
}
|
| | |
|
| |
|
|
| |
There is no actual code change here: just movement.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This lets us build channels using different TransportHelpers,
including the (new) default TransportHelper, which just uses the old
connect_to_one() code.
|
| |
|
|
|
|
|
|
|
| |
This is an internal type (distinct from factory::ChannelFactory)
that we use to make the code in `tor_chanmgr::mgr` agnostic about
what a channel actually is, and how it is actually launched.
Therefore, I'm renaming it and giving better documentation in a
couple of places, to prevent confusion.
|
| |
|
|
|
|
|
| |
Now each `ChanTarget` has at most one `ChannelMethod`, and only
`Direct` `ChannelMethods` can have multiple addresses.
Closes #600.
|
| | |
|
| |
|
|
| |
All the other users of HasAddrs are correct.
|
| |
|
|
| |
These are now builders.
|
| | |
|
| |
|
|
|
| |
We now log connection attempts at debug!, and mark relay target
addresses as sensitive.
|
| |
|
|
| |
Run rustfmt; no other changes.
|
| |
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826167
This makes some lines too long; I will run rustfmt in a separate
commit for clarity.
|
| |
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2826151
This gets rid of quite some Bug error paths.
|