summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/config.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* client: RunningInner::reconfigure: refactor running → selfNick Mathewson2026-05-261-1/+1
| | | | | (This is a separate commit in order make the code movement in the previous commit clearer.)
* Remove `use_obsolete_software`.Nick Mathewson2026-05-141-52/+0
| | | | | | | | Discussion on #1960 suggests that this option is not a good idea: it encourages developers to work around deliberate signals that the software they're shipping won't work on the network. Closes #1960.
* arti-client: Convert config to derive_deftly(TorConfig).Nick Mathewson2026-02-241-115/+94
| | | | | (There are a few places where we still do things in nonstandard places to avoid API breakage.)
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-1/+0
| | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* tor-circmgr: simplify `CircMgrConfig`Steven Engler2025-11-261-2/+7
| | | | | | | Now that `vanguard_config()` is no longer conditional, we can handle `vanguard_config` just like other accessors. This is a breaking change, but I think we may as well make this change while we've already made another breaking change in the previous commit.
* tor-circmgr,arti-client: `CircMgrConfig::vanguard_config` is always builtSteven Engler2025-11-261-5/+48
|
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-dircommon: Implement proposal 330Clara Engler2025-09-161-18/+10
| | | | | | | This commit implements proposal 330 in the context of `tor-dircommon`, by replacing the single `Authority` structure used in a list context by a single structure called `AuthorityContacts` which contains all v3idents, upload, download, and vote endpoints in one central place.
* Move `FallbackDir` into `tor-dircommon`Clara Engler2025-09-111-2/+2
|
* Move `DirTolerance` into `tor-dircommon`Clara Engler2025-09-091-4/+3
| | | | | This commit moves the `DirTolerance` structure from `tor-dirmgr` into `tor-dircommon`.
* Move `DownloadSchedule` into `tor-dircommon`Clara Engler2025-09-081-3/+5
| | | | | This commit moves the `DowenloadSchedule` related types from `tor-dirmgr` into `tor-dircommon`.
* Move `NetworkStatus` to `tor-dircommon`Clara Engler2025-09-081-2/+2
| | | | | | This commit moves `NetworkStatus` from `tor-dirmgr::config` to `tor-dircommon::config` in order to start the work on a common place for configuration options shared by both directory implementations.
* tor-dircommon: Add dirports field to authorityClara Engler2025-09-021-2/+16
|
* tor-dircommon: Initial commitClara Engler2025-09-021-3/+4
| | | | | | | | | | | | | | This commit initializes the `tor-dircommon` crate: A crate serving the purpose to form an umbrella for the lowest common denominator primitives found across crates implementing (parts of) the directory specification. For now, the only such primitive is the found within the `authority` module, which has been refactored from `tor-dirmgr` into this crate, alongside additional getter functions due to the lack of `pub(crate)` in this context. In the future, we may move further primitives away from `tor-dirmgr` into `tor-dircommon`.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* arti-client: Re-export `ConfigurationSources`Clara Engler2025-06-111-1/+1
| | | | | | | This commit re-exports `ConfigurationSources` in `arti_client::config`. The similar `ConfigurationSource` is already publicly exported, but it unfortunately it is pretty useless without a `ConfigurationSources` to which it belongs.
* arti,arti-client: Add an option to override required protocolsNick Mathewson2025-04-161-0/+37
| | | | | (This isn't a boolean, because we really don't want people ignoring all possible required protocols.)
* Move base CfgPathResolver for arti-client back to tor-config-path.Nick Mathewson2024-12-091-118/+2
| | | | | This time, we make explicit that it is a _base_ resolver, and that it is client-only.
* arti-client: change test to use path resolver from `TorClientConfig`Steven Engler2024-11-181-6/+12
|
* tor-config-path: remove `Option` from resolver valueSteven Engler2024-11-181-9/+10
|
* arti-client: add path resolver to `TorClient` and `TorClientConfig`Steven Engler2024-11-181-36/+50
| | | | | | Rather than using `arti_client::config::path_resolver()`, third-party code can get the path resolver using `TorClientConfig`s `AsRef<CfgPathResolver>` impl instead.
* arti-client: add a more-comprehensive cfg variable testSteven Engler2024-11-181-10/+35
|
* arti-client: moved two tests from tor-config-pathSteven Engler2024-11-181-0/+20
| | | | Also updated to use the `PATH_RESOLVER` resolver.
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-181-11/+86
| | | | | | | | | | | | | | | | 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-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-keymgr: Move config/arti.rs to config.rsGabriela Moldovan2024-10-081-1/+1
| | | | | | | | The config will soon contain secondary C Tor keystore configuration too, so the `arti` namespacing is about to stop making sense. I recommend reviewing this commit using `git diff --color-moved=zebra --ignore-space-change`
* Default allow_onion_addrs to true.Wesley Aptekar-Cassels2024-10-071-1/+1
| | | | | | | This was disabled due to lack of vanguard support. Now that we support vanguards, we should enable this by default. Fixes: #1402
* tor-keymgr: renamed ArtiNativeKeystoreConfig to ArtiKeystoreConfigMorgan2024-09-201-4/+4
|
* Provide a MemoryQuotaTracker in TorClientIan Jackson2024-09-041-2/+0
| | | | Nothing uses this yet.
* arti-client: Unstable cargo feature for exposing info for testingIan Jackson2024-09-041-0/+9
|
* Look for memquota configuration in the TorClient configurationIan Jackson2024-09-041-0/+29
| | | | Tests are not entirely trivial and will come in a moment.
* arti-client: replace `convert_override_net_params` with generic `default_extend`Steven Engler2024-09-031-10/+6
|
* arti-client: Fix a rustdoc warning.Gabriela Moldovan2024-08-281-1/+1
|
* arti-client: Move state_dir() to TorClientConfig.Gabriela Moldovan2024-08-281-0/+14
| | | | | I am about to use `state_dir()` outside of `TorClient`, so I am preemptively moving it to `TorClientConfig`.
* arti-client: Move BuilderExt to tor-config.Gabriela Moldovan2024-08-051-23/+3
| | | | | `BuilderExt` will soon be used in tor-hsservice too (for configuring the mistrust settings of the client "restricted mode" authorization keys).
* StorageConfig: complete a missing piece of documentation.Nick Mathewson2024-06-111-1/+1
|
* StorageConfig: Light reformatting.Nick Mathewson2024-06-111-0/+3
|
* tor-guardmgr: Unconditionally define VanguardConfig.Gabriela Moldovan2024-06-031-11/+3
| | | | | | | | | We want to export the `VanguardConfig` even if the `vanguards` feature is disabled (we will need to unconditionally include it in the arti config). Note that if `vanguards` are disabled, the `VanguardMode` from the `VanguardConfig` can only be `Dsiabled`.
* arti-client: Remove unnecessary VanguardConfig pub use.Gabriela Moldovan2024-06-031-6/+0
| | | | | | | This is already exported via the `pub mod vanguards` module, so there is no need to export it from the top-level too. This *is* a breaking change, but the downstream fix is trivial (and the type should never have been exported directly from `arti_client::config` in the first place).
* Make TorClientConfig implement AsRef<BridgesConfig>Nick Mathewson2024-04-021-0/+5
| | | | I believe this is how we expose the parts of TorClientConfig?
* Add tests for configuring unmanaged transportsNick Mathewson2024-03-141-11/+49
| | | | | Also, adapt the pt configuration tests to check for whether the error messages are as expected.
* Rename ManagedTransportConfig to TransportConfig.Nick Mathewson2024-03-141-7/+7
| | | | We're going to start using this type for _every_ kind of transport.
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-131-2/+2
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * tor-config: Allow ConfigurationSource to be verbatim text.Nick Mathewson2024-03-131-2/+2
| | | | | | | | | | This will let us test our configuration logic without having to use the `config` crate directly.
* | Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|/
* tor-circmgr: Add HsCircPoolConfig, make HsCircPool::reconfigure general-purpose.Gabriela Moldovan2024-03-111-0/+11
|
* arti-client: Add vanguard_config() to CircMgrConfig.Gabriela Moldovan2024-03-111-1/+15
|
* arti-client: Add VanguardsConfig to TorClientConfig.Gabriela Moldovan2024-03-111-0/+9
|
* arti-client: Re-export VanguardsConfig from vanguards module.Gabriela Moldovan2024-03-111-0/+9
|