aboutsummaryrefslogtreecommitdiff
path: root/crates/arti/src/cfg.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* arti: Move RpcConfig to rpc.rsNick Mathewson2024-12-191-29/+4
|
* tor-config: removed re-export of `CfgPath`Steven Engler2024-11-041-4/+4
| | | | | Also updated other packages to get `CfgPath` directly from `tor-config-path' instead of 'tor-config'.
* tor-memquota: Declare memquota feature stable, and defaultIan Jackson2024-10-221-1/+0
| | | | | | | | And document the Cargo features. This compiles in the memquota support for people who depend directly on tor-memquota. But all our in-tree dependencies turn off default features, so this doesn't have any effect for in-tree crates.
* arti cfg tests: Clarify here and thereIan Jackson2024-10-221-1/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2561#note_3097443
* arti cfg tests: Fix typoIan Jackson2024-10-221-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2561#note_3097442
* minimal features test: Introduce new --cfg arti_features_preciseIan Jackson2024-10-221-1/+6
| | | | | Work around awkward cargo behaviour and allow us to more reliably test disabled features, even if they're enabled by default at lower levels.
* tor-keymgr: Move C Tor keystore configs under ctor key.Gabriela Moldovan2024-10-081-2/+3
| | | | | | | This way we have a more intuitive layout, where all C Tor keystore configuration is under the `ctor` key. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2481#note_3090486
* tor-keymgr: Add configuration for C Tor client keystores.Gabriela Moldovan2024-10-081-1/+9
| | | | | This is intentionally partially mis-indented to make this more reviewable (in case the reviewer isn't using `ignore-all-space`).
* arti-client: Use the configured C Tor keystores, if any.Gabriela Moldovan2024-10-081-8/+1
|
* tor-keymgr: Add configuration for C Tor service keystores.Gabriela Moldovan2024-10-081-0/+10
|
* Merge branch 'warn_on_nonlocal' into 'main'Nick Mathewson2024-10-011-2/+13
|\ | | | | | | | | Warn on nonlocal addresses in configuration, PT results See merge request tpo/core/arti!2454
| * Mark resolve_listen_port as deprecated.Nick Mathewson2024-09-301-2/+9
| |
| * arti::cfg: Add a note to avoid new uses of a macro.Nick Mathewson2024-09-251-0/+4
| |
* | Merge branch 'silence-warning' into 'main'gabi-2502024-09-301-0/+1
|\ \ | | | | | | | | | | | | arti: Silence unused_mut warning. See merge request tpo/core/arti!2431
| * | arti: Silence unused_mut warning.Gabriela Moldovan2024-09-181-0/+1
| |/ | | | | | | The `config` is only mutated if `onion-service-service` is enabled.
* | arti: add an example for onion service "reject" optionNick Mathewson2024-09-261-0/+4
| | | | | | | | There was previously no example here.
* | Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-5/+3
|/ | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* Provide a MemoryQuotaTracker in TorClientIan Jackson2024-09-041-1/+0
| | | | Nothing uses this yet.
* arti: Proper testing of the memory limit config parsingIan Jackson2024-09-041-2/+53
| | | | | | Including testing that uncommenting the example generates a config with tracking enabled, and that the example low_water is the default value for the example max.
* arti cfg tests: Provide resolve_return_resultsIan Jackson2024-09-041-0/+6
|
* arti cfg tests: strip_prefix: Leave section markers unchangedIan Jackson2024-09-041-1/+6
|
* arti cfg tests: strip_prefix: Document error behaviourIan Jackson2024-09-041-1/+3
|
* Look for memquota configuration in the TorClient configurationIan Jackson2024-09-041-1/+28
| | | | Tests are not entirely trivial and will come in a moment.
* Merge branch 'ci' into 'main'Ian Jackson2024-08-271-1/+2
|\ | | | | | | | | Run tests of every crate, with all features disabled See merge request tpo/core/arti!2350
| * arti: Fix an unused Result in tests if pts disabledIan Jackson2024-08-191-1/+2
| | | | | | | | | | Fixes compilation with cargo test --no-default-features -p arti --features=tokio,rustls
* | tor-hsservice: Pass watch_configuration down to restricted discovery config.Gabriela Moldovan2024-08-211-7/+23
|/ | | | | | We need to know if `watch_configuration` is set in the descriptor publisher reactor to know whether we should be watching the `restricted_discovery.key_dirs` directories.
* arti: Add the restricted_discovery configuration to the example config.Gabriela Moldovan2024-08-051-9/+61
| | | | This also adds a test for it.
* Work around clippy::doc_lazy_continuation false positivesIan Jackson2024-07-081-1/+1
| | | | | | | See https://github.com/rust-lang/rust-clippy/issues/13001 I think it's OK to change this in our tree, nevertheless.
* arti: Add vanguards settings to example config.Gabriela Moldovan2024-06-031-1/+1
|
* Add a test for transport configurationNick Mathewson2024-04-021-0/+46
| | | | | | | (Previously, nothing actually parsed these values in our configuration.) Closes #1333.
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-131-8/+18
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * tor-config: Put config::Config inside a wrapper type.Nick Mathewson2024-03-131-1/+1
| | | | | | | | This will let us replace Config with something better.
| * Use ConfigurationSource::Verbatim in our tests.Nick Mathewson2024-03-131-7/+17
| |
* | Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|/
* arti-client: Add VanguardsConfig to TorClientConfig.Gabriela Moldovan2024-03-111-0/+11
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* arti: define RpcConfig only if neededTobias Stoeckmann2024-02-291-1/+1
| | | | The RpcConfig struct is only used if feature rpc is selected.
* arti: use name bindings only if neededTobias Stoeckmann2024-02-291-1/+3
| | | | | The local name binding for tor_config::define_list_builder_accessors is only needed if feature onion-service-service is selected.
* Add a configuration option for long_lived_ports.Nick Mathewson2024-02-201-0/+1
|
* Merge branch 'err_on_no_onion_service_support' into 'main'Nick Mathewson2024-01-161-4/+10
|\ | | | | | | | | | | | | Give an error when user configured onion services with no support. Closes #1184 See merge request tpo/core/arti!1885
| * Give an error when user configured onion services with no support.Nick Mathewson2024-01-161-4/+10
| | | | | | | | | | | | | | | | | | | | | | We do this by adding a stub config and config builder type, whose only purpose is to generate an error if anything is deserialized into it. (If this turns out not to be the best pattern, we can change it later, since this is all internal to the `arti` crate.) Closes #1184.
* | hsrproxy: Temporarily remove ability to config unix addressesNick Mathewson2024-01-161-0/+2
|/ | | | | | | | I'm taking this out for now since we don't have support for actually making these addresses work, and the current behavior will just ignore connections silently. Closes #1245
* arti::cfg: Turn a TODO HSS into a ticket.Nick Mathewson2024-01-091-1/+1
|
* arti: Test for expected value of onion service cfg.Nick Mathewson2023-12-121-2/+34
|
* arti: Enforce onion service nickname distinctnessNick Mathewson2023-12-121-3/+3
| | | | | | | | | | | The most logical way to do this was to change the "List" type to a HashMap, and add a build function to the ListBuilder. This change additionally renames: OnionServiceProxyConfig{List=>Map} NamedProxyMap => ProxyBuilderMap (We now have two kinds of map, and this name change will clarify the distinction.)
* arti: Downgrade a TODO HSS about testing onion-service config.Nick Mathewson2023-12-121-1/+2
| | | | | | | IIUC, there will never be a Some(InNew) entry here, since we will never have an onion service be configured by default. Instead we test this kind of configuration by having commented-out options that we uncomment as needed.
* arti cfg: suppress a warningIan Jackson2023-12-041-0/+1
| | | | | | | | | | | | | There is a TODO HSS for this. Fixes cargo check --workspace --all-targets producing warning: unused variable: `result` --> crates/arti/src/cfg.rs:1060:13 | 1060 | let result = file.resolve::<(TorClientConfig, ArtiConfig)>(); | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` | = note: `#[warn(unused_variables)]` on by default
* Revert "hsrproxy: Temporarily change the format of ProxyRule."Nick Mathewson2023-11-291-1/+1
| | | | | | | | | | | This reverts commit 21605d2c9e601c3a5099bfd8d8c887cbb3b36c0a. We're doing this because we wanted the configuration of proxy rules to be a 2-tuple, as in `[ "22", "127.0.0.1:22" ]`. But `config` couldn't handle that before, so we temporarily changed it to a string, as in "22 => 127.0.0.1:22". Closes #1058.
* Use a less obtrustive sign to end the onion services config sectionNick Mathewson2023-10-111-5/+5
|
* Improve test fn documentation even more.Ian Jackson2023-10-101-2/+2
|