summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src
Commit message (Collapse)AuthorAgeFilesLines
* tor-guardmgr: Replace From impl with from_net_parameter constructor.Gabriela Moldovan2024-03-261-2/+8
|
* tor-guardmgr: Implement From<BoundedInt32> for VanguardMode.Gabriela Moldovan2024-03-261-0/+13
| | | | | We'll need this to convert the `vanguard_enabled` and `vanguard_hs_service` net params to a `VanguardMode.
* tor-circmgr: Fix a clippy warning.Gabriela Moldovan2024-03-212-2/+2
|
* tor-guardmgr: Explain what neighbor_exclusion is for.Gabriela Moldovan2024-03-212-3/+25
|
* tor-guardmgr: Make Vanguard::select_relay take a RelayExclusion.Gabriela Moldovan2024-03-212-2/+9
| | | | | | | This enables us to prevent the same relay from being picked in consecutive positions in a path. Part of #1340
* tor-circmgr: Unconditionally define VanguardMode.Gabriela Moldovan2024-03-203-20/+36
|
* tor-guardmgr: Derive getters for Vanguard.Gabriela Moldovan2024-03-201-2/+1
|
* tor-guardmgr: Add a function for getting the current VanguardMode.Gabriela Moldovan2024-03-201-0/+5
|
* Run maint/add_warning.Nick Mathewson2024-03-1310-0/+10
|
* Annotate usage of low_level_predicate_permits_relayNick Mathewson2024-03-121-1/+7
|
* Rename the RelayPredicate trait to discourage its being used directly.Nick Mathewson2024-03-121-2/+2
| | | | Everybody who can, should instead use a RelaySelector.
* Add comments about "unaccompanied" use of Relay{Usage,Exclusion}Nick Mathewson2024-03-121-0/+2
| | | | | | When used outside of RelaySelector, these two types don't enforce one another's presence, and as such have a bit more risk of negligent use.
* guardmgr: explain remaining work for #504 issues.Nick Mathewson2024-03-121-2/+4
|
* guardmgr: refactor most logic for relay selectionNick Mathewson2024-03-122-29/+55
|
* tor-guardmgr: Return an error if VanguardMode does not support the specified ↵Gabriela Moldovan2024-03-112-6/+29
| | | | Layer.
* tor-guardmgr: Move the VanguardSets into the inner mutable state.Gabriela Moldovan2024-03-112-12/+13
|
* tor-guardmgr: Say more about TimeBoundVanguards.Gabriela Moldovan2024-03-111-0/+8
|
* tor-guardmgr: Add TODO about reading vanguards from disk.Gabriela Moldovan2024-03-111-0/+1
|
* tor-guardmgr: Make the VanguardMode variants serialize to lowercase.Gabriela Moldovan2024-03-111-0/+1
|
* arti-client: Re-export VanguardsConfig from vanguards module.Gabriela Moldovan2024-03-111-1/+1
|
* tor-circmgr: Give CircMgr a VanguardMgr.Gabriela Moldovan2024-03-111-0/+4
| | | | Closes #1277
* tor-guardmgr: Add vanguards API skeleton.Gabriela Moldovan2024-03-114-0/+292
| | | | Part of #1275
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Mark code with "TODO #504" and "TODO #789".Nick Mathewson2024-02-222-0/+4
| | | | | | | | 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.
* Add and use "UncheckedRelay::is_suitable_as_guard"Nick Mathewson2024-02-201-1/+1
|
* Require that guards are Fast and Stable.Nick Mathewson2024-02-202-3/+6
| | | | | | This matches the behavior of C tor. Part of #1100.
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-122-14/+8
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* guardmgr: Stop using now-needless retain_mut crate.Nick Mathewson2023-11-302-10/+2
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-112-6/+3
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-ptmgrIan Jackson2023-10-111-1/+4
|
* oneshot: Use veneer in tor-guardmgrIan Jackson2023-10-112-2/+3
|
* Add cognitive-complexity exceptions for clippy.Nick Mathewson2023-09-051-0/+1
| | | | I have no idea why these became necessary.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-2310-0/+10
|
* guardmgr: Fix a dead-code warning when built without bridge support.Nick Mathewson2023-08-161-0/+1
|
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* tor-guardmgr: bridges: getter for BridgeConfigBuilder.transportIan Jackson2023-07-201-0/+8
| | | | | BridgeConfigBuilder is Serialize so this isn't making any new API promises. Ideally we'd have getters like this everywhere.
* Merge branch 'bug638' into 'main'Alexander Færøy2023-07-142-4/+14
|\ | | | | | | | | | | | | Stop unconditionally marking bridges as having dir info. Closes #638 See merge request tpo/core/arti!1408
| * Better report for any recurrence of bug #638.Nick Mathewson2023-07-131-0/+14
| |
| * Stop unconditionally marking bridges as having dir info.Nick Mathewson2023-07-131-4/+0
| | | | | | | | | | | | | | | | | | When we implemented bridges, we added code in 08473872abccf389 to conditionally mark their directory info as present or not present. But the we didn't remove the old code to mark them present unconditionally! Fixes #638.
* | Bridges: deduplicate addresses.Nick Mathewson2023-07-131-0/+2
|/ | | | | Currently we list an address for a bridge twice if it is listed both in the bridge line and the bridge descriptor. That can't be right.
* Merge branch 'clippy-allow' into 'main'Ian Jackson2023-07-1110-0/+11
|\ | | | | | | | | clippy: Allow some of our existing code patterns See merge request tpo/core/arti!1396
| * Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-1010-0/+11
| |
* | rng ranges: Use gen_range_infallible() for Duration::ZERO..=TIan Jackson2023-07-101-1/+2
|/
* Remove some needless into_iter() calls.Nick Mathewson2023-07-101-5/+3
| | | | | | Clippy nightly now detects when you're calling into_iter() and passing the result into something that accepts an `impl IntoIterator`.
* rng ranges: Use inclusive Duration ranges in several placesIan Jackson2023-07-071-1/+1
| | | | | | | | | | | | | | Many of these call sites would panic if, somehow, the upper bound was zero. In most cases it is very complicated to see if whether this could happen. However, there is a better answer: Durations are (conceptually) dense, so picking the closed set (which includes its boundary) rather than the open one (which doesn't) will make little practical difference. So change four call sites to use `..=` instead of just `..`.
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* Additional documentation around bridges/PT configurationNick Mathewson2023-07-031-0/+11
| | | | | | | This tries to flesh out some of the details for users who may be new to bridges and PTs. Closes #706.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* guardmgr, netdir: fix some needless-mut warningsNick Mathewson2023-05-181-2/+2
| | | | Found by clippy nightly