summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | arti-relay: advertise config fields are now listsSteven Engler2025-12-092-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```toml [relay.advertise] ipv4 = [] ipv6 = ["[10::]:10"] ``` ```text Error: Failed to resolve configuration [...] The list is empty for key "default.relay.advertise.ipv4" in [...] ```
* | | | | Merge branch 'configure-deftly-v5' into 'main'Nick Mathewson2025-12-0911-113/+3326
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement derive_deftly(TorConfig) Closes #1704 See merge request tpo/core/arti!3513
| * | | | | tor-config: Make derive(Flattenable) use $crate.Nick Mathewson2025-12-091-4/+3
| | | | | |
| * | | | | Revert "tor-config: Code to serialize Option<Option<Duration>> via humantime"Nick Mathewson2025-12-093-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c7c8eb5a03439ce31319389183e64cb0db539fc9.
| * | | | | Demonstration: convert tor-circmgr to use derive_deftly(TorConfig)Nick Mathewson2025-12-091-98/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (We could tighten this up even more by inlining some of the default values.)
| * | | | | tor-config: new derive_deftly(TorConfig) template.Nick Mathewson2025-12-094-0/+3044
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This template is meant to replace most of our use of derive_builder for configuration objects. Where possible and reasonable, it delegates to existing macros, and automatically infers what special patterns we use for individual types. In other cases, it uses compile-time errors to inform the caller about pattern violations.
| * | | | | tor-config: New Buildable trait.Nick Mathewson2025-12-091-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait will be implemented by every type that our derive_deftly(TorConfig) template generates. It will, among other things, help us figure out the Builder type for a given config type in cases where string-pasting magic is intractable, or where we want to use assert_not_impl to double-check the attributes.
| * | | | | tor-config: Helper types for setters to take as argumentsNick Mathewson2025-12-092-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The derive-deftly TorConfig template will use these as appropriate for the inputs to setter functions, based on field types.
| * | | | | tor-config: Code to serialize Option<Option<Duration>> via humantimeNick Mathewson2025-12-093-0/+28
| | | | | |
| * | | | | tor_config: Make ListBuilders implement ExtendBuilder.Nick Mathewson2025-12-091-0/+11
| | | | | |
| * | | | | tor-config: Give Flattenable template a location.Nick Mathewson2025-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't do this, then any attempt to use it from a derive-deftly template will cause a warning about referring to it as $crate::macroname.
| * | | | | tor-config: Allow Flattenable to apply to types with generics.Nick Mathewson2025-12-091-1/+2
| | | | | |
| * | | | | map_builder: Alternative syntax for use by derive(TorConfig)Nick Mathewson2025-12-091-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | derive_deftly wants to expand types before passing them to macro_rules macros, which is quite reasonable. But map_builder wants its input collection type to be an `ident`, not a `path`. (And macro_rules doesn't accept `path` before a `<`.) To fix this, we're providing an alternative syntax for map_builder, where the inputs are the map type and the builder map type.
| * | | | | extend_builder: Implement ExtendBuilder for HashMap.Nick Mathewson2025-12-091-1/+17
| | | | | |
| * | | | | tor-config: missing #[allow(dead_code)] in derive_list_builder_helperNick Mathewson2025-12-091-0/+1
| | | | | |
| * | | | | tor-config: missing $crate in derive_list_builder_helperNick Mathewson2025-12-091-1/+1
| | | | | |
| * | | | | tor-config: obviate need for Educe in derive_list_builder_helperNick Mathewson2025-12-091-2/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | We were only using it for Default, and it is easier to implement Default by hand than it is to keep this particular layer in our leaning tower of macros.
* | | | | Merge branch 'fix-relay-compile' into 'main'David Goulet2025-12-095-9/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | proto: Fix relay/hs-service feature gating See merge request tpo/core/arti!3534
| * | | | | proto: Remove outdated TODO about add_ent_with_id()Gabriela Moldovan2025-12-081-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | We now have add_ent_with_id(), so we can just remove the TODO.
| * | | | | proto: Fix relay/hs-service feature gating (fmt)Gabriela Moldovan2025-12-081-1/+1
| | | | | |
| * | | | | proto: Fix relay/hs-service feature gatingGabriela Moldovan2025-12-085-6/+14
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | Without this, `tor-proto` doesn't compile if you enable the `relay` feature but not `hs-service`.
* | | | | Merge branch 'check-licenses' into 'main'Ian Jackson2025-12-091-6/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | check_licenses: Update comment about priority-queue See merge request tpo/core/arti!3509
| * | | | | check_licenses: Adjust comment on priority-queue exceptionGabriela Moldovan2025-12-091-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Technically `priority-queue` belongs in the `MPL_20_OK` list, but our current checks are too rudimentary to be able to handle the `OR` (we *do* split on `OR` for one of the checks, but we only compare the resulting licenses against `RECOGNIZED_LICENSES`, not `MPL_20_OK`). So for now, let's retain the exception for `priority-queue`. (We could expand the logic in the branch handling the `OR'`d licenses to fix this issue, but the result would be quite fragile; and besides, I think we're going to eventually want to replace this with a proper license parser).
| * | | | | check_licenses: Update comment about priority-queueGabriela Moldovan2025-12-091-2/+0
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They have in fact added the MPL "Exhibit A" text to every file in the crate. The license is still LGPL-3.0-or-later OR MPL-2.0, so the rest of the comment still applies. See https://github.com/garro95/priority-queue/pull/54/commits/e2f90b0811c252f80165bbdb19233464289e428f
* | | | | Merge branch 'fix-32bit-builds' into 'main'opara2025-12-081-4/+10
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | tor-memquota: fix builds for 32-bit platforms See merge request tpo/core/arti!3532
| * | | | tor-memquota: fix builds for 32-bit platformsYaksh Bariya2025-12-091-4/+10
|/ / / / | | | | | | | | | | | | | | | | Multiplying 8 * GIB overflows the usize limit (4 GIB - 1) on 32-bit platforms. So handle this properly for 32-bit platforms
* | | | Merge branch 'mistune' into 'main'opara2025-12-082-13/+138
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | maint: Fix 'extract-md-links' to work with mistune 3.1.3 See merge request tpo/core/arti!3517
| * | | | maint: fix changelog link orderSteven Engler2025-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | This is to make `update-md-links --check CHANGELOG.md` pass.
| * | | | maint: rework 'extract-md-links' interpositionSteven Engler2025-12-081-52/+86
| | | | | | | | | | | | | | | | | | | | Do less parsing, and instead interpose the mistune internals.
| * | | | maint: add comment to 'extract-md-links' re manual parsingSteven Engler2025-12-081-0/+9
| | | | |
| * | | | maint: add a self-test to 'extract-md-links'Steven Engler2025-12-081-0/+39
| | | | |
| * | | | maint: fix 'extract-md-links' to work with mistune 3.1.3Steven Engler2025-12-081-6/+45
| | | | |
| * | | | maint: fix accidental globals in 'extract-md-links'Steven Engler2025-12-081-2/+6
| | | | |
| * | | | maint: fix method names for 'extract-md-links' parsersSteven Engler2025-12-081-4/+4
|/ / / / | | | | | | | | | | | | | | | | `InlineParser::parse_link` isn't publicly documented, so may be subject to more breakage.
* | | | Merge branch 'ticket1223' into 'main'Nick Mathewson2025-12-048-128/+128
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor common code that builds circtargets for HS. Closes #1223 See merge request tpo/core/arti!3530
| * | | | Refactor common code that builds circtargets for HS.Nick Mathewson2025-12-048-128/+128
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was duplicated across hsclient and hsservice. Logically, it belongs in netdir, since that's where we have the latest required-protocol information, and the ability to look up relays by IDs. Closes #1223
* | | | Merge branch 'remove_extra_doc_cfgs_redux' into 'main'Nick Mathewson2025-12-0430-76/+0
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | Remove unnecessary `doc(cfg(...))` attributes (trimmed) See merge request tpo/core/arti!3531
| * | | Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-0430-76/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* | | Merge branch 'netdoc-authcert' into 'main'Clara Engler2025-12-0414-2/+1012
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: Implement new authority certificates See merge request tpo/core/arti!3462
| * | tor-netdoc: Implement new authority certificatesClara Engler2025-12-0413-1/+1011
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements directory authority certificates using the `parse2` approaches. For now, those are in a module `doc::authcert::tmp`, with the eventual goal of moving it into its super module after removing/deprecating the legacy types.
| * | tor-netdoc: Implement (Partial)Eq for VerifyFailedClara Engler2025-12-041-1/+1
| | |
* | | Merge branch 'bump-criterion' into 'main'Ian Jackson2025-12-042-8/+29
|\ \ \ | |/ / |/| | | | | | | | | | | | | | proto: Bump criterion, criterion-cycles-per-byte to 0.8.0 Closes #2281 See merge request tpo/core/arti!3528
| * | proto: Bump criterion, criterion-cycles-per-byte to 0.8.0Gabriela Moldovan2025-12-042-8/+29
| |/ | | | | | | Closes #2281
* | Merge branch 'protover_refactor' into 'main'Nick Mathewson2025-12-0420-107/+137
|\ \ | | | | | | | | | | | | Make Protocols type inherently interned; add notes about usage. See merge request tpo/core/arti!3524
| * | protover: document interning in Protocols docs.Nick Mathewson2025-12-041-0/+8
| | |
| * | proto: Add comment about create_firsthop_fastNick Mathewson2025-12-031-1/+2
| | |
| * | linkspec: Remove comment about expense of cloning protocols.Nick Mathewson2025-12-031-2/+0
| | |
| * | netdoc: Remove protocol interning.Nick Mathewson2025-12-039-71/+48
| | | | | | | | | | | | (It's now done in tor_protover.)
| * | protover: Intern ProtocolsInner.Nick Mathewson2025-12-033-1/+12
| | | | | | | | | | | | | | | This will help us with all the places we want to copy around Protocols objects.
| * | protover: Make Protocols become an Arc internally.Nick Mathewson2025-12-031-25/+42
| | | | | | | | | | | | This will help us make it self-interning.