| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Prior to the previous commit, set_bridges would malfunction if there
were bridges which where (i) in current (ii) in queued or running
(iii) in the new bridge set.
This test failed then and passes now.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This was fundamentally confused and irregular. Now it is more
regular: it does the same things to all the elements of Tracked,
and a simple filtering on current.
This fixes a bug, for which I'm about to add a test case.
|
| | | |
|
| | |
| |
| |
| | |
We'll use this in a moment.
|
| | | |
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/820#note_2850269
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114
which makes the Deref derive for bridgedesc::StateGuard not work
and therefore breaks minimal-versions CI.
It seems simpler to require the newer version everywhere.
|
| | | |
|
| | |
| |
| |
| |
| | |
This is really part of the tests, but I put it here so that it can be
compiled-in if someone wants it during debugging.
|
| | |
| |
| |
| | |
Tests will come in a moment.
|
| | |
| |
| |
| |
| | |
This is the missing one of the full set. It turns out that I wanted
this rather than the non-consuming output_string.
|
| | |
| |
| |
| |
| | |
This seems better than having tor_netdoc export a `#[cfg(test)]`
public constant.
|
| |\ \
| | |
| | |
| | |
| | | |
GuardMgr: decouple NetDir from guards and sample code.
See merge request tpo/core/arti!815
|
| | | |
| | |
| | |
| | | |
This removes some duplication.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously we always set `dir_info_missing` to `false` for new
guards, since new guards could only be taken from ones that were
present in the NetDir. But for bridges, we don't download their
info until _after_ we have chosen them as guards.
|
| | | |
| | |
| | |
| | |
| | | |
Now we can use a group of bridges as the basis for a sample of
guards.
|
| | | |
| | |
| | |
| | | |
This will be necessary for bridges.
|
| | | |
| | |
| | |
| | | |
This is a trickier case, since we have to deal with weights.
|
| | | |
| | |
| | |
| | | |
Two more simple cases that can use Universe instead of Netdir.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In this and the upcoming commits I'll be changing how guards related
to `NetDir` and to `Relay`. Previously, a guard could only come
from (or be updated from) a `Relay` in a `NetDir`. Soon it will be
able to be built from a bridge as well.
To do this, I'm defining a `Universe` trait (name negotiable) that
represents a set of things that may be guards. I'm going to
continue extending its functionality until there are no more
methods in guard.rs or sample.rs that take `NetDir`.
This commit removes most of the usage of `NetDir` and `Relay` in
`guard.rs`.
|
| | | | |
|
| | | | |
|
| | |/
| |
| |
| |
| | |
Use a vector, since we may (someday) want to allow a Guard to have
multiple PtTargets.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
refactor config reload triggering
Closes #562
See merge request tpo/core/arti!819
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | |/ |
|
| |/ |
|
| |\
| |
| |
| |
| | |
Use ByRelayIds to hold guards in GuardSet
See merge request tpo/core/arti!808
|
| | |
| |
| |
| | |
These will need a bigger overhaul: see #612 and #611.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
This has subtleties; the comments try to explain them.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This is necessary for the (somewhat undesirable) lookup_ids function
to return an ID that the dirmgr can actually use to report successes
and failures.
As noted, lookup_ids will create problems down the road when we
implement relays. We should refactor it out before then.
|
| | |
| |
| |
| |
| |
| | |
To see if we can add a relay as a guard, we need a conservative
test: any IDs in common with the given relay prevent us from adding
it.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This required a number of changes, which I've tried to document.
I've taken a conservative approach to modification, and I'm not
using any of the by_*_mut() functions (yet). For cases which
potentially modify the whole set, I'm using into_values() and
collect() to ensure that it's re-indexed correctly, even though the
identities don't change.
I introduce some "TODO pt-client" comments here which I will resolve
in the next commit(s).
|
| | | |
|
| | |
| |
| |
| |
| | |
These are the ones that turned out to be necessary while converting
guard samples to use ByRelayIds.
|