| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
This would have been useful in looking into #2224.
|
| |
|
|
|
| |
While this is fairly nested, it's short, and most of the complexity is
just in the logging code.
|
| | |
|
| |
|
|
|
| |
The "Next retry time unknown" message can't be hit right now, but could
be if the code changes in the future.
|
| |
|
|
|
| |
I don't love shoving such a complicated expression in thiserror, but it
seems nicer than writing the implementation by hand...
|
| | |
|
| |
|
|
|
|
|
|
| |
This will let us model the actual structure of routerstatus entries in
netdocs more closely. They don't have the addresses in a single list.
When this code was written this would have been much more awkward,
but now we have RPITIT.
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| |
|
|
|
| |
I've added these in places that are useful for the debugging that I've
been doing.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
This is the preferred type for choosing a relay,
since unlike a RelayExclusion, it lets us add multiple restrictions,
and a relay usage.
|
| | |
|
| |
|
|
|
| |
Now that our MSRV is 1.83, clippy is happy to make more
recommendations for us.
|
| | |
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
| |
- Several methods have been moved out of SliceRandom.
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
| |
This will affect some details of path selection as we provide more
info about families.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |
|
|
|
|
|
| |
Now
cargo check --workspace --no-default-features --all-targets
cargo build -p arti --no-default-features --features=memquota,tokio,native-tls
are both clean.
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
|
|
|
|
| |
This behavior is OK, so this doesn't need to be a TODO.
See the discussion at
https://gitlab.torproject.org/tpo/core/arti/-/issues/1352#note_3015217
Closes #1352
|
| |
|
|
|
| |
This allows us to set SRVs for example (needed because by default, the
test `NetDir` is built from a consensus that doesn't contain any SRVs).
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
We will soon need these helpers outside of `tor-guardmgr` too.
This commit is mainly code motion.
|
| |
|
|
| |
This checks that we can read `vanguards.json` state files.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This is a safeguard to prevent users from using ExplicitOrAuto with
types that serialize to the same value as ExplicitOrAuto::Auto.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2146#note_3030692
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We want to export the `VanguardConfig` even if the `vanguards` feature
is disabled (we will need to unconditionally include it in the arti
config).
Note that if `vanguards` are disabled, the `VanguardMode` from the
`VanguardConfig` can only be `Dsiabled`.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Previously, `select_vanguard` returned a `NoSuitableRelay` error if
it was unable to select a relay to use as a vanguard.
We now distunguish the "there are no suitable relays in the vanguard
sets" (`NoSuitableRelays`) error case from the "our vanguard sets are
empty" (`BootstrapRequired`) one.
|
| | |
|
| | |
|
| |
|
|
|
| |
This is about to grow another variant, so I'm moving it to a dedicated
`err` module.
|
| |
|
|
|
|
| |
The `match` below it is fine, there's no need to rewrite it.
(I think this TODO is actually dupe of the the TODO above it).
|
| |
|
|
|
| |
I think it's alright to keep it: it gives us the flexibility to extend
it later on, if needed.
|