aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-guardmgr/src/vanguards/config.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-guardmgr: Fix broken doc link.Gabriela Moldovan2024-06-031-1/+1
|
* tor-guardmgr: Unconditionally define VanguardConfig.Gabriela Moldovan2024-06-031-16/+0
| | | | | | | | | 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`.
* tor-guardmgr: Add a TODO about using the vanguard consensus params.Gabriela Moldovan2024-04-291-0/+3
|
* tor-guardmgr: Remove old TODO about making VanguardMode a VanguardParam.Gabriela Moldovan2024-04-291-3/+0
| | | | | | | | | `VanguardParams` already contains the `vanguards_enabled` and `vanguards_hs_service` `VanguardMode` params. We still intend to abolish `VanguardConfig` in favour of deriving the `VanguardMode` from the consensus params (#1382), but this is not the right place for such a TODO.
* tor-guardmgr: Remove unnecessary clippy allows.Gabriela Moldovan2024-04-291-1/+0
| | | | None of these should be unused anymore.
* tor-guardmgr: By default, use full vanguards for onion services.Gabriela Moldovan2024-04-221-2/+2
| | | | | | | By default, HS clients should be using lite vanguards, and HS services full vanguards. See https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/258#note_3011734
* tor-guardmgr: Remove outdated TODO.Gabriela Moldovan2024-04-151-6/+0
| | | | It was addressed in !2083
* 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: 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: Derive getters for VanguardParams.Gabriela Moldovan2024-04-051-1/+7
|
* tor-guardmgr: Implement TryFrom<&NetParameters> for VanguardParams.Gabriela Moldovan2024-04-051-3/+18
|
* tor-circmgr: Unconditionally define VanguardMode.Gabriela Moldovan2024-03-201-18/+2
|
* tor-guardmgr: Return an error if VanguardMode does not support the specified ↵Gabriela Moldovan2024-03-111-1/+5
| | | | Layer.
* tor-guardmgr: Make the VanguardMode variants serialize to lowercase.Gabriela Moldovan2024-03-111-0/+1
|
* tor-guardmgr: Add vanguards API skeleton.Gabriela Moldovan2024-03-111-0/+97
Part of #1275