summaryrefslogtreecommitdiff
path: root/crates/tor-dircommon/src
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-094-0/+4
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* dd(TorConfig): change the order of default vs magicNick Mathewson2026-05-271-2/+2
| | | | | | | | | | | | | | | | | | This affects the automatic builder code made by our derive_deftly macro. It is only relevant (for now) in the case of the `NonZero<>` types and their special handling. Previously, when a builder contained Option<U>, and we wanted to generate a configuration holding T, we would _first_ apply a transformation from Option<U> to Option<T> and _second_ unwrap the result or apply a default. Now, we _first_ convert from Option<U> to U by applying a default, and only _then_ perform any necessary conversion from U and T. This is only relevant in the case where U and T are different. It simplifies writing the defaults for `NonZero` options, and will significantly simplify the logic for setting builder defaults.
* dircommon: Port to use derive_deftly(TorConfig)Nick Mathewson2026-02-174-119/+65
| | | | | Some of the behaviors of the existing types here are nonstandard; I've kept them and documented them, to avoid breaking compatibility.
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* tor-dircommon: De-duplicate example from AuthorityContactClara Engler2026-01-221-35/+0
|
* tor-dircommon: Fix clippy warningClara Engler2026-01-221-1/+1
|
* tor-dircommon: Remove legacy authority syntaxClara Engler2026-01-222-149/+16
| | | | | | Because arti 2.0 is pending, it is good to get rid of technical debt, such as the legacy syntax for specifying directory authorities, which had been replaced by prop330 a few months ago.
* tor-dircommon: Document prop330 syntax betterClara Engler2026-01-221-0/+35
| | | | | This commit adds more documentation/examples for the prop330 syntax for specifying directory authorities.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-064-4/+4
| | | | Run maint/add_warning
* tor-dircommon: Add TODO to DirTolerance::DefaultClara Engler2025-10-301-0/+2
|
* tor-linkspec: Change HasAddrs::addrs to return an IteratorIan Jackson2025-10-061-2/+2
| | | | | | | | This will let us model the actual structure of routerstatus entries in netdocs more closely. They don't have the addresses in a single list. When this code was written this would have been much more awkward, but now we have RPITIT.
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* tor-dircommon: Add prop330 unit testsClara Engler2025-09-162-0/+77
|
* tor-dircommon: Derive default authority contactsClara Engler2025-09-161-1/+1
|
* tor-dircommon: Backwards compatibility for authsClara Engler2025-09-162-5/+132
|
* tor-dircommon: Implement proposal 330Clara Engler2025-09-162-206/+114
| | | | | | | This commit implements proposal 330 in the context of `tor-dircommon`, by replacing the single `Authority` structure used in a list context by a single structure called `AuthorityContacts` which contains all v3idents, upload, download, and vote endpoints in one central place.
* Move `FallbackDir` into `tor-dircommon`Clara Engler2025-09-113-5/+163
|
* tor-dircommon: Replace amplify via getsetClara Engler2025-09-111-9/+11
| | | | See !3200
* tor-dircommon: Use amplify and getters for configClara Engler2025-09-091-18/+18
|
* tor-dircommon: Make config non_exhaustiveClara Engler2025-09-091-0/+3
|
* Move `DirTolerance` into `tor-dircommon`Clara Engler2025-09-091-0/+63
| | | | | This commit moves the `DirTolerance` structure from `tor-dirmgr` into `tor-dircommon`.
* Move `DownloadSchedule` into `tor-dircommon`Clara Engler2025-09-083-1/+260
| | | | | This commit moves the `DowenloadSchedule` related types from `tor-dirmgr` into `tor-dircommon`.
* Move `NetworkStatus` to `tor-dircommon`Clara Engler2025-09-082-0/+88
| | | | | | This commit moves `NetworkStatus` from `tor-dirmgr::config` to `tor-dircommon::config` in order to start the work on a common place for configuration options shared by both directory implementations.
* tor-dircommon: Add dirports field to authorityClara Engler2025-09-021-16/+91
|
* tor-dircommon: Initial commitClara Engler2025-09-022-0/+192
This commit initializes the `tor-dircommon` crate: A crate serving the purpose to form an umbrella for the lowest common denominator primitives found across crates implementing (parts of) the directory specification. For now, the only such primitive is the found within the `authority` module, which has been refactored from `tor-dirmgr` into this crate, alongside additional getter functions due to the lack of `pub(crate)` in this context. In the future, we may move further primitives away from `tor-dirmgr` into `tor-dircommon`.