summaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.43.0Gabriela Moldovan2026-06-011-6/+6
| | | | | | | | | | Done using: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.43.0 done ```
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround web-time-compat slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` We split them in the following categories: * crates with no changes (no version bumps): ``` oneshot-fused-workaround: No change. web-time-compat: No change. slotmap-careful: No change. test-temp-dir: No change. caret: No change. safelog: No change. retry-error: No change. futures-copy: No change. ``` Obtained with: ``` maint/changed-crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version, but not the dependend-on version): - equix * crates where functional changes were made, but no APIs were broken (bump patch): - fs-mistrust * crates where APIs were broken (bump minor): - hashx - fslock-guard The bumps from this commit were created using this script: ``` PATCH_NF=( equix ) PATCH=" fs-mistrust " MINOR=" hashx fslock-guard " ./maint/bump-nodep "${PATCH_NF[@]}" for crate in $PATCH; do cargo set-version --bump patch -p $crate; done for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* config: Simplify ConfigurationTree::merge_from to take &mut self.Nick Mathewson2026-05-272-8/+9
|
* Apply 3 suggestion(s) to 2 file(s)Nick Mathewson2026-05-271-2/+2
| | | Co-authored-by: gabi-250 <[email protected]>
* config: Update doctests to use Deftly, and to passNick Mathewson2026-05-273-16/+24
| | | | | | | | Some of the tests used derive(Builder), which is not current practice for our configuration. Additionally, they didn't implement the requisite ConfigBuilder logic to pass with the other changes in this branch.
* Give resolve_return_results options to control output_tree.Nick Mathewson2026-05-272-13/+49
| | | | | | | I've left the options here as booleans, but moved them into a struct. (IMO, booleans are at their riskiest when they are passed as function arguments, and much less risky when they are used as struct fields.)
* config: Add an `output_tree` to our resolver methods.Nick Mathewson2026-05-271-5/+33
| | | | | | This functionality exposes the part of the configuration tree that was actually used, along with any defaulted values. RPC will want this.
* config: Add a dd(TorConfig) attribute to override apply_defaults().Nick Mathewson2026-05-271-1/+36
|
* config: Add a method to fill in a builder with unset defaultsNick Mathewson2026-05-276-1/+123
| | | | | | | | | | | | | | | This new method modifies a builder by replacing any unset values that have a default with that default. We're using this method so that we can re-serialize a builder into a `ConfigurationTree` with all of its default values included. In all cases, `b.apply_defaults()?; b.build()` should produce the same output as `b.build()`. The interesting parts of this commit are in tor_config::load and tor_config::derive. The rest of this commit just adds `apply_defaults` to other builders that _aren't_ made with `derive_deftly(TorConfig)`.
* config: Implement Builder for ListBuilders and MapBuilders.Nick Mathewson2026-05-272-0/+15
| | | | This isn't strictly necessary, but it helps for consistency.
* dd(TorConfig): change the order of default vs magicNick Mathewson2026-05-271-21/+28
| | | | | | | | | | | | | | | | | | 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.
* config: Fix documentation of ResolutionResultsNick Mathewson2026-05-271-1/+1
| | | | It previously referred to a function that didn't exist.
* Move metrics config types to tor-config.Wesley Aptekar-Cassels2026-05-262-0/+35
| | | | | | | | | | | | | | This will allow these types to be shared by arti and arti-relay. This does change these types from being behind the experimental-api flag. I think this is okay, as tor-config is not a stable crate anyways, but it's worth keeping in mind. There is also an argument to be made for having two separate types, one in arti and one in arti-relay, as we do for LoggingConfig. I think that using a single type has benefits, and we should strive to eventually merge the LoggingConfigs, for instance, and perhaps other types, but it doesn't seem critical in either direction at the moment.
* config: Convert some load.rs tests to use dd(TorConfig).Nick Mathewson2026-05-181-18/+11
|
* config: Use derive(TorConfig) for map builder tests.Nick Mathewson2026-05-181-14/+8
|
* config: Implement Default for ConfigurationTree.Nick Mathewson2026-05-181-1/+1
|
* tor-config: remove a needless clone.Nick Mathewson2026-05-181-1/+1
|
* config: Add a merge_from method to ConfigurationTreeNick Mathewson2026-05-182-1/+23
| | | | We'll use this in RPC to implement configuration changing.
* tor-config: Allow inspecting parts of a ConfigurationTree.Nick Mathewson2026-05-122-3/+65
| | | | | | This will be used by RPC. Probably. It might actually be a better to re-serialize the configuration after parsing it, so that our inspection functions can see default values.
* tor-config::derive: use cfg(true) and cfg(false)Nick Mathewson2026-05-071-7/+4
| | | | | Rust 1.88 added these, so we no longer have to use `any()` for false and `all()` for true.
* release: Bump tor- and arti- crate versions.Wesley Aptekar-Cassels2026-05-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cargo set-version -p arti-client 0.42.0 cargo set-version -p arti-config 0.42.0 cargo set-version -p arti-relay 0.42.0 cargo set-version -p arti-rpc-client-core 0.42.0 cargo set-version -p arti-rpcserver 0.42.0 cargo set-version -p arti-testing 0.42.0 cargo set-version -p arti-ureq 0.42.0 cargo set-version -p tor-async-utils 0.42.0 cargo set-version -p tor-basic-utils 0.42.0 cargo set-version -p tor-bytes 0.42.0 cargo set-version -p tor-cell 0.42.0 cargo set-version -p tor-cert 0.42.0 cargo set-version -p tor-cert-x509 0.42.0 cargo set-version -p tor-chanmgr 0.42.0 cargo set-version -p tor-checkable 0.42.0 cargo set-version -p tor-circmgr 0.42.0 cargo set-version -p tor-config 0.42.0 cargo set-version -p tor-config-path 0.42.0 cargo set-version -p tor-consdiff 0.42.0 cargo set-version -p tor-dirclient 0.42.0 cargo set-version -p tor-dircommon 0.42.0 cargo set-version -p tor-dirmgr 0.42.0 cargo set-version -p tor-dirserver 0.42.0 cargo set-version -p tor-error 0.42.0 cargo set-version -p tor-events 0.42.0 cargo set-version -p tor-general-addr 0.42.0 cargo set-version -p tor-geoip 0.42.0 cargo set-version -p tor-guardmgr 0.42.0 cargo set-version -p tor-hsclient 0.42.0 cargo set-version -p tor-hscrypto 0.42.0 cargo set-version -p tor-hsrproxy 0.42.0 cargo set-version -p tor-hsservice 0.42.0 cargo set-version -p tor-key-forge 0.42.0 cargo set-version -p tor-keymgr 0.42.0 cargo set-version -p tor-linkspec 0.42.0 cargo set-version -p tor-llcrypto 0.42.0 cargo set-version -p tor-log-ratelim 0.42.0 cargo set-version -p tor-memquota 0.42.0 cargo set-version -p tor-memquota-cost 0.42.0 cargo set-version -p tor-netdir 0.42.0 cargo set-version -p tor-netdoc 0.42.0 cargo set-version -p tor-persist 0.42.0 cargo set-version -p tor-proto 0.42.0 cargo set-version -p tor-protover 0.42.0 cargo set-version -p tor-ptmgr 0.42.0 cargo set-version -p tor-relay-crypto 0.42.0 cargo set-version -p tor-relay-selection 0.42.0 cargo set-version -p tor-rpcbase 0.42.0 cargo set-version -p tor-rpc-connect 0.42.0 cargo set-version -p tor-rtcompat 0.42.0 cargo set-version -p tor-rtmock 0.42.0 cargo set-version -p tor-socksproto 0.42.0 cargo set-version -p tor-units 0.42.0
* Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`Ian Jackson2026-04-021-1/+1
|
* Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | There are no breaking changes.
* Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* Fix word duplicate typosTobias Stoeckmann2026-03-151-2/+2
|
* Bump strum to 0.28Gabriela Moldovan2026-03-041-1/+1
|
* Bump toml to 1.0.3Gabriela Moldovan2026-03-041-1/+1
|
* Bump all the unstable tor- and arti- crates to 0.40.0.Gabriela Moldovan2026-03-021-6/+6
| | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.40.0 done
* Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2026-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list-crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy ``` Because this release bumps the MSRV, I am bumping the minor version of all of them. MINOR=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error futures-copy " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* tor-config: future-proof #[cfg] attribute.Nick Mathewson2026-02-241-17/+17
|
* tor-config: Add an option to reject configured-out optionsNick Mathewson2026-02-241-6/+55
|
* tor-config: Have macros document more types and fnsNick Mathewson2026-02-242-0/+3
|
* tor-config: Fix cfg() on sub_buildersNick Mathewson2026-02-241-0/+12
| | | | | Previously, it used the sub_builder rule, which doesn't make sense when the value is a stub place-holder to tell us whether to warn.
* Merge branch 'config-migrate-part1' into 'main'gabi-2502026-02-202-4/+16
|\ | | | | | | | | Port several crates to derive_deftly(TorConfig) See merge request tpo/core/arti!3691
| * tor-config: fix and improve ExtendBuilder override.Nick Mathewson2026-02-172-3/+15
| | | | | | | | | | | | | | | | 1. When we are told to `extend_with`, we should obey that directive even if we have a sub_builder etc. 2. Provide an `extend_with_replace` function for the common case where we want to just replace one object with another.
| * tor-config: derive list builders with the visibility of their setters.Nick Mathewson2026-02-171-1/+1
| |
* | Document resolve_option_general behaviormoumenalaoui2026-02-181-10/+39
|/
* 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.
* Bump MSRV from 1.86 to 1.89Gabriela Moldovan2026-02-161-1/+1
| | | | | | | As agreed at our last team meeting. See https://gitlab.torproject.org/tpo/core/arti/#minimum-supported-rust-version
* Merge branch 'feature/cmdline-paths' into 'main'Nick Mathewson2026-02-091-2/+10
|\ | | | | | | | | Allow to set paths in CLI arguments See merge request tpo/core/arti!3556
| * Expand allowable unquoted syntax for configuration arguments in CLI.carti-it2026-02-091-2/+10
| | | | | | | | The set of allowable characters now includes colon, dot, slash, and backslash. This makes it a bit more convenient to pass in paths.
* | release: Remove semver.md files from 2.0.0 release.Wesley Aptekar-Cassels2026-02-021-1/+0
| |
* | release: Bump `arti-*` and `tor-*` crates to 0.39.0Wesley Aptekar-Cassels2026-02-021-6/+6
| | | | | | | | | | | | | | | | | | | | Done via: ``` for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.39.0 done ```
* | Merge branch 'legacy-port-config' into 'main'wesleyac2026-02-022-79/+1
|\ \ | | | | | | | | | | | | | | | | | | arti: Remove `proxy.socks_port` and `proxy.dns_port` Closes #2300 See merge request tpo/core/arti!3622
| * | tor-config: remove `resolve_alternative_specs` functionSteven Engler2026-02-012-81/+1
| | |
| * | arti: remove `resolve_listen_port!` macroSteven Engler2026-01-291-3/+5
| | | | | | | | | | | | | | | | | | I'm undecided whether we want to keep `resolve_alternative_specs` around, but it seems possible/likely that we'll want it in the future, so I think we can keep it.
* | | Merge branch 'main' into 'main'gabi-2502026-02-021-1/+1
|\ \ \ | |/ / |/| | | | | | | | fix(minver): Update paste dependency to be minver compatible See merge request tpo/core/arti!3610
| * | fix(minver): Update paste dependency to be minver compatibleSamuel Cobb2026-01-261-1/+1
| | |
* | | maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
|/ / | | | | | | This adds the lint to all our crates.
* | meta: Remove all semver.md files post-releaseClara Engler2026-01-131-2/+0
| | | | | | | | | | Fix the conflict in tor-netdoc/semver.md by hand, including the new entries already landed since v1.9.0.