summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Bump the minor version of every crate.Nick Mathewson2022-11-301-20/+20
| | | | | We made this job easy this time around: by incrementing our MSRV, we have forced ourselves to do at least a minor bump everywhere.
* 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: pt mgr spawns the task itself in newIan Jackson2022-11-301-3/+0
|
* arti-client: Try to take ownership of state earlier.Nick Mathewson2022-11-291-0/+4
| | | | | | | | There's no harm in doing this, since we'll try to take ownership of the state soon as soon as we use it: We just want to try early, so that we'll get it before we decide that we're using bridges. Fixes bug #669; bug introduced by !889.
* arti-client: Make ptmgr actually optionalIan Jackson2022-11-291-2/+3
|
* arti, arti-client: Conditionalise various things on pt-clientIan Jackson2022-11-291-3/+4
|
* Spelling fix in arti_client::erreta2022-11-291-1/+1
|
* Temporarily make ptmgr required for arti-client :/Nick Mathewson2022-11-282-2/+5
|
* PtMgr: Use a persistent state directory for PT state.Nick Mathewson2022-11-282-0/+10
| | | | | | | | | | This makes a `pt_state` directory inside .local/share/arti (or the local equivalent), right next to our existing `state` dir. Ideally we would use a separate directory for each PT, but we have a very fuzzy "what is a specific PT" notion. Closes #667
* Integrate PtMgr into arti-client.Nick Mathewson2022-11-284-3/+35
| | | | | | | | 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 'watch-drop-option' into 'main'Ian Jackson2022-11-231-0/+3
|\ | | | | | | | | tor-basic-utils: DropNotifyWatchSender: use DropNotifyEofSignallable See merge request tpo/core/arti!853
| * arti-client: Add comment about Option DormantModeIan Jackson2022-11-231-0/+3
| | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854090 (ftaod, that is a different MR to this one)
* | 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.
* Merge branch 'fix_nightly_20221118' into 'main'Ian Jackson2022-11-181-1/+1
|\ | | | | | | | | Fix warnings and breakage in nightly (2022-11-18 edition) See merge request tpo/core/arti!872
| * Fix a bunch of "needless borrow" warnings on nightlyNick Mathewson2022-11-181-1/+1
| | | | | | | | | | It looks like, despite a few false starts, they've got this warning right; there weren't any false positives.
* | arti-client: make bridge-client depend on dirmgr/bridge-clientNick Mathewson2022-11-181-1/+1
| | | | | | | | | | This resolves some errors when building with `bridge-client` but not with `--all-features`.
* | arti-client: Mark "bridge-client" and "pt-client" as non-experimentalNick Mathewson2022-11-182-4/+4
| |
* | arti-client: split long lines in Cargo.tomlNick Mathewson2022-11-181-2/+13
|/ | | | Doing this separately to make the next commit easier to read.
* Merge branch 'ptmgr-config' into 'main'eta2022-11-162-0/+23
|\ | | | | | | | | tor-ptmgr: make configuration use builders, plumb into arti-client See merge request tpo/core/arti!823
| * tor-ptmgr: make configuration use builders, plumb into arti-clienteta2022-11-162-0/+23
| | | | | | | | | | | | | | 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`.
* | arti-client: Retain a strong reference to the inner Arc<BridgeDescMgr>Ian Jackson2022-11-151-5/+7
|/ | | | Fixes #636.
* bridges: Create and install a BridgeDescMgr when we bootstrapIan Jackson2022-11-152-0/+72
|
* arti-client: Store a handle to the DirMgrStore in TorClient (fmt)Ian Jackson2022-11-151-1/+6
| | | | rustfmt only.
* arti-client: Store a handle to the DirMgrStore in TorClientIan Jackson2022-11-151-1/+4
| | | | We'll need this shortly.
* arti-client: Store a handle to the guardmgr in TorClientIan Jackson2022-11-151-1/+5
| | | | We'll need this shortly.
* Merge branch 'guardmgr' into 'main'Ian Jackson2022-11-142-3/+17
|\ | | | | | | | | Move guardmgr creation to arti-client, rather than within circmgr See merge request tpo/core/arti!850
| * Move GuardMgr::new call to arti_client::TorClient (fmt)Ian Jackson2022-11-141-4/+8
| | | | | | | | rustfmt only, broken out to ease review.
| * Move GuardMgr::new call to arti_client::TorClientIan Jackson2022-11-142-1/+11
| | | | | | | | | | | | | | Having this done within circmgr was irregular - most of our other key buildup functions are done in TorClient::create_inner. It is also inconvenient, as it buries the guardmgr within the circmgr.
* | Merge branch 'store3' into 'main'Ian Jackson2022-11-142-4/+9
|\ \ | | | | | | | | | | | | dirmgr: Expopse DirMgrStore See merge request tpo/core/arti!851
| * | dirmgr Store: Have constructors take DirMgrStoreIan Jackson2022-11-142-4/+9
| |/ | | | | | | | | | | | | Now the Store is constructed by arti_client, solving the problem described here https://gitlab.torproject.org/tpo/core/arti/-/issues/631#note_2853665 but in a different way.
* / bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|/
* Check more targetstrinity-1686a2022-11-102-3/+7
|
* Spelling fixes and normalizations on some high-level cratesNick Mathewson2022-11-072-3/+3
|
* 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.
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* Require derive_more 0.99.3Ian Jackson2022-11-031-1/+1
| | | | | | | | 0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114 which makes the Deref derive for bridgedesc::StateGuard not work and therefore breaks minimal-versions CI. It seems simpler to require the newer version everywhere.
* Merge branch 'readmes' into 'main'Nick Mathewson2022-10-122-241/+4
|\ | | | | | | | | | | | | Abolish maint/readme and use doc include Closes #603 See merge request tpo/core/arti!768
| * cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | | | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
| * Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-237/+1
| | | | | | | | | | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
| * README doctests: fix arti-clientIan Jackson2022-10-121-3/+3
| | | | | | | | | | | | | | | | Add ,ignore to ignore three examples that don't actually compile. cargo readme would add these annotations to lib.rs, but the doc include doesn't do stuff like that. pandoc seems to still render the result just fine.
* | struct BridgeConfig: Rename from BridgeIan Jackson2022-10-121-5/+5
|/ | | | Fixes #599
* pt and bridges: Parse configurationIan Jackson2022-10-121-0/+83
|
* Add pt-client and bridge-client features to arti and arti-clientIan Jackson2022-10-123-0/+8
|
* Allow "clippy::single_char_pattern" in tests.Ian Jackson2022-10-124-0/+4
| | | | | | | This lint exists for perf reasons, and this is rarely relevant in tests. Using double quoted str is generally cognitively less burdensome.
* feature-gate some functions requiring PreferredRuntimetrinity-1686a2022-10-051-1/+10
|