summaryrefslogtreecommitdiff
path: root/crates/arti-client/src
Commit message (Collapse)AuthorAgeFilesLines
...
* arti: Reinstate the keystore.enabled option.Gabriela Moldovan2024-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up from !2394 I want to keep the `keystore.enabled` option, because I'm planning on extending `ArtiKeystoreConfig` to support configuring secondary keystores too (currently, the only supported setting is `keystore.kind`, which configures the primary keystore). `keystore.enabled` will disable keystore use altogether (i.e. both primary and secondary). Currently, we only support configuring the "primary" (previously known as "default") keystore, which can be either "native" (the on-disk Arti keystore), or "ephemeral" (an in-memory keystore). To implement #858, we will need to support configuring additional keystores too, so we will need to move to a config of the form ```toml [storage.keystore] # Whether the keystore is enabled. #enabled = "auto" # Configure the primary keystore. [storage.keystore.primary] # The type of primary keystore to use kind = "auto" | "native" | "ephemeral" # Optionally configure C Tor keystores for arti to use. # # Note: The keystores listed here are read-only (keys are only # ever written to the primary keystore, configured in # `storage.keystore.primary`). [[storage.keystore.ctor]] # If the `kind` is `service`, this should be set to the `HiddenServiceDirectory` # of your hidden service. Arti will read `HiddenServiceDirectory/hostname` # and `HiddenServiceDirectory/private_key`. (Note: if your service is running # in restricted discovery mode, you must set the # `[[onion_services."<the nickname of your svc>".restricted_discovery.key_dirs]]` # to `HiddenServiceDirectory/client_keys` # # If the `kind` is `client`, this should be set to `ClientOnionAuthDir` of # your client. If Arti is configured to run as a client (i.e. if it runs in SOCKS # proxy mode), it will read the client restricted discovery keys from this path. path = "/foo/bar" # The type of keystore `path` should be interpreted as kind = "client" | "service" ``` This moves the current keystore settings to `storage.keystore.primary` in preparation for that change.
* arti-client: Update docs to reflect KeystoreSelector renaming.Gabriela Moldovan2024-09-231-3/+3
|
* tor-keymgr: Rename the primary keystore for clarity.Gabriela Moldovan2024-09-231-6/+6
| | | | | | | | | | Previously, arti's primary keystore was referred to as its "default" keystore. However, "default" is inaccurate here: there is no way to meaningfully override this "default" (the "default" store acts as the main keystore). Throughout the codebase, we query all keystores for keys (including the secondary ones), but only ever write to the default/primary keystore. This is OK for now, because it enables us to have one mutable keystore, and multiple secondary, read-only stores.
* arti-client: added support for constructing ArtiEphemeralKeystore to ↵Morgan2024-09-201-22/+37
| | | | InertTorClient::create_keymgr()
* tor-keymgr: renamed ArtiNativeKeystoreConfig to ArtiKeystoreConfigMorgan2024-09-201-4/+4
|
* arti-client: Add APIs for rotating service discovery keys.Gabriela Moldovan2024-09-191-0/+80
|
* arti-client: add experimental launch_onion_service_with_hsid() method which ↵Morgan2024-09-151-1/+45
| | | | HsIdKeypair
* arti-client: Convert a note to a comment.Gabriela Moldovan2024-09-121-1/+1
| | | | This was supposed to be a comment, not part of the docs.
* arti-client: Remove duplicated documentation.Gabriela Moldovan2024-09-121-42/+4
| | | | | | `TorClient` and `InertTorClient` have a number of identical state-management functions. This makes the `InertTorClient` link to the `TorClient` docs instead of duplicating them.
* arti-client: implemented insert_service_discovery_key and ↵Morgan2024-09-101-1/+168
| | | | remove_service_discovery_key methods
* Merge branch 'relay-err' into 'main'David Goulet2024-09-091-1/+1
|\ | | | | | | | | arti-relay: add and use `Error`/`ErrorDetail` See merge request tpo/core/arti!2392
| * arti-client: minor documentation grammar fixSteven Engler2024-09-051-1/+1
| |
* | Add a TODO RPC call about revising/moving documentationNick Mathewson2024-09-091-0/+6
| |
* | rpc: More specificity surrounding SOCKS-rpc integrationNick Mathewson2024-09-091-2/+24
|/
* memory quota error message: Fix emacs-induced typoIan Jackson2024-09-041-1/+1
|
* Provide a MemoryQuotaTracker in TorClientIan Jackson2024-09-043-2/+15
| | | | Nothing uses this yet.
* arti-client: Unstable cargo feature for exposing info for testingIan Jackson2024-09-041-0/+9
|
* Look for memquota configuration in the TorClient configurationIan Jackson2024-09-041-0/+29
| | | | Tests are not entirely trivial and will come in a moment.
* arti-client: replace `convert_override_net_params` with generic `default_extend`Steven Engler2024-09-031-10/+6
|
* 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`.
* 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).
* 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`.
* arti-client: Add a function for generating client authorization keys.Gabriela Moldovan2024-06-272-1/+89
| | | | Part of #1281
* 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-241-4/+109
| | | | | | | | | | | | | | | | | | | | | 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-241-4/+4
| | | | | There is no actual reason to consume this type, and taking it by reference allows us to retry.
* 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.
* 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
|