aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
...
* arti-client: StreamPrefs::connect_to_onion_services: docsIan Jackson2023-06-161-1/+6
| | | | This disposes of the TODO as well.
* arti-client: StreamPrefs::connect_to_onion_services: fix cfgIan Jackson2023-06-161-1/+1
|
* arti-client: StreamPrefs::connect_to_onion_services: fix nameIan Jackson2023-06-161-1/+1
|
* Added setter method in impl for StreamPrefsnate_d1azzz2023-06-161-1/+5
| | | | | | | | (Taken from tpo/core/arti!1113 and squashed by Ian Jackson, with conflicting hunk in StreamPrefs struct skipped. The setter name is wrong, the cfg feature is wrong, there are no docs, and the TODO is still there. These will be fixed in a moment.)
* arti-client hs: connect_to_onion_services: default to trueIan Jackson2023-06-161-2/+5
| | | | | This should be enabled by default. There's still no setter for not, nor is it honoured - those are separate TODOs.
* arti-client: OnionAddressNotSupported: Change description and kindIan Jackson2023-06-161-3/+3
| | | | | Previously this error meant "we haven't written this code yet". Now, we change it to "you haven't built Arti with this feature".
* arti-client: address: Apply deferred rustfmt churnIan Jackson2023-06-161-2/+6
|
* arti-client: address: Plumb StreamPrefs into enforce_configIan Jackson2023-06-162-7/+12
| | | | No functional change yet. We'll use this shortly.
* arti-client: address: Move config enforcementIan Jackson2023-06-162-9/+11
| | | | Disposes of two TODOs.
* arti-client: address: Move config enforcement (pre-fmt)Ian Jackson2023-06-161-2/+6
| | | | This will make subsequent commits less noisy to read.
* arti-client: address: Disable some tests when HS disabledIan Jackson2023-06-161-9/+16
| | | | | These have already been partially/replaced supplemented. The other test referred to will appear shortly.
* arti-client: Rename hs feature to onion-service-client (cfg lines)Ian Jackson2023-06-164-23/+22
|
* arti-client: Rename hs feature to onion-service-clientIan Jackson2023-06-162-3/+4
| | | | | | Rationale as per #756. This is the same name as in the `arti` crate.
* arti-client: rustfmtGabriela Moldovan2023-06-151-3/+8
|
* arti-client: Fix clippy lints.Gabriela Moldovan2023-06-151-0/+7
| | | | | | We need to allow some lints in the dummy key manager because its implementation needs to mirror that of `tor_keymgr::KeyMgr` (so we can't apply the API changes suggested by clippy).
* arti-client: Use a dummy key manager if the keymgr feature is disabled.Gabriela Moldovan2023-06-157-8/+75
| | | | | | | | | TorClient now only uses the tor_keymgr::KeyMgr implementation if the keymgr experimental feature is enabled. If the feature is disabled, a dummy key manager implementation is used. The new `keymgr` feature depends on `onion-client`, because the key manager is only used for HS client auth.
* arti-client: Implement From<tor_keymgr::Error> for Error.Gabriela Moldovan2023-06-152-4/+9
|
* keymgr, arti-client: KeyMgr should return Ok(None) if the key is not found.Gabriela Moldovan2023-06-151-24/+2
| | | | | | | This simplifies usage quite a bit and will enable us to implement a dummy `KeyMgr` that doesn't depend on the error types from tor-keymgr (which will replace the "real" `KeyMgr` if the keymgr feature is disabled).
* arti_client: Add TODO about refactoring code around HsClientSecretKeysBuilder.Gabriela Moldovan2023-06-151-0/+4
|
* keymgr: Move the HS client and service key specifiers out of tor-keymgr.Gabriela Moldovan2023-06-151-6/+5
| | | | | | The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to `tor-hsclient`. The HS service secret key specifier stubs are moved to `tor-hsservice`.
* arti-client, keymgr: Initialize KeyMgr with an ArtiNativeKeyStore.Gabriela Moldovan2023-06-151-2/+16
| | | | | | | The `KeyMgr` is now initialized with an `ArtiNativeKeyStore` built from an invalid key store root dir (this is alright for the purposes of this proof-of-concept, since `ArtiNativeKeyStore::new` won't fail as it doesn't currently validate the keystore root dir).
* keymgr: Introduce ToEncodableKey to simplify lookups.Gabriela Moldovan2023-06-151-7/+6
| | | | | | | This means `KeyMgr` users don't need to specify the underlying key type (e.g. `ed25519::Keypair`) when retrieving keys. Instead, they can just specify the type required (as long as it implements `ToEncodableKey`), e.g. `HsClientIntroAuthKeypair`.
* arti-client: Make the client use the KeyMgr.Gabriela Moldovan2023-06-152-3/+82
| | | | | `TorClient` now uses a `KeyMgr` to retrieve the `HsClientSecretKeys` client auth keys passed to `get_or_launch_connection`.
* keymgr: Add key manager implementation stub.Gabriela Moldovan2023-06-151-1/+2
|
* make snowflake example feature-gatedtrinity-1686a2023-06-141-5/+13
|
* Merge branch 'rpc_pseudomethods_v6' into 'main'Nick Mathewson2023-06-121-5/+7
|\ | | | | | | | | RPC: Functionality to downcast dyn Object to a dyn Trait. See merge request tpo/core/arti!1225
| * RPC: Functionality to downcast dyn Object to a dyn Trait.Nick Mathewson2023-06-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a rather tricky piece of functionality. It works as follows. We introduce a `CastTable` type. Each `CastTable` tells us how to downcast `dyn Object` for objects of a single concrete type. The `Object` type now has a `get_casttable` method that returns an empty `CastTable` by default. `CastTable` is, internally, a map from the `TypeId` of the target dyn Trait reference type to a function `fn(&dyn Object) -> &dyn Trait`. These functions are stored as `Box<dyn Any + ...>`. (They are Boxed because they may refer to generic functions, which you can't get a static reference to, and they're Any because the functions have different types.) The `decl_object!` macro now implements `get_casttable` as appropriate. (The syntax is a bit janky, but that's what we get for not using derive_adhoc.) For non-generic types, `get_casttable` uses a Lazy<CastTable>`. to initialize a CastTable exactly once. For generic types, it use a `Lazy<RwLock<HashMap<..>>` to build one CastTable per instantiation of the generic type. This could probably be optimized a bit more, the yaks could be shaved in a more scintillating hairstyle, and the syntax for generic `decl_object` could definitely be improved.
| * rpc: make decl_object! responsible for writing impl Object {} blocks.Nick Mathewson2023-06-071-1/+1
| |
* | Merge branch 'pt-snowflake' into 'main'Nick Mathewson2023-06-113-2/+116
|\ \ | | | | | | | | | | | | | | | | | | add documentation for configuring snowflake pt Closes #879 and #875 See merge request tpo/core/arti!1216
| * | add a few more comments on PTstrinity-1686a2023-06-092-2/+5
| | |
| * | change path to snowflake clienttrinity-1686a2023-06-081-1/+2
| | |
| * | change link for more information on ptstrinity-1686a2023-06-081-1/+1
| | |
| * | remove forgoten debug linetrinity-1686a2023-06-081-1/+0
| | |
| * | add anchor to amp-cache linktrinity-1686a2023-06-081-1/+1
| | |
| * | complement general documentation on bridges and pttrinity-1686a2023-06-073-0/+12
| | |
| * | move snowflake example to dedicated file and comment it moretrinity-1686a2023-06-072-27/+103
| | |
| * | add documentation for configuring snowflake pttrinity-1686a2023-06-071-4/+27
| |/
* | Merge branch 'report-trait-doc-fix' into 'main'Alexander Færøy2023-06-092-0/+107
|\ \ | | | | | | | | | | | | Expand arti-client docs to include error reporting section See merge request tpo/core/arti!1213
| * | Rephrase error handling to reportingSaksham Mittal2023-06-081-2/+2
| | |
| * | Add error handling section in READMESaksham Mittal2023-06-081-0/+40
| | |
| * | Add separate example with ReportSaksham Mittal2023-06-081-0/+67
| |/
* / hs: Fix a feature name in arti-clientNick Mathewson2023-06-071-1/+1
|/ | | | In arti-client it's called "onion-client", not "hs-client".
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Refactor ClientCirc APIs to use Arc<ClientCirc>.Nick Mathewson2023-05-161-1/+1
| | | | | | | | | | | | Now ClientCirc is no longer `Clone`, and the things that need it to be `Clone` instead return and use an Arc<ClientCirc> We're doing this so that ClientCirc can participate in the RPC system, and so that its semantics are more obvious. Closes #846. Thanks to the type system, this was a much simpler refactoring than I had feared it would be.
* Revise all XXXXs from fixup-featuresNick Mathewson2023-05-151-3/+7
|
* Run fixup-features _with_ annotations.Nick Mathewson2023-05-151-0/+2
| | | | | This litters our Cargo.toml files with "XXX" entries that we should fix.
* Reformat Cargo.toml files.Nick Mathewson2023-05-151-1/+19
|
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-6/+7
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* Mark an initial set of non-additive features.Nick Mathewson2023-05-151-5/+7
|
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-043-0/+22
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.