summaryrefslogtreecommitdiff
path: root/crates/arti/src/cfg.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* arti::cfg: tweak narrow() test fn to be more useful.Nick Mathewson2023-10-101-12/+14
| | | | | | | | | It still matches the start pattern in the same way, but it takes the _next_ match of the end pattern after the start pattern, and it allows the end pattern to be absent. This will make the bridge tests a little more robust, and let the onion service tests stop saying BEGIN and END.
* Non-working attempt to test onion service configuration.Nick Mathewson2023-10-031-2/+52
| | | | | | | The problem here is that, for some reason, the proxy_rule configuration doesn't actually work. I suspect a bug in Flatten, since the same configuration works fine if you pass it to the hsrproxy config directly.
* arti: Try to document some test helpers.Nick Mathewson2023-10-031-1/+18
|
* arti: Make onion_service configuration option pluralNick Mathewson2023-10-031-3/+3
|
* Note that we *do* need to actually test the onion service config.Ian Jackson2023-10-031-1/+1
|
* arti: Add a list of [[onion_service]]s to the config.Nick Mathewson2023-10-031-1/+29
| | | | There are no tests for parsing it yet.
* arti tests: Suppress a lint locallyIan Jackson2023-09-051-1/+2
| | | | | There's a complaint (seen in a CI build log) about over-eager iterator item cloning. This is a perf complaint and not very relevant in tests.
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* arti::cfg tests: Use fold to make nightly clippy happierNick Mathewson2023-08-221-4/+5
|
* arti cfg tests: Add keystore to example config.Gabriela Moldovan2023-07-131-14/+2
| | | | Closes #939
* arti-client: Use the config struct from tor-keymgr.Gabriela Moldovan2023-07-131-1/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* arti: Add a `logging.time_granularity` option with 1s default.Nick Mathewson2023-07-061-0/+1
| | | | | | | This lets us provide less information in our logs: in particular, it lets us avoid logging with microsecond precision. Closes #551.
* arti cfg tests: Add declare_exceptions for storage.keystore_dir.Gabriela Moldovan2023-06-291-1/+22
| | | | | This moves `storage.keystore_dir` to a separate `declare_exceptions` block and explains why we have this exception.
* example-config: Temporarily remove keystore_dir example.Gabriela Moldovan2023-06-291-1/+1
| | | | | | Let's remove this until we figure out how the config should behave when the `keymgr` feature is disabled (should it accept or reject `keystore_dir = true`?)