aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-circmgr/src/config.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Derive Deserialize for derive-builder-generated config buildersIan Jackson2022-03-071-0/+8
| | | | | | | | | | | | | I used git-grep -P '\#\[serde\((?!default|deny_unknown)' to find places where I needed to add additional attributes on the builder method fields. This is currently a bit duplicative, but when #371 is completely done, the validated (non-builder) configs won't need to be Deserialize any more. This is part of #371 and #372.
* Test for PathConfig::at_least_as_permissive_as().Nick Mathewson2022-01-201-0/+29
| | | | | | This is totally not just an exercise to get combined test coverage for tor-circmgr over 90% because I needed something to do that wouldn't distract anybody else. :)
* Rename PathConfig::more_permissive_than()Nick Mathewson2022-01-201-1/+1
| | | | | | Since it implements a "<=" type relationship, it should be called "at_least_as_permissive_as()." Since it's a crate-private function, the long name isn't too bad.
* Remove "self" arg from PathConfig::builder()Nick Mathewson2022-01-201-1/+1
| | | | This was added by mistake.
* Adjust comment to be accurate wrt #263.Nick Mathewson2021-12-161-3/+5
|
* Make preemptive circuits reconfigurable.Nick Mathewson2021-12-071-2/+7
| | | | | | This required re-centralizing the configuration object for preemptive circuits, since previously the settings from it were a bit spread out over the crate.
* Make circuit_timing reconfigurable.Nick Mathewson2021-12-071-2/+6
|
* Allow on-the-fly changing of path_rulesNick Mathewson2021-12-071-0/+14
| | | | | | | | | | | | And now the complexity begins: when the user changes the path_rules, they not only want new circuits to obey those rules: they want _all new requests_ to be put onto circuits that obey those rules. That means that when the path rules become more restrictive, we need to retire all the circuits, and make sure that currently pending circuits aren't used for any requests. If it's any comfort, doing this was even more complicated in C tor. ;)
* Clarify names and docs for predictive circuits.Nick Mathewson2021-12-071-17/+27
| | | | | Also, use humantime_serde, rather than a number of seconds, to indicate configuration time.
* Rename circuits_preemptive to preemptive_circuitsNick Mathewson2021-12-071-12/+12
| | | | | | This obeys a few conventions: * adjective before noun * config objects end with "config"
* Allow configurability on preemptive circuitsNeel Chauhan2021-12-071-0/+82
|
* Ensure that all config sections have deny_unknown_fieldsNick Mathewson2021-11-251-0/+2
| | | | | When we deserialize a configuration, we should reject unknown variables (except when we have an explicit reason to allow them).
* Fix a few typos.Nick Mathewson2021-11-241-4/+4
| | | | Also fix some commonwealth spellings that had slipped in.
* Implement meta-builder pattern for TorClientConfigNick Mathewson2021-11-221-1/+1
| | | | | This should be ergonomic than having to construct every section of the configuration separately.
* Make every Config type implement Eq.Nick Mathewson2021-11-211-3/+3
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* For every* config type, make defaults consistent.Nick Mathewson2021-11-211-7/+28
| | | | | | | | | | This patch makes sure that for every* config type we have, the defaults you get from a Builder match those you get from Serde, and that both match the value that you get from arti_defaults.toml. Later down the line I'll be adding some tests to keep these in sync. * StorageConfig still has no defaults of its own, since we aren't so sure we want other applications to use Arti's directories by default.
* Give every ConfigBuilder a From<Config> implementation.Nick Mathewson2021-11-211-0/+22
| | | | This will make it more convenient to reconfigure things.
* Ensure that every section-level config type has a builder() function.Nick Mathewson2021-11-211-0/+18
|
* Flatten enforce_distance into path_rules.Nick Mathewson2021-11-181-6/+44
| | | | Also use the path_rules name consistently throughout the code.
* Fold "circuit_timing" and "request_timing" into a single section.Nick Mathewson2021-11-181-42/+20
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-181-4/+6
| | | | | | | | To do this at all neatly, I had to split out `tor-config` from `arti-config` again, and putting the lower level stuff (paths, builder errors) into tor-config. I also changed our use of derive_builder to always use a common error type, to avoid error type proliferation.
* Try writing a bit more documentation for configuration types.Nick Mathewson2021-10-281-3/+9
|
* Replace references to arti-client in the documentation.Nick Mathewson2021-10-211-1/+1
|
* tor-client: refactor TorClient::bootstrap's args into a config objecteta2021-10-191-1/+1
| | | | | | | | | | | | | The three arguments TorClient::bootstrap requires by way of configuration have been factored into a new TorClientConfig object. This object gains two associated functions: one which uses `tor_config`'s `CfgPath` machinery to generate sane defaults for the state and cache directories, and one that accepts said directories in order to create a config object with those inserted. (this commit was inspired by trying to use arti as a library and being somewhat overwhelmed by the amount of config stuff there was to do :p)
* Re-export configuration types from tor-client.Nick Mathewson2021-10-091-0/+4
|
* Do not use set_ prefix on derive_builder settersJani Monoses2021-09-161-4/+4
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+102
This will cause some pain for now, but now is really the best time to do this kind of thing.