summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/builder.rs
Commit message (Collapse)AuthorAgeFilesLines
* HS configuration: Plumb configuration through (clippy)Ian Jackson2023-06-281-1/+1
| | | | Apply deferred clippy churn.
* Also require that TorClientBuilder be Sync.Nick Mathewson2023-06-261-2/+2
|
* arti-client: Mark DirProviderBuilder Send+Sync;Nick Mathewson2023-06-261-1/+15
| | | | | | | | | | Doing this causes TorClientBuilder to become Send. I also add a test to ensure that TorClientBuilder remains Send in the future. This isn't a semver break, but only because DirProviderBuilder is marked with `experimental-api`. Closes #924
* dirmgr Store: Have constructors take DirMgrStoreIan Jackson2022-11-141-2/+4
| | | | | | | Now the Store is constructed by arti_client, solving the problem described here https://gitlab.torproject.org/tpo/core/arti/-/issues/631#note_2853665 but in a different way.
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* arti_client: Split DirMgr error into useful types.Nick Mathewson2022-07-211-1/+1
|
* arti-client: Remove code related to overriding fs-mistrust.Nick Mathewson2022-07-191-31/+0
| | | | | | | | This logic can now be adjusted via the config object so that it does its own overriding by looking at the environment as appropriate. Removing these methods helps simplify the code a bit. Enabled by #483.
* Move responsibility for disable-fs-mistrust envvar.Nick Mathewson2022-07-191-28/+3
| | | | | | | The variable is now handled when building the configuration, and no longer needs to be special-cased. Closes #483.
* Remove now-redundant Send+Sync constraints alongside NetDirProviderNick Mathewson2022-06-071-2/+2
|
* Make fs-mistrust configurable from the top level.Nick Mathewson2022-05-241-19/+46
| | | | | | This change requires a little refactoring of TorClientBuilder: now, instead of enabling or disabling mistrust, it enables or disables the decision to _override_ the mistrust in the config.
* fs-mistrust: make Mistrust have a corresponding Builder type.Nick Mathewson2022-05-241-2/+1
| | | | | This is an approximately minimal revision to get Builder in place; subsequent commits will clean up the API.
* Remove "Mistrust" from the public API of arti-client.Nick Mathewson2022-05-091-7/+0
| | | | | | | | | | I'm doing this per discussion, so that we can have it be part of the TorConfig later on, and not break stuff as we change the Mistrust API to have a builder. This change, unfortunately, results in a little more internal complexity and duplicated code in arti and arti-client. I've marked those points with TODOs.
* arti: use fs-mistrust to validate configuration file locations.Nick Mathewson2022-05-091-12/+2
|
* arti-client: Configure and use fs-mistrust.Nick Mathewson2022-05-091-0/+47
| | | | | | This is derived from the environment, not the configuration file: We might not want to trust the configuration file until we've decided whether we like its permissions.
* Fix grammar and typosSamanta Navarro2022-04-271-1/+1
|
* Abolish filter::DynFilter in favour of transparent DirFilterIan Jackson2022-03-251-3/+3
| | | | | | | | | | | | There are two reasons why the DynFilter newtype might be needed: 1. To impl Default. But we don't need it to impl Default since we can have an accessor which does the defaulting. 2. To hide the API. But this is usrely an unstable API. Just writing Arc<dyn> gets rid of a lot of unnecessary boilerplate and conversion code.
* Make DirFilter be Debug + Send + SyncIan Jackson2022-03-251-1/+1
| | | | | Abolish the handwritten Debug impl for DynFilter, which is no longer needed.
* Expose DirFilter from arti-client.Nick Mathewson2022-03-241-0/+28
| | | | | This will make it possible to implement a directory-munging mechanism in arti-testing for #397.
* Have caller of dirmgr_builder() provide Arc.Nick Mathewson2022-03-021-2/+2
|
* DirProvider: Fix infinite recursion bugNick Mathewson2022-02-251-1/+1
|
* Add a builder function for replacing a DirProvider.Nick Mathewson2022-02-231-7/+62
| | | | Put it behind experimental_api.
* Documentation suggestion from review.Ian Jackson2022-02-231-1/+1
|
* Make a TorClientBuilder API.Nick Mathewson2022-02-181-0/+78
This is a defensive API choice to protect against the possibility that we'll want to add a bunch of other non-config options in the future. Closes #350