summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/client.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-311-5/+7
| | | | Closes #2012.
* arti: Add keys list and keys list-keystoreshjrgrn2025-06-121-0/+8
|
* arti-client: remove incorrect note about `StateDirectory` usageSteven Engler2025-04-231-1/+0
|
* arti-client: On shutdown for missing proto, print to stderrNick Mathewson2025-04-161-1/+17
| | | | Also wait a little so logs can flush.
* arti,arti-client: Add an option to override required protocolsNick Mathewson2025-04-161-1/+10
| | | | | (This isn't a boolean, because we really don't want people ignoring all possible required protocols.)
* arti-client: Keep a somewhat accurate notion of our release date.Nick Mathewson2025-04-161-3/+2
| | | | | | | | | This doesn't need to be perfect, but we need to use it to see if a consensus is new enough that we should obey its recommendations. This commit also adds a script to update or check our release date, and calls this script from our cargo-publish script.
* arti-client: Implement the basics of protocol enforcement.Nick Mathewson2025-04-161-0/+11
| | | | This is the major part of #1849.
* Merge branch 'todo-errordetail' into 'main'David Goulet2025-04-141-2/+1
|\ | | | | | | | | arti-client: Add ErrorDetail::OnionServiceSetup See merge request tpo/core/arti!2923
| * arti-client: Add ErrorDetail::OnionServiceSetuphjrgrn2025-04-141-2/+1
| |
* | arti-client: xref to fork policyIan Jackson2025-04-071-0/+12
|/
* Remove outdated TODOCocytusDEDI2025-04-031-4/+0
|
* Use CautiousRng for keys going into the KeyMgr.Nick Mathewson2025-03-241-2/+2
|
* Merge branch 'client-arti' into 'main'opara2025-03-201-16/+12
|\ | | | | | | | | replace state_dir and storage_mistrust with tor_persist::state_dir::StateDirectory See merge request tpo/core/arti!2863
| * replace state_dir and storage_mistrust with ↵abdul28012025-03-201-16/+12
| | | | | | | | tor_persist::state_dir::StateDirectory
* | squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-2/+2
|/ | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* arti-client: add path resolver to `TorClient` and `TorClientConfig`Steven Engler2024-11-181-3/+18
| | | | | | Rather than using `arti_client::config::path_resolver()`, third-party code can get the path resolver using `TorClientConfig`s `AsRef<CfgPathResolver>` impl instead.
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-181-5/+6
| | | | | | | | | | | | | | | | This is a big change across multiple crates since there isn't a good way to break it up. This changes the signature of `CfgPath::path` to: ``` pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> { ``` Making this change means that our global `CfgPathResolver` needs to be stored in the 'arti-client' library instead of `tor-config-path`, and must be passed through to anything that calls `path` to expand the variables.
* tor-ptmgr: pass through the `CfgPathResolver`Steven Engler2024-11-181-0/+2
|
* tor-hsservice: pass through the `CfgPathResolver`Steven Engler2024-11-181-0/+2
|
* arti-client: add doc comment to `TorClient::reconfigure`Steven Engler2024-11-051-0/+4
|
* memquota: Change ToplevelAccount to be an alias for Arc<MemoryQuotaTracker>Ian Jackson2024-10-151-2/+1
| | | | Fixes a TODO.
* arti-client: Fix a broken doc comment.Gabriela Moldovan2024-10-081-1/+1
| | | | | This broke because `tor_keymgr::config::arti` was moved to `tor_keymgr::config`.
* arti-client, tor-keymgr: Remove a couple of now-addressed TODOs.Gabriela Moldovan2024-10-081-1/+0
|
* arti-client: Use the configured C Tor client keystores.Gabriela Moldovan2024-10-081-1/+12
|
* arti-client: Use the configured C Tor keystores, if any.Gabriela Moldovan2024-10-081-4/+21
|
* arti-client: Refactor KeyMgr building logic.Gabriela Moldovan2024-10-081-15/+14
| | | | | | | | This deduplicates the keymgr building logic in preparation for supporting C Tor keystores (building the keymgr in a central place makes things a bit easier, because regardless of the `kind` of the primary keystore, we will need to extend the `KeyMgrBuilder` with the configured secondary `ctor` keystores, if any).
* tor-keymgr: Move config/arti.rs to config.rsGabriela Moldovan2024-10-081-1/+1
| | | | | | | | The config will soon contain secondary C Tor keystore configuration too, so the `arti` namespacing is about to stop making sense. I recommend reviewing this commit using `git diff --color-moved=zebra --ignore-space-change`
* arti-client: Fix incorrect feature gate for onion-service-client.Wesley Aptekar-Cassels2024-10-071-4/+3
| | | | | | | | | | Currently, arti-client doesn't compile with just the features experimental-api and onion-service-client enabled, because it incorrectly depends on tor-hsservice. This fixes that by gating the use statement behind the correct feature. Fixes: #1638
* Merge branch 'mq' into 'main'Ian Jackson2024-10-071-0/+2
|\ | | | | | | | | Implement memory quota tracking See merge request tpo/core/arti!2493
| * memquota: Add a toplevel account in tor-chanmgrIan Jackson2024-10-031-0/+2
| | | | | | | | | | | | | | | | | | Plumb through a top-level account. This doesn't have any channel-specific, circuit-specific or stream-specific accounts yet. tor-circmgr's and tor-hsclient's *tests* need fake account. In arti-relay, use a dummy account for now.
* | Merge branch 'launch-with-hsid-docs' into 'main'gabi-2502024-10-031-0/+8
|\ \ | | | | | | | | | | | | | | | | | | arti-client: Clarify the launch_onion_service_with_hsid() docs. Closes #1626 See merge request tpo/core/arti!2494
| * | arti-client: Clarify the launch_onion_service_with_hsid() docs.Gabriela Moldovan2024-10-031-0/+8
| | | | | | | | | | | | | | | | | | | | | This updates the docs to mention that the specified key may get actually persisted to disk. Closes #1626
* | | Merge branch 'rename-client-auth' into 'main'Ian Jackson2024-10-031-2/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | Use the new "restricted discovery" terminology throughout Closes #1476 See merge request tpo/core/arti!2495
| * | arti-client: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-2/+2
| |/ | | | | | | Part of #1476
* | CircMgr: Start writing tests.Wesley Aptekar-Cassels2024-10-031-1/+1
| |
* | Revise RPC documentation to be more informative.Nick Mathewson2024-10-021-0/+12
|/ | | | | | Previous documentation was more-or-less meant for the Arti developer only. This new documentation is intended for actual users of RPC functionality. It's meant to be extracted with `maint/rpc-doc-tool`.
* CircMgr: Make CircMgr and HsCircPool generic over builder type.Wesley Aptekar-Cassels2024-09-241-9/+11
| | | | | | | | | | This will allow for testing, as the CircuitBuilder can be replaced with a mocked version. This did require moving some of what was in the CircuitBuilder impl into the AbstractCircuitBuilder type, since Drop implementations can't be specialized, but that's fine, as we'll probably be doing more of that in the future anyways.
* tor-keymgr: Move keystore config under keystore.primary.Gabriela Moldovan2024-09-231-1/+1
| | | | | The keystore settings only configure the *primary* keystore, so they should be under `keystore.primary`.
* 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()
* 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
* Provide a MemoryQuotaTracker in TorClientIan Jackson2024-09-041-0/+10
| | | | Nothing uses this yet.
* arti-client: Add an InertTorClient for accessing client state.Gabriela Moldovan2024-08-281-72/+157
| | | | | | | | | | | | | | | | 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-281-17/+3
| | | | | I am about to use `state_dir()` outside of `TorClient`, so I am preemptively moving it to `TorClientConfig`.