summaryrefslogtreecommitdiff
path: root/crates/tor-config/src/misc.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* config: clarify TODO on PaddingLevel.Nick Mathewson2025-09-171-1/+3
|
* tor-config: impl `NotAutoValue` for `ByteQty`Steven Engler2025-07-311-0/+3
|
* tor-config: add `ExplicitOrAuto::map` and `From<T> for ExplicitOrAuto<T>`Steven Engler2025-07-311-0/+18
|
* tor-config: move Listen to its own module.Nick Mathewson2024-09-251-377/+1
|
* Fix typosDimitris Apostolou2024-09-031-1/+1
|
* tor-config: Move macro above ExplicitOrAuto definition.Gabriela Moldovan2024-06-031-58/+58
| | | | | | | The macro needs to be defined before `ExplicitOrAuto`, otherwise we can't reference it in its docs. Fixes the broken doc links.
* tor-config: Apply deferred cargo fmt.Gabriela Moldovan2024-06-031-27/+26
|
* tor-config: Cross-reference NotAutoValue in the ExplicitOrAuto docs.Gabriela Moldovan2024-06-031-0/+5
|
* tor-config: Fix a test misusing NotAutoValue.Gabriela Moldovan2024-06-031-15/+11
|
* tor-config: Add macro for implementing NotAutoValue.Gabriela Moldovan2024-06-031-0/+79
|
* tor-config: Add NotAutoValue trait bound to ExplicitOrAuto inner type.Gabriela Moldovan2024-06-031-2/+7
| | | | | | | This is a safeguard to prevent users from using ExplicitOrAuto with types that serialize to the same value as ExplicitOrAuto::Auto. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2146#note_3030692
* tor-config: Add ExplicitOrAuto::{as_value, into_value}.Gabriela Moldovan2024-06-031-0/+30
|
* tor-config: Remove unnecessary bounds.Gabriela Moldovan2024-06-031-6/+1
|
* tor-config: Expand on the ExplicitOrAuto docs.Gabriela Moldovan2024-06-031-0/+52
|
* tor-config: Add ExplicitOrAuto helper.Gabriela Moldovan2024-06-031-2/+97
| | | | | | | | This will be used for the `vanguard.mode` config option. The `VanguardMode` corresponding to the `"auto"` variant will depend on whether the `vanguards` feature is enabled: if the feature is enabled, it is mapped to `VanguardMode::Lite`, and `VanguardMode::Disabled` otherwise.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* educe: Use std's default for two structsIan Jackson2024-02-121-3/+1
| | | | | | Reviewing uses of `#[educe(default)]`, I came across these two places where it was applied to a non-generic struct without any special attributes on fields. std's derive will do just as well here.
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-121-7/+4
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* Test for Listen DisplayJani Monoses2023-09-261-0/+24
|
* Do not writelns in Display, undo localhost_port_legacy changes.Jani Monoses2023-09-251-4/+3
|
* arti, tor-config: Allow listening on generic addresses for SOCKS and DNS.Jani Monoses2023-09-221-3/+29
|
* tor-config: Listen: Clarify localhost_port_legacyIan Jackson2023-09-121-1/+1
| | | | | The previous phrasing was ambiguous and set us up for bugs, see https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1582#note_2942240
* tor-config: Listen: Fix a typoIan Jackson2023-09-121-2/+2
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* tor-config: Remove unused ItemOrBool helper.Gabriela Moldovan2023-07-131-63/+0
| | | | | `ItemOrBool` is currently not used anywhere (it was previously used by the keymgr config).
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* tor-config: Make ItemOrBool an experimental feature.Gabriela Moldovan2023-06-291-0/+4
|
* config: Add ItemOrBool helper for deserializing a bool or a value.Gabriela Moldovan2023-06-291-0/+59
| | | | | | | | | | | | | | | | | | | | This will enable us to support the new `keystore_dir` field, which can be either a boolean indicating whether the keystore is disabled or enabled and initialized with the default keystore dir, or a string which points to a custom keystore directory (and implies the keystore is enabled): ``` # use this path, fail if compiled out # keystore = "/path/to/arti/keystore" # # use default path, fail if compiled out # keystore = true # # disable # keystore = false ``` Part of #891
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Fix various typos (using typos tool and hand-inspection)Nick Mathewson2022-10-181-1/+1
|
* Fix error messageNick Mathewson2022-10-121-1/+1
|
* tor-config: Provide BoolOrAutoIan Jackson2022-10-121-0/+107
| | | | | We're going to use this for the config item `bridges.enabled`, but it seems general enough that it ought to go here.
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-121-0/+1
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* tor-config Listen: Rename localhost_port_legacy (from _deprecated)Ian Jackson2022-08-251-2/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830847
* tor-config Listen: Add a note about EADDRINUSEIan Jackson2022-08-251-0/+1
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830848
* tor-config; Listen: Return addresses in groups for error behaviourIan Jackson2022-08-251-8/+20
| | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830766
* tor-config: Introduce ResolutionResultsIan Jackson2022-08-251-1/+7
| | | | This will allow us to handle new kinds of warnigns etc.
* tor-config: Provide misc::ListenIan Jackson2022-08-251-0/+310
|
* tor-config misc tests: Add standard lint suppression blockIan Jackson2022-08-251-0/+8
|
* Fix typos in comments.eta2022-08-171-1/+1
|
* tor-config: Introduce PaddingLevelIan Jackson2022-08-161-0/+112
This will be used for controlling channel padding, for now.