summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion 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-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* Bump patchlevel versions on non-{tor/arti} crates.Nick Mathewson2024-04-021-2/+2
| | | | | | | | | | | | | | | | These have all had backward-compatible changes. Generated with: ``` cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p test-temp-dir cargo set-version --bump patch -p fslock-guard cargo set-version --bump patch -p hashx cargo set-version --bump patch -p equix cargo set-version --bump patch -p caret cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error ```
* tor-rtcompat: CompoundRuntime: Add a CoarseTimeProvider, and implIan Jackson2024-03-251-1/+1
| | | | | | In all the uses in-crate, this is just a RealCoarseTimeProvider. Now all the compound runtimes impl CoarseTimeProvider.
* Add tests for configuring unmanaged transportsNick Mathewson2024-03-141-11/+49
| | | | | Also, adapt the pt configuration tests to check for whether the error messages are as expected.
* Rename ManagedTransportConfig to TransportConfig.Nick Mathewson2024-03-142-9/+9
| | | | We're going to start using this type for _every_ kind of transport.
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-131-2/+2
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * tor-config: Allow ConfigurationSource to be verbatim text.Nick Mathewson2024-03-131-2/+2
| | | | | | | | | | This will let us test our configuration logic without having to use the `config` crate directly.
* | Add unknown-lints exception to examplesNick Mathewson2024-03-136-1/+6
| | | | | | | | | | We need this to avoid warnings when runnning non-nightly clippy on these examples.
* | Run maint/add_warning.Nick Mathewson2024-03-1311-0/+11
|/
* Merge branch 'arti_client_test' into 'main'gabi-2502024-03-111-1/+12
|\ | | | | | | | | arti-client: increase coverage in src/address.rs See merge request tpo/core/arti!2029
| * arti-client: increase coverage in src/address.rsBrady Fomegne2024-03-051-1/+12
| | | | | | | | | | | | - added test for TorAddr::enforce_config with invalid/onion hostname - added test for display Host::Onion - added test for any type &T who implement IntoTorAddr trait
* | tor-circmgr: Add HsCircPoolConfig, make HsCircPool::reconfigure general-purpose.Gabriela Moldovan2024-03-113-7/+13
| |
* | tor-circmgr: Create the VanguardMgr in CircMgr::new.Gabriela Moldovan2024-03-111-19/+0
| |
* | arti-client: Reconfigure the HS circuit pool if needed.Gabriela Moldovan2024-03-111-0/+14
| |
* | arti-client: Keep a handle to the HsCircPool if onion-service-client is enabled.Gabriela Moldovan2024-03-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If vanguards are enabled, we will need to be able to reconfigure the HS circ pool in `TorClient::reconfigure_inner` (to handle the switch from vanguards-full to vanguards-lite etc.). The reconfiguration needs to happen even if only one of `onion-service-client` and `onion-service-service` is enabled. Without this change, in the `onion-service-client`-enabled / `onion-service-service`-disabled case, we'd need to reach into `HsClientConnector::hs_circ_pool` to reconfigure the client `HsCircPool`. By making `hs_circ_pool` part of `TorClient` in both cases, we only need to call `HsCircPool::reconfigure` from one place (in `TorClient::reconfigure_inner`).
* | arti-client: Add vanguard_config() to CircMgrConfig.Gabriela Moldovan2024-03-111-1/+15
| |
* | arti-client: Add VanguardsConfig to TorClientConfig.Gabriela Moldovan2024-03-113-3/+12
| |
* | arti-client: Re-export VanguardsConfig from vanguards module.Gabriela Moldovan2024-03-112-0/+10
| |
* | tor-circmgr: Give CircMgr a VanguardMgr.Gabriela Moldovan2024-03-114-0/+38
| | | | | | | | Closes #1277
* | Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
| |
* | Fix typos in commentsTobias Stoeckmann2024-03-061-1/+1
| |
* | arti-client: Fix typo in error message.Gabriela Moldovan2024-03-051-1/+1
| |
* | Merge branch 'deny-unchecked-duration-substraction' into 'main'Ian Jackson2024-03-051-0/+1
|\ \ | |/ |/| | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
| |
* | tor-ptmgr: Bump minor version.Gabriela Moldovan2024-03-041-1/+1
| | | | | | | | | | `tor-ptmgr` uses `tor-config` in its public API, and `tor-config` had its minor version bumped.
* | Bump the minor version, for crates with breaking changes.Gabriela Moldovan2024-03-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APIs were broken in these pre-1.0.0 crates: ``` tor-keymgr tor-config tor-checkable tor-circmgr tor-dirmgr tor-hsclient tor-hsservice tor-hsrproxy ``` Done with: ``` cargo set-version --bump minor -p tor-keymgr cargo set-version --bump minor -p tor-config cargo set-version --bump minor -p tor-checkable cargo set-version --bump minor -p tor-circmgr cargo set-version --bump minor -p tor-dirmgr cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p tor-hsservice cargo set-version --bump minor -p tor-hsrproxy ```
* | Bump patchlevel of pre-1.0.0 crates with new APIs.Gabriela Moldovan2024-03-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APIs were added: ``` tor-units tor-cell tor-proto tor-netdir arti-client ``` Done with: ``` cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-cell cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p arti-client ```
* | Bump patchlevel of crates with functional changes.Gabriela Moldovan2024-03-041-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | Functional changes were made, but no APIs were added or broken: ``` tor-events (async_broadcast 0.6.0 -> 0.7.0) tor-netdoc (signature 1 -> 2) tor-guardmgr arti-testing (config 0.13.4 -> 0.14.0) tor-persist (breaking changes gated behind experimental feature) fslock-guard (fix lockfile_has_path compilation on Windows) ``` Done with: ``` cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p arti-testing cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p fslock-guard ```
* tor-hsclient: Remove client nickname from the client key specifiers (fmt).Gabriela Moldovan2024-02-221-6/+2
|
* tor-hsclient: Remove client nickname from the client key specifiers.Gabriela Moldovan2024-02-221-5/+2
| | | | Closes #1283
* Merge branch 'hss_non_experimental' into 'main'gabi-2502024-02-212-16/+15
|\ | | | | | | | | | | | | Mark onion service features as non-experimental Closes #1182 See merge request tpo/core/arti!1993
| * Move onion-service-service to non-experimental section of READMEs.Nick Mathewson2024-02-201-3/+3
| |
| * arti-client: Make onion-service-service and keymgr non-experimental.Nick Mathewson2024-02-201-13/+12
| |
* | arti, arti-client, tor-keymgr: Remove keystore dir configuration.Gabriela Moldovan2024-02-212-30/+3
|/ | | | Closes #1202
* Add tests for finding (or not) hints in our error types.Nick Mathewson2024-02-161-0/+58
|
* Discourage providing HintableErrorImpl without using the macro.Nick Mathewson2024-02-161-3/+10
|
* Rename one of the hint methods to hint_specificNick Mathewson2024-02-161-3/+10
|
* Use and document the new arti-client/anyhow featureNick Mathewson2024-02-151-0/+2
|
* Refactor and improve error hinting.Nick Mathewson2024-02-144-51/+114
| | | | | | | | | | | | Instead of using complicated match statements, use downcasting to find error types that define specific hints. This also lets us define a reasonable hint-extractor for anyhow::Error, and use it when reporting errors in main. I've left an implementation of hint() in `impl Error`, to avoid breaking backward compatibility. Closes #1165.
* educe: Use std's default for two structsIan Jackson2024-02-121-2/+1
| | | | | | Reviewing uses of `#[educe(default)]`, I came across these two places where it was applied to a non-generic struct without any special attributes on fields. std's derive will do just as well here.
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-121-10/+6
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* Merge branch 'delete-semvers' into 'main'Ian Jackson2024-02-051-1/+0
|\ | | | | | | | | Remove all semver.md files to start a fresh release round See merge request tpo/core/arti!1957
| * Remove all semver.md files to start a fresh release roundIan Jackson2024-02-051-1/+0
| |
* | Bump patch versions *with* dependency updateIan Jackson2024-02-051-1/+1
| | | | | | | | | | | | | | This crate has had new features added. It's 0.x. So bump in-tree dependencies' references: fs-mistrust
* | Bump minor versionsIan Jackson2024-02-051-21/+21
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion 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-config arti-hyper arti-bench arti-testing
* tor-hsservice: Use tor_persist::state_dirIan Jackson2024-02-012-2/+4
|
* tor-hsservice: Use tor_persist::state_dir, etc. (fmt)Ian Jackson2024-02-011-4/+3
|
* tor-hsservice: Use tor_persist::state_dirIan Jackson2024-02-011-8/+8
| | | | | | | | | | | | | | | | | | | | | | | We no longer do replay log locking in IptManager::new. Instead, we rely on the acquire_instance call in OnionService::launch, which ends up with ipt_mgr getting an InstanceHandle (which contains a lock guard). OnionServiceStateMgr is abolished; it existed to deal with the generics in the tor_persist::StateMgr API. state_dir has no generics (other than the T being loaded/stored). Many places (structs and argument lists) now have state_dir types which embody a path (or a CheckeDir) along with a lock, rather than separate path+lock+mistrust. The creation/startup code uses the new calls from state_dir. Other more minor changes: - StartupError::StateDirectoryInaccessible contains tor_persist::Error - test::create_storage_handles_from_state_dir changed and renamed, from _from_state_mgr. - replay::PersistFile's (separate) file lock is now fslock_guard's
* tor-hsclient: Rename HsClientSpecifier to HsClientNickname (fmt).Gabriela Moldovan2024-01-311-2/+2
|
* tor-hsclient: Rename HsClientSpecifier to HsClientNickname.Gabriela Moldovan2024-01-311-2/+2
| | | | | Service nicknames are represented by `HsNickname`, so let's rename `HsClientSpecifier` to `HsClientNickname`.