aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-client/src/client.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-hsservice: Create a separate RunningOnionService type.Gabriela Moldovan2024-01-181-5/+8
| | | | | | | | This will enable us to construct non-launched (but configured) `OnionService`s. We need this, for example, for implementing the `arti hss` CLI command. Part of #1227
* arti-client Remove a TODO hs that is no longer relevant.Gabriela Moldovan2024-01-111-1/+0
|
* arti-client: Add ErrorDetail::KeystoreRequired.Gabriela Moldovan2024-01-111-4/+3
| | | | | This addresses a `TODO HSS` about not using `internal!` for an error caused by misconfiguration.
* arti-client: Turn a TODO hs into #858.Gabriela Moldovan2024-01-111-1/+1
|
* arti-client: Turn a TODO HSS into #1106.Gabriela Moldovan2024-01-111-1/+1
|
* Merge branch 'expand-keystore-dir' into 'main'gabi-2502024-01-111-4/+2
|\ | | | | | | | | tor-keymgr: Abolish ArtiNativeKeystoreConfig::expand_keystore_dir. See merge request tpo/core/arti!1867
| * tor-keymgr: Abolish ArtiNativeKeystoreConfig::expand_keystore_dir.Gabriela Moldovan2024-01-101-4/+2
| | | | | | | | | | | | This resolves a `TODO HSS` in arti-client. Part of #1187
* | tor-hsclient: Derive the KeySpecifier implementation (fmt).Gabriela Moldovan2024-01-101-4/+2
| |
* | tor-hsclient: Derive the KeySpecifier implementation.Gabriela Moldovan2024-01-101-3/+2
|/ | | | | | | | This addresses a `TODO HSS` about deriving the `KeySpecifier` implementation for client key specifiers. Note that we no longer have a key specifier type for intro auth keys (which are not supported anyway, see #1037).
* arti_client: Change ephemeral-service TODO HSS comments to #1186.Nick Mathewson2024-01-091-3/+3
|
* arti-client::client: remove TODO HSS that is no longer true.Nick Mathewson2024-01-091-2/+0
|
* arti-client: TorClient.storage_mistrust: Correct doc commentIan Jackson2023-12-131-1/+6
|
* tor-hsservice: Plumb state dir and its mistrust into ipt_mgrIan Jackson2023-12-131-1/+15
| | | | | | | | | | | This is needed for the replay logs. It's a shame that CheckedDir is (i) a bit unergonomic (ii) has an extra bool in it, or we could pass one of those instead of these two arguments. Since HS's might be created after startup, TorClient must have these fields.
* arti-client: Centralise state_dir variable (fmt)Ian Jackson2023-12-131-5/+2
|
* arti-client: Centralise state_dir variableIan Jackson2023-12-131-3/+4
| | | | | Call expand_state_dir only once. We'll reuse this value, another time, too.
* tor-keymgr: Abolish KeyMgr::new.Gabriela Moldovan2023-11-271-2/+7
| | | | We don't use this now that we have a `KeyMgrBuilder`.
* arti-client: Stop using HsClientIntroAuthKeypair for client auth.Gabriela Moldovan2023-11-201-15/+1
| | | | Closes #1037
* Send less information in onion service BEGIN messagesNick Mathewson2023-11-151-1/+9
| | | | | | | | | While looking for differences, we found that C tor always omits the flags and the hostname from a BEGIN message sent on an onion service circuit. In torspec!179, we specified that behavior. This patch brings arti into conformance. Closes #1077.
* hsclient: Rename get_or_launch{connection => circuit}Nick Mathewson2023-10-241-1/+1
| | | | Closes #1078.
* tor-keymgr: Use ArtiPathError for invalid ArtiPaths.Gabriela Moldovan2023-10-191-2/+2
|
* arti-client: fix up launch_onion_service a bit.Nick Mathewson2023-10-031-10/+19
| | | | Return a stream of requests, and document what to do with them.
* hss: actually provide a stream of RendRequest from launch().Nick Mathewson2023-09-271-1/+1
|
* tor-hsservice: Run cargo fmt.Gabriela Moldovan2023-09-271-3/+1
|
* tor-hsservice: Make Launchable a non-async trait.Gabriela Moldovan2023-09-271-1/+0
| | | | | This doesn't need to be an async_trait now that `Publisher::launch` is no longer async.
* arti-client: add a minimal onion-service-launching API.Nick Mathewson2023-09-271-6/+54
|
* tor-hsclient, arti-client, tor-keymgr, tor-netdoc: Use a keypair instead of ↵Gabriela Moldovan2023-09-251-2/+2
| | | | | | | | | | | | | StaticSecret. Previously, when retrieving `KS_hsc_desc_enc` keys (or any other x25519 keys) from the keystore, the keymgr would discard the public part of the key (SSH private keys contain the public part of the key too). Instead of discarding the public key and returning just the `StaticSecret`, the keymgr now returns a `StaticKeypair`. This makes the x25519 `EncodableKey`/`ToEncodableKey` implementation consistent with the ed25519 one (which retrieves key pairs rather than "unescorted" secrets).
* arti-client: add exit selection with GeoIP country codeseta2023-09-181-1/+40
| | | | | | | | | | | | | | | | | | | | This threads the country codes work through the rest of the codebase: - `tor-dirmgr` will now enable GeoIP with the embedded database when the `geoip` future is enabled - This can be extended later using the `DirMgrConfig` to allow specifying a custom database; this is not done here, though - `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain new `country_code` members to allow filtering circuits by country - These are `()` in builds where the `geoip` feature is not enabled -- doing it this way means we don't have to copy and paste huge swathes of code, since we can't use `#[cfg]` in patterns - `ExitPathBuilder` gains (hacked-in) support for choosing a relay with the correct country code - Due to the lack of conjuction, we just copy and paste a small bit, pending further refactoring - `StreamPrefs` now lets you specify a country code, letting embedders make use of the feature
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Resolve a pair of warnings about redundant closures.Nick Mathewson2023-08-221-2/+2
|
* pass reconfigure_lock guard into TorClient::reconfigure_innersw1tch2023-07-251-3/+8
|
* cargo fmtsw1tch2023-07-241-1/+3
|
* fixes deadlock in TorClient::reconfiguresw1tch2023-07-241-1/+34
|
* Revert "keymgr: Require callers to be explicit about which keystore to get ↵Gabriela Moldovan2023-07-211-6/+4
| | | | | | | | | keys from." This reverts commit 38a6c74c7894dc96b16c9039cacc2a4023977b05. This also updates some tests to make them compile with the reverted version of the code.
* keymgr: Require callers to be explicit about which keystore to get keys from.Gabriela Moldovan2023-07-201-4/+6
|
* keymgr: Explicitly specify the default keystore for `KeyMgr`.Gabriela Moldovan2023-07-201-4/+5
|
* keymgr-config: Make fields private, add function for checking if keystore is ↵Gabriela Moldovan2023-07-201-5/+1
| | | | | | | | | enabled. Hiding the underlying value of `enabled` enables us to give it a different `auto` value depending on whether the `keymgr` feature is enabled or not (it defaults to `true` if `keymgr` is enabled, and `false` otherwise).
* arti-client: Use a default keystore config if `experimental-api` is disabled.Gabriela Moldovan2023-07-201-18/+15
| | | | | | | 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: Move variable closer to where it's used (fmt).Gabriela Moldovan2023-07-201-24/+21
|
* arti-client: Move variable closer to where it's used.Gabriela Moldovan2023-07-201-2/+1
|
* arti-client: Make the `KeyMgr` optional.Gabriela Moldovan2023-07-201-34/+43
| | | | | If the Arti keystore is disabled, we have nothing to initialize the `KeyMgr` with, so we might as well make it optional.
* arti-client: Add TODO about expanding the keystore_dir in build().Gabriela Moldovan2023-07-171-0/+2
|
* arti-client: Log whether a keystore is in use.Gabriela Moldovan2023-07-131-1/+4
|
* arti-client: Use the config struct from tor-keymgr.Gabriela Moldovan2023-07-131-7/+12
|
* arti-client: Log whether the client auth keys were retrieved.Gabriela Moldovan2023-07-121-0/+2
|
* arti-client: Remove outdated TODO.Gabriela Moldovan2023-07-111-3/+0
| | | | These errors aren't ignored anymore.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Remove some needless into_iter() calls.Nick Mathewson2023-07-101-2/+1
| | | | | | Clippy nightly now detects when you're calling into_iter() and passing the result into something that accepts an `impl IntoIterator`.
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-3/+3
| | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* Finish a sentence in the documentation for TorClient::netdir()Nick Mathewson2023-07-031-1/+2
|
* keystore: Change the dummy HsClientSpecifier to "default".Gabriela Moldovan2023-06-301-1/+1
|