summaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr
Commit message (Collapse)AuthorAgeFilesLines
...
| * tor-guardmgr: Remove unnecessary mutable reference.Gabriela Moldovan2024-04-152-4/+4
| |
| * tor-guardmgr: Remove outdated TODO.Gabriela Moldovan2024-04-151-6/+0
| | | | | | | | It was addressed in !2083
| * tor-guardmgr: Remove outdated documentation.Gabriela Moldovan2024-04-151-3/+0
| | | | | | | | | | This is no longer true because of !2082. The `VanguardSet` *does* own its `TimeBoundVanguards`.
| * tor-guardmgr: Remove unused TimeBoundVanguard implementations.Gabriela Moldovan2024-04-151-24/+0
| | | | | | | | These are not used anymore as of !2082, so we can remove them now.
* | vanguards: Fix another doc refIan Jackson2024-04-151-1/+1
| | | | | | | | This was a typo.
* | vanguards: Fix a doc refIan Jackson2024-04-151-2/+3
|/ | | | This is a broken link when built without --document-private-items.
* tor-guardmgr: Split derive list over multiple lines.Gabriela Moldovan2024-04-111-2/+4
|
* tor-guardmgr: Derive Ord for VanguardMode.Gabriela Moldovan2024-04-112-12/+16
|
* tor-guardmgr: Expand on a TODO about handling config changes.Gabriela Moldovan2024-04-111-0/+4
|
* tor-guardmgr: Add a TODO about updating has_onion_svc on reconfigure.Gabriela Moldovan2024-04-111-0/+1
|
* tor-guardmgr: Fix typo in VanguardMgr error message.Gabriela Moldovan2024-04-111-1/+1
|
* tor-guardmgr: Read the VanguardMode from VanguardParams.Gabriela Moldovan2024-04-111-26/+54
| | | | | | Based on our discussion on https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/258#note_3011734 If it turns out this is not the behaviour we want, we can update `Inner::mode()` accordingly.
* tor-guardmgr: Store whether we're running an onion svc.Gabriela Moldovan2024-04-111-1/+8
| | | | | | The `VanguardMgr` needs to know whether arti is running as an onion service or not, in order to figure out which of the `vanguards_enabled` and `vanguards_hs_service` modes to use.
* tor-guardmgr: Add the two VanguardModes to VanguardParams.Gabriela Moldovan2024-04-111-0/+12
| | | | | | | | We have two vanguard modes, one for when arti is running as a client, and a separate one for when it's running as a service. Both modes are extracted from the `NetParameters`, so they belong in `VanguardParams`.
* tor-guardmgr: Replace vanguard heap with a simpler approach.Gabriela Moldovan2024-04-102-134/+118
| | | | | | | | | | | | | | | | | | As mentioned in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2075#note_3016306 using a heap isn't the best way to manage the vanguards: * in the default case, which will apply to most users, the L2 and L3 set sizes are 4 and 8 respectively. Using a heap doesn't make sense for such small sets * the use of `Weak<TimeBoundVanguard>`s will be an inconvenience later on, when we implement vanguard set persistence, since `Weak` isn't serializable or deserializable This switches to a simpler apporach, where the `VanguardMgr` computes the soonest expiration timestamp of its `VanguardSet`s by iterating over all the vanguards in each set. Closes #1366
* tor-guardmgr: Do not store the NetDir in VanguardMgr.Gabriela Moldovan2024-04-101-31/+23
| | | | | Instead, we try to get a `NetDir` from the `NetDirProvider` each time we `run_once()`.
* tor-guardmgr: Remove unnecessary call to discard_expired().Gabriela Moldovan2024-04-102-3/+8
|
* tor-guardmgr: Rename vanguards to vanguards heap for clarity.Gabriela Moldovan2024-04-101-12/+12
|
* tor-guardmgr: Remove unused params field.Gabriela Moldovan2024-04-101-4/+0
|
* tor-guardmgr: Validate lifetimes before constructing VanguarParams.Gabriela Moldovan2024-04-101-4/+35
| | | | | If the [min, max] lifetime interval for a vanguard layer is the empty set (i.e. min > max), we return the default lifetime.
* tor-guardmgr: Hold a weak reference to NetDirProvider.Gabriela Moldovan2024-04-101-7/+14
|
* tor-guardmgr: Don't recreate the event stream for each iteration (fmt).Gabriela Moldovan2024-04-101-1/+7
|
* tor-guardmgr: Don't recreate the event stream for each iteration.Gabriela Moldovan2024-04-101-3/+5
|
* tor-guardmgr: Only replenish the L3 sets if full vanguards are in use (fmt).Gabriela Moldovan2024-04-101-8/+2
|
* tor-guardmgr: Only replenish the L3 sets if full vanguards are in use.Gabriela Moldovan2024-04-101-33/+54
|
* tor-guardmgr: Clarify VanguardMgr::select_vanguard behaviour.Gabriela Moldovan2024-04-091-0/+9
|
* tor-guardmgr: Use ids_listed() instead of by_ids() (fmt).Gabriela Moldovan2024-04-091-1/+2
|
* tor-guardmgr: Use ids_listed() instead of by_ids().Gabriela Moldovan2024-04-091-1/+1
|
* tor-guardmgr: Update TODO to say we want RelayUsage::vanguard().Gabriela Moldovan2024-04-091-1/+1
|
* tor-guardmgr: Explain why we're making a uniform choice.Gabriela Moldovan2024-04-091-0/+3
|
* tor-guardmgr: Add tests for the vanguard manager.Gabriela Moldovan2024-04-053-0/+392
|
* tor-guardmgr: Replenish the vanguard sets as needed.Gabriela Moldovan2024-04-052-13/+222
|
* tor-guardmgr: Implement From<&VanguardSet> for RelayIdSet.Gabriela Moldovan2024-04-051-1/+20
|
* tor-guardmgr: Add a function for selecting vanguard lifetimes.Gabriela Moldovan2024-04-051-0/+28
|
* tor-guardmgr: Implement VanguardSet::pick_relay.Gabriela Moldovan2024-04-052-12/+35
| | | | Closes #1340
* tor-guardmgr: Implement vanguard mgr.Gabriela Moldovan2024-04-051-10/+114
|
* tor-guardmgr: Make TimeboundVanguard fields pub(super).Gabriela Moldovan2024-04-051-2/+2
|
* tor-guardmgr: Add VanguardMgrError::NetDir.Gabriela Moldovan2024-04-051-0/+5
|
* tor-guardmgr: Store the TimeboundVanguards in a binary heap.Gabriela Moldovan2024-04-052-5/+47
|
* tor-guardmgr: Implement launch_background_tasks.Gabriela Moldovan2024-04-051-4/+35
|
* tor-guardmgr: Give VanguardSets a target set size.Gabriela Moldovan2024-04-052-4/+18
| | | | | The target is the number of vanguards the `VanguardMgr`s will try to maintain in the `VanguardSet`.
* tor-guardmgr: Derive getters for VanguardParams.Gabriela Moldovan2024-04-051-1/+7
|
* tor-guardmgr: Pass an rng to select_vanguard.Gabriela Moldovan2024-04-052-3/+7
| | | | | This function will need to randomly select a vanguard, so it needs an `Rng`.
* tor-guardmgr: Give VanguardMgr a handle to the runtime (fmt).Gabriela Moldovan2024-04-051-1/+5
|
* tor-guardmgr: Give VanguardMgr a handle to the runtime.Gabriela Moldovan2024-04-051-9/+8
|
* tor-guardmgr: Implement TryFrom<&NetParameters> for VanguardParams.Gabriela Moldovan2024-04-051-3/+18
|
* tor-guardmgr: Fix typo in VanguardSet docs.Gabriela Moldovan2024-04-051-1/+1
|
* Merge branch '504-cleanup-part1' into 'main'Nick Mathewson2024-04-032-8/+16
|\ | | | | | | | | Move fiddly Relay functionality into a RelayDetails type. See merge request tpo/core/arti!2057
| * Remove all *Relay is_flagged_guard methods.Nick Mathewson2024-03-281-3/+3
| | | | | | | | These were only used for testing.
| * Remove temporary functions in CheckedRelay.Nick Mathewson2024-03-282-7/+14
| |