| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| |
|
|
|
|
|
| |
This ensures that if a directory used as a `key_dir` is moved (e.g.
renamed), and then moved back to its original location (the one
specified in `key_dirs`), our watcher continues watching the `key_dirs`
contents.
|
| |
|
|
| |
`FileWatcher::watch_file` can be used with arbitrary paths.
|
| |
|
|
|
| |
This ensures that if a `key_dir` is created after we start watching it
(or if it's moved), we are still able to detect changes.
|
| |
|
|
|
|
| |
While this means we will be recreating the watcher slightly more often
than necessary, this new approach is less error-prone than what we had
before.
|
| | |
|
| |
|
|
|
| |
This is a general issue with the publisher that will need to be
addressed soon.
|
| |
|
|
| |
changes.
|
| |
|
|
|
| |
This `FileWatcher` is watching the `restricted_discovery.key_dirs`
directories for changes.
|
| |
|
|
| |
contents change.
|
| |
|
|
|
| |
This will soon be used in the `key_dirs` change handler, which will
re-read the authorized_clients list.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously, the publisher would always publish a new descriptor if the
config changed. Now, it only republishes if the parts of the config that
changed are relevant (i.e. if they are part of
`OnionServiceConfigPublisherView`).
A future change will make it so that we trigger a republish task
whenever the restricted discovery mode authorized clients change. This
will involve looking at the contents of the configured `key_dirs`, as
well as the `OnionServiceConfigPublisherView`.
|
| |
|
|
| |
This resolves a clippy warning.
|
| |
|
|
|
| |
Resolves the TODO prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1603#note_2944902
|
| |
|
|
| |
Knowing the nicknames can be useful when debugging.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nightly rust doesn't like it when you have a `match` arm that can
never be reached because of an uninhabited type. As such,
we can't say stuff like:
```
let x: Option<Void> = ...;
match x {
Some(_) => unreachable!(),
None => ...
}
```
|
| |
|
|
|
|
| |
We now create the authorized_clients in the publisher (we don't need the
authorized_clients anywhere else, so it makes little sense to keep them
in `RunningOnionService`).
|
| |
|
|
| |
This helped me debug some shadow test failures.
|
| |
|
|
| |
descriptor.
|
| | |
|
| |
|
|
|
|
|
| |
This should give us some confidence that we are not accidentally
discarding results we should actually be using.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2251#note_3046219
|
| |
|
|
| |
This also makes the publisher exit if the netdir event stream ends.
|
| |
|
|
|
|
|
|
|
| |
It is OK to discard the response string (the response is validated
below where we call `DirResponse::into_output_string()`).
(Perhaps we should just make `DirResponse::check_ok()` public. That way,
we could validate the response without having to handle its output
string).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is being reimplemented as #1292
|
| |
|
|
|
|
|
| |
This removes a couple of unimplemented functions.
These were supposed to be the starting point for #1217, but we won't be
implementing that any time soon.
|
| |
|
|
|
|
|
| |
See
https://github.com/rust-lang/rust-clippy/issues/13001
I think it's OK to change this in our tree, nevertheless.
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2064#note_3014793
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
!2024 introduced `BackoffSchedule::single_attempt_timeout()`, partially
implementing #1259. This completes the implementation by moving the
per-iteration timeout from the publisher reactor to `backoff::Runner`.
Addresses https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2024?commit_id=a4f2bf5cb7d4027a49b74ec5a5298f7b9a3cf62e#note_3005097
Note: the `if should_retry` block is intentionally misindented, to make
reviewing the actual changes easier. A future commit will fix the
indentation. I originally wanted to suggest reviewing this commit using
`--ignore-space-change`, but I found that it makes things a bit
confusing (it shows some funky indentation around the parts that have
both whitespace changes and modifications).
Closes #1259
|
| | |
|
| |
|
|
|
| |
These are mostly about explicitly linking to things that were
already in scope.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We have Display/FromStr for AuthorizedClientConfig. We can't have
Display if it can containa PathBuf because a PathBuf may not have a
string representation.
If we want to support non-unicode in the future, we'll need an
escaping scheme and messing around with OsStr.
The config scheme here may not be the best, but right now I'm just
fixing uses of Path::display.
|
| |
|
|
| |
This is too vague.
|
| | |
|
| |
|
|
| |
Move these two publisher-specific imports to publish.rs.
|
| | |
|
| |
|
|
| |
Just "Sender" and "Receiver" is rather vague.
|
| |
|
|
| |
Move these two publisher-specific imports to publish.rs.
|
| |
|
|
| |
We use these via an import of the parent, publish.rs.
|
| | |
|