summaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
* cargo: Update `arti-*` and `tor-*` to `0.38.0`Clara Engler2026-01-121-6/+6
| | | | | | | | | Done using the following: ```bash for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.38.0 done ```
* tor-config: small typo fix in docsSteven Engler2026-01-071-1/+2
|
* tor_config::listen: Warn on explicit port zero.Nick Mathewson2025-12-161-2/+17
|
* tor_config::Listen: Add methods to check for auto and port 0.Nick Mathewson2025-12-161-0/+37
|
* tor_config::Listen: Add "auto" itemsNick Mathewson2025-12-161-7/+55
| | | | These are a nicer syntax than using port "0" explicitly.
* tor_config::Listen: Deprecate localhost_port_legacy.Nick Mathewson2025-12-161-1/+5
| | | | Nothing actually uses it any more, which is good.
* tor_config::Listen: Refactor legacy methods.Nick Mathewson2025-12-161-22/+26
| | | | | Have the part of them that does the "no multiple addresses" work be common, so that we can simplify how they actually behave.
* 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.
* tor-config: new derive_deftly(TorConfig) template.Nick Mathewson2025-12-093-0/+3042
| | | | | | | | 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.
* Update to derive-deftly 1.6.0Ian Jackson2025-12-031-1/+1
| | | | | | | | | This has: * Fixes to hygiene spans from the new modules feature, needed for my WIP netdoc encoder derive. * A substantially richer `${error }` construct.
* Merge branch 'listen' into 'main'opara2025-12-022-112/+313
|\ | | | | | | | | tor-config: Refactor `Listen` to make usable for arti-relay See merge request tpo/core/arti!3469
| * tor-config: improve comments about adding functionalitySteven Engler2025-12-021-5/+7
| |
| * tor-config: add more comments to `ListenItem`Steven Engler2025-12-021-1/+10
| |
| * tor-config: rename `Listen::is_localhost_only` to `is_loopback_only`Steven Engler2025-12-022-2/+11
| | | | | | | | Assumes that 0.37.0 will be the next version number.
| * tor-config: add new `CustomizableListen`Steven Engler2025-12-021-101/+193
| |
| * tor-config: fix some localhost vs loopback names/commentsSteven Engler2025-11-141-4/+5
| |
| * tor-config: made `InvalidListen` privateSteven Engler2025-11-142-1/+2
| | | | | | | | There was no reason for this to be public.
| * tor-config: simplify a match statementSteven Engler2025-11-141-8/+4
| | | | | | | | This does a little extra cloning, but I think is easier to read.
| * tor-config: add serde error messages to `ListenSerde` and `ListenItemSerde`Steven Engler2025-11-141-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example the old message would look like: ```text target/debug/arti: error: read configuration: Config contents not as expected: Couldn't load configuration: data did not match any variant of untagged enum ListenSerde for key "default.proxy.socks_listen" in command line ``` The new message looks like: ```text target/debug/arti: error: read configuration: Config contents not as expected: Couldn't load configuration: value was not a bool, `u16` integer, string, or list of integers/strings for key "default.proxy.socks_listen" in command line ```
| * tor-config: add more tests for `Listen`Steven Engler2025-11-141-0/+81
| |
| * tor-config: remove unneeded `Serialize`/`Deserialize`Steven Engler2025-11-131-2/+1
| |
* | Bump all the unstable tor- and arti- crates to 0.37.0.Gabriela Moldovan2025-12-021-6/+6
| | | | | | | | | | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.37.0 done
* | Bump the versions of the non-{arti-,tor-} cratesGabriela Moldovan2025-12-021-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` 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): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - equix - caret - safelog - retry-error * crates where functional changes were made, but no APIs were added or broken: - hashx - fs-mistrust - futures-copy * crates where APIs were broken (bump minor): None The bumps from this commit were created using this script: ``` PATCH_NF=( oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard equix caret safelog retry-error ) PATCH=" hashx fs-mistrust futures-copy " ./maint/bump_nodep "${PATCH_NF[@]}" for crate in $PATCH; do cargo set-version --bump patch -p $crate; done ```
* tor-config: fix error source for `ConfigLoadError`Steven Engler2025-11-131-1/+7
|
* Bump derive-deftly to 1.5.0Ian Jackson2025-11-071-1/+1
| | | | | | | This has the meta attributes with optional values feature and also hygiene rework for modules. The breaking changes don't break arti.
* Merge branch 'deftly-1.4' into 'main'opara2025-11-061-1/+1
|\ | | | | | | | | Bump derive-deftly to 1.4.0 See merge request tpo/core/arti!3448
| * Bump derive-deftly to 1.4.0Ian Jackson2025-11-061-1/+1
| | | | | | | | | | | | This will let us use the new modules feature. There are no breaking changes to beta features in 1.4.0.
* | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0613-14/+14
|/ | | | Run maint/add_warning
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-8/+8
| | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* Bump MSRV from 1.85.1 to 1.86Clara Engler2025-10-211-1/+1
|
* tor-config: remove stale comment on `ConfigurationSources::try_from_cmdline`Steven Engler2025-10-081-2/+0
|
* tor-config: add `ConfigurationSources::options()`Steven Engler2025-10-081-0/+7
|
* release: Bump versions.Wesley Aptekar-Cassels2025-10-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we've updated our MSRV, we must bump the minor version for every package. This was done as follows: cargo set-version -p arti 1.6.0 cargo set-version -p oneshot-fused-workaround 0.4.0 cargo set-version -p slotmap-careful 0.4.0 cargo set-version -p test-temp-dir 0.5.0 cargo set-version -p fslock-guard 0.4.0 cargo set-version -p hashx 0.5.0 cargo set-version -p equix 0.4.0 cargo set-version -p caret 0.7.0 cargo set-version -p fs-mistrust 0.12.0 cargo set-version -p safelog 0.6.0 cargo set-version -p retry-error 0.8.0 xargs -I P <<END cargo set-version -p P 0.35.0 tor-basic-utils tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-keymgr tor-chanmgr tor-ptmgr tor-dircommon tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-dirserver tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* 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.
* config: clarify TODO on PaddingLevel.Nick Mathewson2025-09-171-1/+3
|
* Bump MSRV from 1.85 to 1.85.1Nick Mathewson2025-09-091-1/+1
| | | | Closes #2107
* Update to derive-deftly 1.3.0Ian Jackson2025-09-021-1/+1
|
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-8/+8
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.