aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/config/restricted_discovery
Commit message (Collapse)AuthorAgeFilesLines
* config: Add a method to fill in a builder with unset defaultsNick Mathewson2026-05-271-0/+1
| | | | | | | | | | | | | | | 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)`.
* hsservice: Port to use derive_deftly(TorConfig)Nick Mathewson2026-02-171-5/+10
| | | | | Some of the behaviors of the existing types here are nonstandard; I've kept them and documented them, to avoid breaking compatibility.
* hsservice: Move derive_more::From out of internal_prelude.Nick Mathewson2025-08-191-0/+1
| | | | | | | | | | | | | | This fixes an error from nightly. The trouble is that with nightly, there's a now a [derive macro for From][issue]. That doesn't cause a conflict when we `use derive_more::From`, but it _does_ cause a conflict when we import `derive_more::From` via `use internal_prelude::*`. So as a solution, we just import `derive_more::From` explicitly. Closes #2124 [issue]: https://github.com/rust-lang/rust/pull/144922
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-181-8/+7
| | | | | | | | | | | | | | | | This is a big change across multiple crates since there isn't a good way to break it up. This changes the signature of `CfgPath::path` to: ``` pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> { ``` Making this change means that our global `CfgPathResolver` needs to be stored in the 'arti-client' library instead of `tor-config-path`, and must be passed through to anything that calls `path` to expand the variables.
* tor-hsservice: pass through the `CfgPathResolver`Steven Engler2024-11-181-1/+2
|
* tor-config: removed re-export of `CfgPath`Steven Engler2024-11-041-1/+2
| | | | | Also updated other packages to get `CfgPath` directly from `tor-config-path' instead of 'tor-config'.
* tor-hsservice: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-1/+1
| | | | Part of #1476
* tor-hsservice: Rewrite read_keys impl to be more functional.Gabriela Moldovan2024-08-051-21/+11
|
* tor-hsservice: Use DirEntry::file_name to simplify key file reading logic.Gabriela Moldovan2024-08-051-19/+14
|
* tor-hsservice: Give static_keys precedence over key_dirs (fmt).Gabriela Moldovan2024-08-051-1/+3
|
* tor-hsservice: Give static_keys precedence over key_dirs.Gabriela Moldovan2024-08-051-16/+5
| | | | | This rewrites `RestrictedDiscoveryConfig::read_keys` to give `static_keys` precedence over the keys from `key_dirs`.
* tor-hsservice: Add restricted discovery configuration.Gabriela Moldovan2024-08-051-0/+278