aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-client/src/config.rs
Commit message (Collapse)AuthorAgeFilesLines
* now this is really a hacketa2023-09-191-1/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Use "typos-cli" to fix a bunch of typos.Nick Mathewson2023-08-221-1/+1
|
* arti-client: fix conditional unused_import and dead_code warningsNick Mathewson2023-08-161-3/+5
|
* arti-client: Use Path::join instead of format!.Gabriela Moldovan2023-08-141-1/+1
|
* arti-client: Make from_directories() derive the keystore_dir from state_dir.Gabriela Moldovan2023-08-111-1/+39
| | | | Closes #988
* bridge config: Fix an error message slightlyIan Jackson2023-08-081-1/+1
|
* arti-client config test: partially un-degrade formattingIan Jackson2023-08-081-10/+10
|
* arti-client config test: degrade formattingIan Jackson2023-08-081-12/+18
| | | | As demanded by rustfmt
* arti-client config: Add an extra test case for bridgesIan Jackson2023-08-081-0/+45
| | | | This complements the new `check_bridge_pt` test.
* bridge config: reject bridges=true when there are no bridgesIan Jackson2023-08-081-2/+0
| | | | This is a bugfix. Perhaps it is a security fix?
* Add error if [[bridges.transports]] isn't written in config fileSaksham Mittal2023-08-011-10/+201
|
* arti-client: Use a default keystore config if `experimental-api` is disabled.Gabriela Moldovan2023-07-201-3/+3
| | | | | | | The `experimental-api` was only meant to apply to the use of the unstable `ArtiNativeKeystoreConfig` in the Arti config. `experimental-api` was _not_ supposed to be used for enabling/disabling the keystore (that's what the `enabled` flag is for).
* arti-client: Use the config struct from tor-keymgr.Gabriela Moldovan2023-07-131-85/+11
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Additional documentation around bridges/PT configurationNick Mathewson2023-07-031-1/+14
| | | | | | | This tries to flesh out some of the details for users who may be new to bridges and PTs. Closes #706.
* Add a missing "experimental-api" rustdoc notationNick Mathewson2023-06-291-0/+1
|
* Merge branch 'keymgr-config' into 'main'gabi-2502023-06-291-0/+97
|\ | | | | | | | | arti-client: Add keystore_dir to StorageConfig. See merge request tpo/core/arti!1312
| * arti-client: Fix clippy lint.Gabriela Moldovan2023-06-291-0/+1
| |
| * arti-client: Make keystore_dir an experimental option.Gabriela Moldovan2023-06-291-24/+17
| |
| * arti-client: Add TODO regarding keystore_dir deserialization.Gabriela Moldovan2023-06-291-0/+3
| |
| * tor-config: Make ItemOrBool an experimental feature.Gabriela Moldovan2023-06-291-3/+22
| |
| * arti-client: Add expand_keystore_dir function.Gabriela Moldovan2023-06-291-0/+13
| | | | | | | | Part of #891
| * arti-client: Add keystore_dir to StorageConfig.Gabriela Moldovan2023-06-291-1/+69
| |
* | Turn off HS client connections by defaultIan Jackson2023-06-291-1/+1
|/ | | | As per IRC discussion, re lack of Vanguards.
* HS configuration: Plumb configuration throughIan Jackson2023-06-281-0/+2
| | | | | Invent a trait a la circmgr config for the hs client connector config. Plumb a suitable value all the way through to the code that will use it.
* HS configuration: Add and honour `allow_onion_addrs` in configurationIan Jackson2023-06-281-0/+7
| | | | | | | We put this in `[address_filter]`. The interaction with the corresponding stream preference is a bit complicated. We must turn the stream pref into a `BoolOrAuto`.
* add a few more comments on PTstrinity-1686a2023-06-091-0/+2
|
* complement general documentation on bridges and pttrinity-1686a2023-06-071-0/+2
|
* move snowflake example to dedicated file and comment it moretrinity-1686a2023-06-071-27/+5
|
* add documentation for configuring snowflake pttrinity-1686a2023-06-071-4/+27
|
* arti-client: Only run BridgesConfig doc test if pt-client feature is enabled.Gabriela Moldovan2023-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One of the tests run as part of `cargo test -p arti-client` fails because the `pt-client` feature is not enabled by default: ``` failures: ---- src/config.rs - config::BridgesConfig (line 221) stdout ---- error[E0432]: unresolved import `arti_client::config::pt` --> src/config.rs:225:26 | 7 | use arti_client::config::pt::ManagedTransportConfigBuilder; | ^^ could not find `pt` in `config` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:233:19 | 15 | builder.bridges().bridges().push(bridge_1); | ^^^^^^^ private field, not a method error[E0599]: no function or associated item named `default` found for struct `BridgeConfigBuilder` in the current scope --> src/config.rs:236:48 | 18 | let mut bridge2_builder = BridgeConfigBuilder::default(); | ^^^^^^^ function or associated item not found in `BridgeConfigBuilder` error[E0599]: no method named `bridges` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:247:19 | 29 | builder.bridges().bridges().push(bridge2_builder); | ^^^^^^^ private field, not a method error[E0599]: no method named `transports` found for mutable reference `&mut BridgesConfigBuilder` in the current scope --> src/config.rs:255:19 | 37 | builder.bridges().transports().push(transport); | ^^^^^^^^^^ method not found in `&mut BridgesConfigBuilder` error: aborting due to 5 previous errors Some errors have detailed explanations: E0432, E0599. For more information about an error, try `rustc --explain E0432`. Couldn't compile the test. failures: src/config.rs - config::BridgesConfig (line 221) test result: FAILED. 5 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 2.10s ``` This disables the `BridgesConfig` doc test if the `pt-client` feature is not enabled. Closes #843 Signed-off-by: Gabriela Moldovan <[email protected]>
* tor_client: Add some example code for BridgeConfig.Nick Mathewson2023-03-241-0/+49
| | | | Closes #791
* arti-client: Make TransportConfigListBuilder public.Nick Mathewson2023-03-241-1/+8
| | | | | | | Without this there's no convenient way to add a transport without messing with serde/toml. Found while working on #791
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* arti: BridgesConfig is evidently not too high upIan Jackson2022-11-301-8/+0
| | | | | Since apparently it was possible to write all the other code without moving it.
* arti, arti-client: Conditionalise various things on pt-clientIan Jackson2022-11-291-3/+4
|
* Temporarily make ptmgr required for arti-client :/Nick Mathewson2022-11-281-0/+3
|
* Integrate PtMgr into arti-client.Nick Mathewson2022-11-281-1/+1
| | | | | | | | If support is available at compile-time, then we construct a PtMgr and register it with the ChanMgr. We keep a handle to it ourself so that we can reconfigure it as needed. Closes #659.
* Merge branch 'stability' into 'main'Nick Mathewson2022-11-231-9/+0
|\ | | | | | | | | arti-client, tor-config: Remove stability warning from top-level docs See merge request tpo/core/arti!878
| * arti-client, tor-config: Remove stability warning from top-level docsIan Jackson2022-11-211-9/+0
| | | | | | | | | | | | | | Ticket #285 is closed and most of this is stable now we think. (There are still a couple of stability warnings for specific types in tor-config, which aren't exposed at the arti-client level.)
* | bridge non-support: De-cfg the primary bridge config fieldsIan Jackson2022-11-211-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now parse the `bridges.enabled` BoolOrAuto, and the `bridges.bridges` list. The `bridges.bridges` list is Vec<()> in the builder, and Vec<Void> in the built config. Ie, it is simply a count, and vanishes in the built config. But this count triggers us to try to call build(), to try to parse bridges, and to try to set and honour the enablement boolean. The result is that the type system now ensures that if bridges are disabled, but specified (either by listing them in the config, or writing `enabled=true`), we inevitably try to insist that we have a non-empty Vec<Void>, which is of course impossible. There will be a test case too for those who think this too abstract a way to guarantee this property :-).
* | Make the bridge list in the builder be a list of BridgeConfigBuilderIan Jackson2022-11-211-7/+6
|/ | | | By changing MultilineListBuilder.
* tor-ptmgr: make configuration use builders, plumb into arti-clienteta2022-11-161-0/+22
| | | | | | | This brings the draft configuration mechanisms in tor-ptmgr in line with the config in other crates, using builders. It also plumbs the config type through into the main `arti-client` config, and adds some example lines to `arti-example-config.toml`.
* guardmgr config: Provide bridge information to new and reconfigureIan Jackson2022-11-031-2/+36
|
* bridges config: Check that bridges aren't enabled with no bridgesIan Jackson2022-11-031-1/+32
| | | | This is the validation which is called for by the documentation.
* guardmgr config: Introduce and require new GuardMgrConfig traitIan Jackson2022-11-031-0/+1
| | | | | It doesn't seem to me like it makes sense to provide the backward compatibility here.
* struct BridgeConfig: Rename from BridgeIan Jackson2022-10-121-5/+5
| | | | Fixes #599
* pt and bridges: Parse configurationIan Jackson2022-10-121-0/+83
|