| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
| |
There's no harm in doing this, since we'll try to take ownership of
the state soon as soon as we use it: We just want to try early, so
that we'll get it before we decide that we're using bridges.
Fixes bug #669; bug introduced by !889.
|
| |
|
|
|
|
|
|
|
|
| |
This makes a `pt_state` directory inside .local/share/arti (or the
local equivalent), right next to our existing `state` dir.
Ideally we would use a separate directory for each PT, but we have a
very fuzzy "what is a specific PT" notion.
Closes #667
|
| |
|
|
|
|
|
|
| |
If support is available at compile-time, then we construct a PtMgr
and register it with the ChanMgr. We keep a handle to it ourself so
that we can reconfigure it as needed.
Closes #659.
|
| |
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854090
(ftaod, that is a different MR to this one)
|
| |
|
|
| |
Fixes #636.
|
| | |
|
| |
|
|
| |
rustfmt only.
|
| |
|
|
| |
We'll need this shortly.
|
| |
|
|
| |
We'll need this shortly.
|
| |\
| |
| |
| |
| | |
Move guardmgr creation to arti-client, rather than within circmgr
See merge request tpo/core/arti!850
|
| | |
| |
| |
| | |
rustfmt only, broken out to ease review.
|
| | |
| |
| |
| |
| |
| |
| | |
Having this done within circmgr was irregular - most of our other key
buildup functions are done in TorClient::create_inner.
It is also inconvenient, as it buries the guardmgr within the circmgr.
|
| |/
|
|
|
|
|
| |
Now the Store is constructed by arti_client, solving the problem
described here
https://gitlab.torproject.org/tpo/core/arti/-/issues/631#note_2853665
but in a different way.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is not interesting to the user, and violates some of our
safe-logging rules (like "Don't log at info for each user request"
and "don't log ports").
|
| |
|
|
|
|
| |
Arti is not designed to be a setuid-safe program.
Part of #523.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This gets rid of many Result(). Many parameters are renamed.
Test cases of the now-impossible branch are removed.
Deleting the match from padding_parameters will come in a moment.
I've split off that commit since it has much whitespace noise.
for now, change the error type to Void.
|
| |
|
|
|
| |
This commit is just the necessary plumbing. The config is currently
empty. We'll add something to it, for padding control, later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
The rustfmt-mandated different formatting of these two very similar
blocks is bad enough, without them being smooshed together.
|
| |
|
|
|
|
| |
This allows us to give better errors in the case where bootstrapping
succeeds at first, but fails thereafter for long enough to make our
directory expire.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This logic can now be adjusted via the config object so that it does
its own overriding by looking at the environment as appropriate.
Removing these methods helps simplify the code a bit.
Enabled by #483.
|
| |
|
|
|
| |
This means that it is no longer possible to write code which updates
the dormant mode but forgets to notify the periodic tasks.
|
| |
|
|
|
| |
This will allow receivers (which we are about to introduce) to
terminate when the last client is dropped.
|
| |
|
|
|
|
|
|
| |
We are going to want to be able to wake up other tasks elsewhere in
Arti, that need to know about dormancy. We will give them a postage
watch Receiver.
Right now there are no such things yet.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Use TaskSchedule to sleep in directory bootstrapping
Closes #497
See merge request tpo/core/arti!571
|
| | |
| |
| |
| |
| |
| | |
This change also means that we need to create the handle and scheduler
earlier in the process of creating the DirMgr. If we don't, we won't
have a way to manage the task before bootstrap() returns.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously it was the job of a task in CircMgr to do this; but we're
going to want to give GuardMgr full access to the latest NetDir for
this, and for other code-simplification reasons.
With this change I'm deprecating a couple of functions in
tor-circmgr. It's no longer necessary for us to have an artificial
external way for you to feed new NetDirs to a circmgr. (I could
just remove them, but I want practice deprecating.)
|
| |/ |
|
| |
|
|
|
|
| |
This change requires a little refactoring of TorClientBuilder: now,
instead of enabling or disabling mistrust, it enables or disables
the decision to _override_ the mistrust in the config.
|
| |
|
|
|
|
| |
this change adds unit tests for the public methods of StreamPrefs. although
these are mostly "setter" style functions, the tests confirm the basic
expectations and operation.
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
This is derived from the environment, not the configuration file: We
might not want to trust the configuration file until we've decided
whether we like its permissions.
|
| |/
|
|
|
| |
This specifically applies the `sensitive` wrapper in the places
where we're logging target addresses at level "info" or higher.
|
| | |
|
| |
|
|
|
| |
Remove all `use` statements for `TryFrom` and `TryInto`. These are
now redundant in Rust 2021.
|
| |
|
|
|
| |
(Also, blame clock skew when it is an explanation of why we cannot
finish a connection.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The various background daemon tasks that `arti-client` used to spawn are
now handled inside their respective crates instead, with functions
provided to spawn them that return `TaskHandle`s.
This required introducing a new trait, `NetDirProvider`, which steals
some functionality from the `DirProvider` trait to enable `tor-circmgr`
to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it
can't depend on `DirProvider` directly).
While we're at it, we also make some of the tasks wait for events from
the `NetDirProvider` instead of sleeping, slightly increasing
efficiency.
|
| |\
| |
| |
| |
| | |
implement IsolationHelper for StreamIsolation
See merge request tpo/core/arti!434
|
| | | |
|