summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-25/+25
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* Fix formatting issues introduced by fixup-features.Gabriela Moldovan2024-09-031-1/+2
|
* arti: Remove the XXXXs added by fixup-features.Gabriela Moldovan2024-09-031-1/+0
| | | | The `restricted-discovery` feature is reachable from `experimental`.
* Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-1/+3
|
* Fix typosDimitris Apostolou2024-09-031-1/+1
|
* arti-client: Fix a rustdoc warning.Gabriela Moldovan2024-08-281-1/+1
|
* arti-client: Document the unspecified behavior of create_inert().Gabriela Moldovan2024-08-281-0/+6
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2370#note_3066621
* arti-client: Add an InertTorClient for accessing client state (fmt).Gabriela Moldovan2024-08-281-1/+3
|
* arti-client: Add an InertTorClient for accessing client state.Gabriela Moldovan2024-08-283-74/+166
| | | | | | | | | | | | | | | | Implements the `TorClientThatIsntRunning` mentioned in !2314 (see also `doc/dev/notes/keymgr-porcelain.md`), except `TorClientThatIsntRunning` is called `InertTorClient`. This commit is mostly code motion: I've moved the `create_keymgr` function and the impls of `generate_service_discovery_key` and `get_service_discovery_key` from `TorClient` to `InertTorClient`. The `InertTorClient` advertises itself as a handle for accessing the keystores and other persistent state, but it currently only has 2 functions (`generate_service_discovery_key` and `get_service_discovery_key`). I expect it will grow additional functionality in the future.
* arti-client: Move state_dir() to TorClientConfig.Gabriela Moldovan2024-08-282-17/+17
| | | | | I am about to use `state_dir()` outside of `TorClient`, so I am preemptively moving it to `TorClientConfig`.
* Add script for *testing* without any features enabledIan Jackson2024-08-191-0/+3
| | | | | | | | | We can't do this for every crate. I looked at what is now matrix-check to see if I wanted to use any of the code. But it seems too entangled with its particular purpose, and has a lot of embedded knowledge of our crates' features. I found it sufficiently far from what I wanted that I decided on a fresh script.
* Merge branch 'docsrs' into 'main'Jim Newsome2024-08-071-1/+0
|\ | | | | | | | | | | | | Don't need to tell docs.rs to enable `docsrs` cfg. It does it automatically as of https://github.com/rust-lang/docs.rs/pull/2390#event-11664409098 While this change isn't in our MSRV yet, we were only using this when building for docs.rs, where we use the latest anyway. See merge request tpo/core/arti!2308
| * Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | | | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* | 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).
* | tor-hsservice: Add a restricted-discovery feature.Gabriela Moldovan2024-08-051-0/+2
|/ | | | | | | Restricted discovery mode is initially going to be gated behind the experimental `restricted-discovery` feature. Part of #1292
* Remove semver.md files post-release.Nick Mathewson2024-08-011-1/+0
|
* Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-25/+25
| | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* rpc: Refactor errors part 1: a new RpcMethod trait.Nick Mathewson2024-07-251-12/+6
| | | | | It is no longer necessary to say, for every RPC method, that its error type is RpcError.
* Tweak documentation for wait_for_stop slightly.Nick Mathewson2024-07-231-1/+7
|
* tor-hsservice: Add OnionServiceBuilder, deprecate OnionService::new (fmt).Gabriela Moldovan2024-07-151-10/+8
|
* tor-hsservice: Add OnionServiceBuilder, deprecate OnionService::new.Gabriela Moldovan2024-07-151-6/+11
| | | | Closes #1490
* implement TorClient::wait_for_stoptrinity-1686a2024-07-111-0/+6
|
* Merge branch 'mistrust-message' into 'main'Ian Jackson2024-07-101-1/+1
|\ | | | | | | | | | | | | Fix fs_mistrust error messages and some misnamed error variants Closes #1473 See merge request tpo/core/arti!2253
| * arti-client: Correct message for mistrust errorIan Jackson2024-07-101-1/+1
| |
* | arti-client: Gate generate_service_discovery_key() behind keymgr feature.Gabriela Moldovan2024-07-101-2/+10
|/ | | | | Otherwise arti-client fails to build with `-no-default-features --features onion-service-client,experimental-api`.
* Remove reference to arti-hyper in arti-client README.mdIan Jackson2024-07-091-2/+0
| | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2225#note_3043992 We have an example for how to use arti-client with hyper 1.x, but I don't think we need to to mention that here.
* Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* arti-client: Add a function for generating client authorization keys.Gabriela Moldovan2024-06-273-1/+90
| | | | Part of #1281
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* Resolve a rustdoc warning.Nick Mathewson2024-06-241-2/+2
|
* Add a maximum to local_resource_timeout.Nick Mathewson2024-06-242-8/+33
|
* local_resource_timeout: Change wait interval to 50 ms.Nick Mathewson2024-06-241-1/+1
|
* Rename fslock_timeout to local_resource_timeoutNick Mathewson2024-06-241-11/+16
| | | | Name chosen to match the error kind that we're detecting.
* Clarify documentation about blocking.Nick Mathewson2024-06-241-2/+4
|
* TorClientBuilder: Wait for a little while if the lockfiles are held.Nick Mathewson2024-06-242-4/+110
| | | | | | | | | | | | | | | | | | | | | This commit adds a parameter to TorClientBuilder that control how long we should retry constructing a TorClient if we get a LocalResourceInUse error. When this parameter is not set, we default to 500 milliseconds for async entry points and 0 milliseconds for sync entry points. (`LocalResourceInUse` usually means that a lockfile is held by somebody else; but when the resource is some other type, we typically want the same behavior anyway.) (I really don't want to introduce delays by default for the create_unbootstrapped case, since it previously had no delay at all.) There is now also an async entry point to create an unbootstrapped TorClient. Closes #1464.
* TorClientBuilder: take self by reference when buildingNick Mathewson2024-06-242-4/+5
| | | | | There is no actual reason to consume this type, and taking it by reference allows us to retry.
* Update to derive-deftly 0.12.1Ian Jackson2024-06-171-1/+1
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* Merge branch 'rpc-stream-methods' into 'main'Nick Mathewson2024-06-112-73/+110
|\ | | | | | | | | | | | | RPC: Use RPC methods instead of the "ClientConnectionTarget" trait. Closes #1427 See merge request tpo/core/arti!2192
| * Several typo fixes from GabiNick Mathewson2024-06-111-3/+3
| |
| * RPC: Use RPC methods instead of the "ClientConnectionTarget" trait.Nick Mathewson2024-06-112-73/+110
| | | | | | | | | | | | | | | | | | | | | | | | On its own, this might not seem like a huge improvement, but it will later let us implement these RPC methods for types that can't reasonably implement ClientConnectionTarget. It also serves as a proof of concept that special-method invocation can actually work, so that we can build things like this in cases where introducing a trait isn't practical. Closes #1427
* | StorageConfig: complete a missing piece of documentation.Nick Mathewson2024-06-111-1/+1
| |
* | StorageConfig: Light reformatting.Nick Mathewson2024-06-111-0/+3
|/
* rpc: Pass around our rpc::Context in an Arc.Nick Mathewson2024-06-101-3/+3
| | | | | | | | Formerly we used a Box. That was okay at first, but now that we want RPC methods to be able to invoke other RPC methods, we don't want the Invocable methods to have to consume the Context. This requires that Context become Sync.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - tor-persist - tor-chanmgr - tor-ptmgr - tor-guardmgr - tor-circmgr - tor-dirclient - tor-dirmgr - tor-keymgr - tor-hsclient - tor-hsservice - tor-hsrproxy - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* arti-client: Unconditionally retire all HS circuits if circmgr says so.Gabi Moldovan2024-06-031-12/+1
| | | | | | | If the circmgr retires all of its circuits, so should the HS circ pool. The circuits can be retired for various reasons (for example, if the configured vanguard mode changes).
* arti-client: Add TODO about always clearing the HS circ pool.Gabriela Moldovan2024-06-031-0/+8
|
* tor-circmgr: Remove VanguardMode from Pool (fmt).Gabriela Moldovan2024-06-031-4/+3
|
* tor-circmgr: Remove VanguardMode from Pool.Gabriela Moldovan2024-06-031-5/+7
| | | | | | | | | Storing the VanguardMode in multiple places (in the VanguardMgr *and* the HS circ Pool) is dangerous and can lead to split brain situations where different parts of the code think they are running in different VanguardModes. See #1424