| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
hop too (fmt).
|
| |
|
|
| |
hop too.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This enables us to prevent the same relay from being picked in
consecutive positions in a path.
Part of #1340
|
| | |
|
| |
|
|
| |
This is just code movement to make the code a bit easier to follow.
|
| |
|
|
| |
sets.
|
| |
|
|
|
| |
`ExitPathBuilder` is now `pub(crate)`, so we need to move this under the
`test` module to fix the "unused" clippy warning.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're not currently using any of the path builders outside of
`tor-circmgr`, so let's make them crate-private for now.
Care must be taken if/when we decide to make them public again. For
instance, the `HsPathBuilder` exposes two path building functions, one
that uses vanguards, and one that doesn't. We want to strongly encourage
the use of the vanguards-aware version of the function whenever the
`vanguards` feature is enabled, without breaking any of its existing
non-vanguard uses.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2046#note_3010217
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
When the `vanguards` feature is enabled, we define
`pick_path_with_vanguards` instead of `pick_path`, rather than
conditionally defining 2 different versions of the same function.
|
| |
|
|
|
|
|
|
| |
Instead of the `B: AnonymousPathBuilder` argument, `select_guard` now
takes separate arguments for the values it previously obtained by
calling the methods of `AnonymousPathBuilder`. This enables us to remove
the mostly unnecessary `AnonymousPathBuilder` implementation of
`VanguardHsPathBuilder`.
|
| |
|
|
|
| |
This was addressed by extracting the guard selection from `pick_path()`
into `select_guard()`.
|
| | |
|
| |
|
|
| |
Part of #1279
|
| | |
|
| | |
|
| |
|
|
| |
This enables us to make `AnonymousCircuitBuilder` private.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
(These functionalities are for onion service circuits, and don't
actually need to go to an exit at all.)
|
| |
|
|
|
| |
This covers the easy cases, where we are selecting relays
at random based on a selector.
|
| |
|
|
|
|
|
|
| |
I've done this by looking for every non-test instance of pick_relays
or pick_n_relays, and for every non-test usage of any non-ID-related
method on Relay or UncheckedRelay.
Part of #504.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The Stable flag means that circuits build through a given relay are
not likely to get closed precipitously. (Currently, the authorities
guess this by looking at the relay's mean time between failures.)
Generally speaking, paths must be Stable if:
* They are going to get used for a rendezvous point.
* They are going to get used for an introduction point.
* They are going to get used for exiting to a member of
long_lived_ports.
|
| |
|
|
|
|
| |
This matches the behavior of C tor.
Part of #1100.
|
| |
|
|
|
|
| |
Matches the behavior of C tor.
Part of #1100.
|
| |
|
|
|
|
| |
This matches the behavior of C tor.
Part of #1100.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This threads the country codes work through the rest of the codebase:
- `tor-dirmgr` will now enable GeoIP with the embedded database when the
`geoip` future is enabled
- This can be extended later using the `DirMgrConfig` to allow
specifying a custom database; this is not done here, though
- `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain
new `country_code` members to allow filtering circuits by country
- These are `()` in builds where the `geoip` feature is not enabled --
doing it this way means we don't have to copy and paste huge swathes
of code, since we can't use `#[cfg]` in patterns
- `ExitPathBuilder` gains (hacked-in) support for choosing a relay with
the correct country code
- Due to the lack of conjuction, we just copy and paste a small bit,
pending further refactoring
- `StreamPrefs` now lets you specify a country code, letting embedders
make use of the feature
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
In one case, we use WeightRole::Exit on circuits that can't
actually be used to exit. This commit adds a comment to explain
why, so that we don't wonder about it in the future, and we have
some indication of whether it's still appropriate.
Closes #785
|
| |
|
|
|
|
| |
This resolves a few dead-code warnings.
Closes #801.
|
| | |
|
| |
|
|
|
| |
This only builds the first 3 hops. It can be extended to a fourth
hop later -- or not, depending on the circuit kind.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
These arguments were used only for legacy (testing) purposes; the
tests now use `TestNetDirProvider`. This lets us simplify our
internal logic for passing a `NetDir` to our samples, and prepare
for having a `BridgeSet` to pass there instead.
This is a breaking change to `guardmgr` and `circmgr`.
|
| |
|
|
|
| |
It doesn't seem to me like it makes sense to provide the backward
compatibility here.
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously we could only use Relay for this case, which won't work
any more: a Bridge is not a `tor_netdir::Relay`. Instead we allow
the GuardMgr to give us something that knows how to convert itself
into an OwnedCircTarget.
This change required a far amount of follow-on revisions and
refactoring, but it should all be internal to the path-building
logic.
|