summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/client.rs
Commit message (Collapse)AuthorAgeFilesLines
* arti-client: warn if reconfig left client in inconsistent stateSteven Engler2026-06-111-15/+42
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* client: Reflect manually disabled bootstrap in statusNick Mathewson2026-06-021-3/+65
| | | | | If we have made bootstrapping manual, and not launched a bootstrap, we now reflect this as the reason that bootstrapping is blocked.
* Apply 2 suggestion(s) to 1 file(s)Nick Mathewson2026-05-271-2/+2
| | | Co-authored-by: gabi-250 <[email protected]>
* client: Have launch_onion_service instantiate RunningInner as needed.Nick Mathewson2026-05-261-4/+28
| | | | | | Otherwise we either lose the property that you can call launch_onion_service before bootstrapping has begun, or we have to make launch_onion_service async.
* client: RunningInner::reconfigure: refactor running → selfNick Mathewson2026-05-261-42/+80
| | | | | (This is a separate commit in order make the code movement in the previous commit clearer.)
* client: Move dirmgr_store back into ClientShared.Nick Mathewson2026-05-261-9/+10
| | | | | This will ensure that the TorClient takes its file locks immediately on construction.
* client: Fold wait_for_bootstrap{,_running} into a single method.Nick Mathewson2026-05-261-20/+14
|
* client: change remaining wait_for_bootstrap user.Nick Mathewson2026-05-261-5/+6
|
* client: Defer creation of most structures until bootstrap.Nick Mathewson2026-05-261-126/+225
| | | | | | This will let us be more confident in the inertness of a not-bootstrapping TorClient, _and_ make it easier to reconfigure things before the client is started.
* client: Rename create_inner to create_implNick Mathewson2026-05-261-1/+1
| | | | | Now that we have a type called "inner", and will soon have a function to create it, we really don't want to retain this name.
* client: move bootstrap lock to the head of bootstrap_inner.Nick Mathewson2026-05-261-5/+5
| | | | | We want this look to cover the whole function, to avoid weird duplicate behavior while creating our bridge desc manager.
* client: Factor out the "running a client" code into an inner typestateNick Mathewson2026-05-261-81/+176
| | | | | | We'll use this to distinguish "not running" from "running", in order to make it easier to be sure that non-bootstrapping clients will definitely not try to connect to the network.
* client: rename ClientInner → ClientShared.Nick Mathewson2026-05-261-5/+5
|
* ptmgr: Defer proxy protocol string conversionNihal2026-05-261-2/+2
|
* ptmgr: pass outbound_proxy to managed PT processesNihal2026-05-261-1/+6
| | | | | | | Previously the [channel] outbound_proxy setting was applied to Arti's own direct connections but was not forwarded to managed PT processes. https://spec.torproject.org/pt-spec/configuration-environment.html
* Remove `use_obsolete_software`.Nick Mathewson2026-05-141-12/+1
| | | | | | | | Discussion on #1960 suggests that this option is not a good idea: it encourages developers to work around deliberate signals that the software they're shipping won't work on the network. Closes #1960.
* Fix documentation that referred to clones of a TorClient.Nick Mathewson2026-05-131-18/+7
|
* client: Move the ClientInner code into one impl block.Nick Mathewson2026-05-131-171/+166
|
* client: Remove some inner Arcs from ClientInnerNick Mathewson2026-05-131-9/+10
| | | | These were only Arc<> so that TorClient could implement Clone.
* client: revise StreamPrefs methodsNick Mathewson2026-05-131-14/+1
| | | | | | | | | The `set_stream_prefs` method was the only one that took a TorClient as `&mut self`. But we only expose Arc<TorClient<R>>, that isn't a reasonable API. The `clone_with_prefs` method has been renamed, since it no longer "clones" anything meaningfully.
* Make TorClient no longer implement Clone.Nick Mathewson2026-05-131-46/+86
|
* Make all TorClient constructors wrap the TorClient in an Arc.Nick Mathewson2026-05-131-8/+9
| | | | | | This is part of rationalizing the structure of TorClient so we can refactor startup logic, and so that RPC code can reason about object identity. See #2469.
* Log tunnel and circuit IDsJim Newsome2026-04-081-1/+4
|
* arti-client: Stub out usage of FsStateMgr on wasm32-unknown.Nick Mathewson2026-03-251-4/+34
| | | | | | | | The replacement (TestingStateMgr) is not correct, but it will compile until we have a supported state manager. (This made cargo-sort have me move a section around. Not sure why it cares.)
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-091-7/+10
| | | | | | | | | | | | | | | This requires the `TlsKeyAndCert` so be passed on the TLS acceptor settings. We assume that `RelayIdentities` has this information. The ChanBuilder::new() was getting a bit too convoluted and feature gated to instead we introduce new_client() and new_relay() and remove the need for `with_identities()`. Because of this, the ChanMgr::new() now returns a `Result<>`. Related to #1597 Signed-off-by: David Goulet <[email protected]>
* chanmgr: Introduce a ChanMgrConfig structDavid Goulet2026-01-131-1/+2
| | | | | | | | | | | | This struct is used to pass configuration parameters to the ChanMgr when building it. At the moment, it holds the ChannelConfig and RelayIdentities (feature gated) which will be used in subsequent commits. Note that relays do require RelayIdentities to build channels. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Remove KeyMgr from constructorDavid Goulet2026-01-131-1/+0
| | | | | | | We'll rely on a RelayIdentities to pass in the right keys to the ChanMgr instead of the entire KeyMgr. Signed-off-by: David Goulet <[email protected]>
* arti,arti-relay: change info keystore path msg to debugSteven Engler2025-12-111-1/+3
|
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-17/+0
| | | | | | | | | Fixes part of #2193. (Edits from nickm: I selected the cases here that I could verify were correct from immediate context.) Edited-by: Nick Mathewson <[email protected]>
* Merge branch 'torclient-keymgr-accessor' into 'main'wesleyac2025-12-031-0/+6
|\ | | | | | | | | Add `KeyMgr` accessor to `TorClient` See merge request tpo/core/arti!3442
| * arti-client: Add `TorClient:keymgr` getter functionhjrgrn2025-11-051-0/+6
| |
* | opentelemetry: Instrument a bunch of functions.Wesley Aptekar-Cassels2025-11-241-0/+3
| | | | | | | | | | These are all aimed at figuring out in more detail what's going on in #2079 and related issues.
* | Merge branch 'disable-hidden-service' into 'main'wesleyac2025-11-121-12/+28
|\ \ | | | | | | | | | | | | | | | | | | arti/arti-client/tor-hsservice: Support disabling onion services in the config Closes #2133 See merge request tpo/core/arti!3253
| * | arti(-client)/tor-hsservice: return None for disabled servicehashcatHitman2025-10-161-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no longer a hard error anywhere for trying to launch a service which is disabled in the config. Instead, it always means returning `Ok(None)`. The axum and hyper examples were updated again as a consequence. Signed-off-by: hashcatHitman <[email protected]>
| * | arti(-client): graceful service disable in arti onlyhashcatHitman2025-10-161-27/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a service is disabled in the config, `arti::onion_proxy::Proxy` handles it gracefully, and `arti_client::client::TorClient::launch_onion_service_with_hsid` and `arti_client::client::TorClient::launch_onion_service` both hard error. The axum and hyper examples were updated again as a consequence. Signed-off-by: hashcatHitman <[email protected]>
| * | arti/arti-client: add graceful service disablehashcatHitman2025-10-161-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hidden services disabled in the config are now handled more gracefully by arti/arti-client, before the hard error occurs. The axum and hyper examples were updated as a consequence. Signed-off-by: hashcatHitman <[email protected]>
* | | Merge branch 'bug2118a' into 'main'wesleyac2025-11-101-14/+29
|\ \ \ | | | | | | | | | | | | | | | | `arti-client`: Move `create_onion_service()` to `InertTorClient` See merge request tpo/core/arti!3435
| * | | Make create_onion_service() correctionsNeel Chauhan2025-11-101-17/+2
| | | |
| * | | Mention InertTorClient in client.rsNeel Chauhan2025-11-101-1/+1
| | | |
| * | | Don't assume we have inert_client in TorClientNeel Chauhan2025-11-041-2/+2
| | | |
| * | | `arti-client`: Move `create_onion_service()` to `InertTorClient`Neel Chauhan2025-11-041-15/+45
| | |/ | |/| | | | | | | Part of #2118.
* | | arti-client: Add TODO for #2249.Wesley Aptekar-Cassels2025-11-101-0/+1
| | |
* | | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | | | | | | | | | Run maint/add_warning
* | | all: run cargo fmtSteven Engler2025-11-041-1/+1
| | |
* | | all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-1/+1
|/ /
* / arti-relay: copy `state_mgr.try_lock()` from arti-clientSteven Engler2025-10-211-0/+1
|/
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-1/+14
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* arti-client: add doc comments to `TorClient::create_onion_service()`Steven Engler2025-09-231-0/+14
|
* fix documentation for StreamPrefs::connect_to_onion_services to match ↵Aiden McClelland2025-08-281-8/+1
| | | | | | changes in !2506 Signed-off-by: Aiden McClelland <[email protected]>