summaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
* Bump all crates to 0.1.0arti-v0.1.0Nick Mathewson2022-03-011-2/+2
|
* Update README.md files from rustdoc.Nick Mathewson2022-03-011-0/+8
|
* Add warnings about configuration stability.Nick Mathewson2022-02-281-0/+8
|
* Change deny(clippy::all) to warn(clippy::all).Nick Mathewson2022-02-141-1/+1
| | | | Closes #338.
* tor-config: Add HasKind support.Nick Mathewson2022-02-093-0/+44
| | | | This required a few new ErrorKinds.
* Fix invalid path character on windowsMichael2022-01-311-0/+4
|
* Bump the patch version of every crate that changed since 0.0.3Nick Mathewson2022-01-311-1/+1
|
* Explain that CfgPath can look at the environment.Nick Mathewson2022-01-121-1/+2
| | | | Closes #246.
* Bump all crate versions to 0.0.3.Nick Mathewson2022-01-111-1/+1
|
* Minimize the required version for each dependency.Nick Mathewson2022-01-071-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found these versions empirically, by using the following process: First, I used `cargo tree --depth 1 --kind all` to get a list of every immediate dependency we had. Then, I used `cargo upgrade --workspace package@version` to change each dependency to the earliest version with which (in theory) the current version is semver-compatible. IOW, if the current version was 3.2.3, I picked "3". If the current version was 0.12.8, I picked "0.12". Then, I used `cargo +nightly upgrade -Z minimal-versions` to downgrade Cargo.lock to the minimal listed version for each dependency. (I had to override a few packages; see .gitlab-ci.yml for details). Finally, I repeatedly increased the version of each of our dependencies until our code compiled and the tests passed. Here's what I found that we need: anyhow >= 1.0.5: Earlier versions break our hyper example. async-broadcast >= 0.3.2: Earlier versions fail our tests. async-compression 0.3.5: Earlier versions handled futures and tokio differently. async-trait >= 0.1.2: Earlier versions are too buggy to compile our code. clap 2.33.0: For Arg::default_value_os(). coarsetime >= 0.1.20: exposed as_ticks() function. curve25519-dalek >= 3.2: For is_identity(). generic-array 0.14.3: Earlier versions don't implement From<&[T; 32]> httparse >= 1.2: Earlier versions didn't implement Error. itertools at 0.10.1: For at_most_once. rusqlite >= 0.26.3: for backward compatibility with older rustc. serde 1.0.103: Older versions break our code. serde_json >= 1.0.50: Since we need its Value type to implement Eq. shellexpand >= 2.1: To avoid a broken dirs crate version. tokio >= 1.4: For Handle::block_on(). tracing >= 0.1.18: Previously, tracing_core and tracing had separate LevelFilter types. typenum >= 1.12: Compatibility with rust-crypto crates x25519-dalek >= 1.2.0: For was_contributory(). Closes #275.
* extend lints to include 'clippy::all'Daniel Eades2021-12-281-0/+1
|
* address clippy's latest lintDaniel Eades2021-12-201-0/+1
|
* Add a few tests to tor-config.Nick Mathewson2021-12-073-1/+69
|
* Oops: MutCfg shouldn't implement Clone.Nick Mathewson2021-12-071-8/+0
| | | | | | | | We don't want MutCfg to be automatially coneable, or we'll wind up with surprises like the one that this patch fixes in TorClient. (The "surprise" is that reconfigure() would only apply its client-specific options to one client instance.)
* MutCfg: Add map_and_replace.Nick Mathewson2021-12-071-0/+10
| | | | | This will help in the case when a configuration can only partially change.
* MutCfg facility to help with reconfiguration.Nick Mathewson2021-12-072-0/+68
| | | | | | | | | It's useful to keep configuration objects inside a RwLock<Arc<>>, so we can have slightly-stale pointers to the existing configuration structure without holding locks too long. This code adds a MutCfg type with basic support for this pattern, and functions to make it a bit more ergonomic.
* Sketch API for reconfiguration.Nick Mathewson2021-12-073-7/+50
| | | | | | | This patch doesn't actually make anything reconfigurable, but it does create an API that will tell you "you can't change the value of that!" If the API looks reasonable, I can start making it possible to change the values of individual items.
* Merge branch 'simplify_config_helpers' into 'main'eta2021-11-291-3/+1
|\ | | | | | | | | Change sane_defaults() and with_directories() See merge request tpo/core/arti!155
| * Change sane_defaults() and with_directories()Nick Mathewson2021-11-291-3/+1
| | | | | | | | | | | | | | | | The sane_defaults() call is now the same as you get from a default builder: by convention, we just call that method Default::default(). The with_directories() constructor makes more sense as a constructor for the TorClientConfigBuilder than for TorClientConfig.
* | Bump every crate by one patch version.Nick Mathewson2021-11-291-1/+1
|/
* Merge branch 'config-updates-and-tests'Nick Mathewson2021-11-291-0/+4
|\
| * Resolve some warnings in tor-config testNick Mathewson2021-11-251-0/+4
| |
* | add semicolons if nothing returnedDaniel Eades2021-11-251-0/+1
| |
* | deglob some enums, use concise iteration syntaxDaniel Eades2021-11-251-0/+1
|/
* Fix a few typos.Nick Mathewson2021-11-241-1/+1
| | | | Also fix some commonwealth spellings that had slipped in.
* More tests for tor-config.Nick Mathewson2021-11-242-2/+71
|
* Make every Config type implement Eq.Nick Mathewson2021-11-211-2/+2
| | | | | Doing this is necessary for reconfiguration support, and will help a lot with testing, too.
* Rename .gitignore APP_FOO to ARTI_FOO.Nick Mathewson2021-11-211-12/+12
| | | | | | | | Since these shell-variables are hardwired to use org.torproject.Arti as the program name, it isn't appropriate to call them "app-specific". If we someday reinstate APP_FOO, it should be based on a user-provided application name.
* Give CfgPath an alternative inner representation.Nick Mathewson2021-11-211-24/+41
| | | | | | | | In order to handle explicitly specified path buffers directly, we now let CfgPath be either a string (that gets expanded) or a PathBuf (that doesn't). This simplifies TorClientConfig::with_directories()
* Make arti-client config object match arti config better.Nick Mathewson2021-11-211-0/+13
| | | | | | | | Now every section that the two configuration objects share has the same type and name. This should help us in documenting our configuration in a way that doesn't confuse people. There is still lots of API work to go.
* Use named fields for the elements of ConfigBuildErrorNick Mathewson2021-11-181-13/+33
|
* Move top-level configuration downwards from `arti` to `arti-config`.Nick Mathewson2021-11-186-318/+83
| | | | | | | | 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.
* Remove dependency from arti-client to tor-config.Nick Mathewson2021-11-161-0/+2
| | | | | I'm about to make tor-config a higher-level module, so it can't be a dependency for tor-config.
* Bump all crate versions to 0.0.1Nick Mathewson2021-10-291-1/+1
|
* Improve and future-proof the `arti` CLIeta2021-10-271-54/+22
| | | | | | | | | | | | | | | | | | | | | | | | This switches out `arti`'s argument-parsing library with `clap`, which is a lot more featureful (and very widely used within the Rust ecosystem). We also now use a lot of `clap`'s features to improve the CLI experience: - The CLI now expects a subcommand (currently, either "help", or "proxy" for the existing SOCKS proxy behaviour). This should let us add additional non-SOCKS-proxy features to arti in future. - `clap` supports default values determined at runtime, so the way the default config file is loaded was changed: now, we determine the OS-specific path for said file before invoking `clap`, so the help command can show it properly. - The behaviour of `tor_config` was also changed; now, one simply specifies a list of configuration files to load, together with whether they're required. - That function also way overused generics; this has been fixed. - Instead of using the ARTI_LOG environment variable to configure logging, one now uses the `-l, --log-level` CLI option. (The intent is for this option to be more discoverable by users.) - The `proxy` subcommand allows the user to override the SOCKS port used on the CLI without editing the config file.
* Remove #![allow(clippy::unwrap_used)] in cmdline.rsNick Mathewson2021-10-211-1/+0
|
* Fix most warnings from nightly.Nick Mathewson2021-10-191-0/+1
| | | | (One represents code that I forgot to write.)
* enable checked_conversions lint.Nick Mathewson2021-10-091-0/+1
|
* Upgrade memmap2, directories, and dirs dependencies.Nick Mathewson2021-09-231-2/+2
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-083-0/+4
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-275-0/+557
This will cause some pain for now, but now is really the best time to do this kind of thing.