summaryrefslogtreecommitdiff
path: root/crates/arti-client
Commit message (Collapse)AuthorAgeFilesLines
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* Resolve a rustdoc warning.Nick Mathewson2024-06-241-2/+2
|
* Add a maximum to local_resource_timeout.Nick Mathewson2024-06-242-8/+33
|
* local_resource_timeout: Change wait interval to 50 ms.Nick Mathewson2024-06-241-1/+1
|
* Rename fslock_timeout to local_resource_timeoutNick Mathewson2024-06-241-11/+16
| | | | Name chosen to match the error kind that we're detecting.
* Clarify documentation about blocking.Nick Mathewson2024-06-241-2/+4
|
* TorClientBuilder: Wait for a little while if the lockfiles are held.Nick Mathewson2024-06-242-4/+110
| | | | | | | | | | | | | | | | | | | | | This commit adds a parameter to TorClientBuilder that control how long we should retry constructing a TorClient if we get a LocalResourceInUse error. When this parameter is not set, we default to 500 milliseconds for async entry points and 0 milliseconds for sync entry points. (`LocalResourceInUse` usually means that a lockfile is held by somebody else; but when the resource is some other type, we typically want the same behavior anyway.) (I really don't want to introduce delays by default for the create_unbootstrapped case, since it previously had no delay at all.) There is now also an async entry point to create an unbootstrapped TorClient. Closes #1464.
* TorClientBuilder: take self by reference when buildingNick Mathewson2024-06-242-4/+5
| | | | | There is no actual reason to consume this type, and taking it by reference allows us to retry.
* Update to derive-deftly 0.12.1Ian Jackson2024-06-171-1/+1
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* Merge branch 'rpc-stream-methods' into 'main'Nick Mathewson2024-06-112-73/+110
|\ | | | | | | | | | | | | RPC: Use RPC methods instead of the "ClientConnectionTarget" trait. Closes #1427 See merge request tpo/core/arti!2192
| * Several typo fixes from GabiNick Mathewson2024-06-111-3/+3
| |
| * RPC: Use RPC methods instead of the "ClientConnectionTarget" trait.Nick Mathewson2024-06-112-73/+110
| | | | | | | | | | | | | | | | | | | | | | | | On its own, this might not seem like a huge improvement, but it will later let us implement these RPC methods for types that can't reasonably implement ClientConnectionTarget. It also serves as a proof of concept that special-method invocation can actually work, so that we can build things like this in cases where introducing a trait isn't practical. Closes #1427
* | StorageConfig: complete a missing piece of documentation.Nick Mathewson2024-06-111-1/+1
| |
* | StorageConfig: Light reformatting.Nick Mathewson2024-06-111-0/+3
|/
* rpc: Pass around our rpc::Context in an Arc.Nick Mathewson2024-06-101-3/+3
| | | | | | | | Formerly we used a Box. That was okay at first, but now that we want RPC methods to be able to invoke other RPC methods, we don't want the Invocable methods to have to consume the Context. This requires that Context become Sync.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - tor-linkspec - tor-cell - tor-proto - tor-netdoc - tor-consdiff - tor-netdir - tor-relay-selection - 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-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* arti-client: Unconditionally retire all HS circuits if circmgr says so.Gabi Moldovan2024-06-031-12/+1
| | | | | | | If the circmgr retires all of its circuits, so should the HS circ pool. The circuits can be retired for various reasons (for example, if the configured vanguard mode changes).
* arti-client: Add TODO about always clearing the HS circ pool.Gabriela Moldovan2024-06-031-0/+8
|
* tor-circmgr: Remove VanguardMode from Pool (fmt).Gabriela Moldovan2024-06-031-4/+3
|
* tor-circmgr: Remove VanguardMode from Pool.Gabriela Moldovan2024-06-031-5/+7
| | | | | | | | | Storing the VanguardMode in multiple places (in the VanguardMgr *and* the HS circ Pool) is dangerous and can lead to split brain situations where different parts of the code think they are running in different VanguardModes. See #1424
* tor-guardmgr: Unconditionally define VanguardConfig.Gabriela Moldovan2024-06-031-11/+3
| | | | | | | | | We want to export the `VanguardConfig` even if the `vanguards` feature is disabled (we will need to unconditionally include it in the arti config). Note that if `vanguards` are disabled, the `VanguardMode` from the `VanguardConfig` can only be `Dsiabled`.
* arti-client: Remove unnecessary VanguardConfig pub use.Gabriela Moldovan2024-06-031-6/+0
| | | | | | | This is already exported via the `pub mod vanguards` module, so there is no need to export it from the top-level too. This *is* a breaking change, but the downstream fix is trivial (and the type should never have been exported directly from `arti_client::config` in the first place).
* RPC: Require an Error type in methods.Nick Mathewson2024-05-161-0/+3
| | | | | | | | This is needed so that we can cast special methods' return types properly. I wish I could make this optional, but Rust doesn't allow defaulting an associated type.
* Merge branch 'enforce_method_names' into 'main'Nick Mathewson2024-05-161-3/+3
|\ | | | | | | | | | | | | RPC: Enforce method name format. Closes #823 See merge request tpo/core/arti!2149
| * RPC: Use RPC method names in a consistent format.Nick Mathewson2024-05-141-3/+3
| | | | | | | | | | Specifically, we want a single colon, and we want our method names to be in snake_case.
* | arti-client: Add one-hop circuit examplejuga2024-05-152-0/+67
|/ | | | Co-authored-by: gabi-250 <[email protected]>
* RPC: Add notes about ClientConnectionTargetNick Mathewson2024-05-141-0/+7
| | | | | Document its relation to the method system, and possible future evolution.
* RPC: Require DynClone for ClientConnectionError.Nick Mathewson2024-05-142-4/+7
|
* RPC: Seal ClientConnectionError.Nick Mathewson2024-05-141-2/+19
|
* RPC: RpcDataStream type to act as a "stream-shaped hole"Nick Mathewson2024-05-142-0/+12
| | | | | | | | | The application creates these, using a new-stream-handle RPC command, on an object that can actually create streams. Then later, the application provides the (global) identity of one of these objects when it's making a SOCKS connection. This causes the object to take hold of a `DataStreamCtrl`.
* RPC: Add a trait that can be the target of SOCKS requestsNick Mathewson2024-05-123-4/+84
| | | | | | | | | | | | (These will later become objects that can receive any application request, once we have HTTP connect.) For now, Session and TorClient implement this trait; but soon there will be a new type to hold on to the created DataStreamCtrl. There are some XXXXs here, marking code that is too ugly to live. I should fix it before I merge this branch.
* rpc: Mark TorClient as exposed outside of sessionNick Mathewson2024-05-091-1/+6
|
* rpc: Add an isolated-client method on TorClient.Nick Mathewson2024-05-092-3/+27
|
* Adjust examples lints using add_warningNick Mathewson2024-05-076-18/+18
|
* Merge branch 'new_ci_cfg_strategy' into 'main'Nick Mathewson2024-05-071-2/+2
|\ | | | | | | | | | | | | add_warning/CI: New strategy to avoid "unexpected-cfgs" warning Closes #1395 See merge request tpo/core/arti!2129
| * Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | | | | | This commit is automatically generated.
* | Add requisite RPC method name prefixesNick Mathewson2024-05-061-2/+2
| |
* | TorClient: Slightly cleaner (?) interface for registering RPC methods.Nick Mathewson2024-05-061-4/+4
| |
* | Add a note about declaring get and watch functions.Nick Mathewson2024-05-061-0/+6
| |
* | Add a note about why the RPC functions aren't declared as methods.Nick Mathewson2024-05-061-0/+5
| |
* | RPC: Send "null" for blockage rather than omitting it.Nick Mathewson2024-05-061-2/+1
| |
* | Lightly simplify the syntax for installing multiple InvokerEntsNick Mathewson2024-05-061-2/+4
| |
* | RPC: Implement methods to get and watch client bootstrap status.Nick Mathewson2024-05-062-0/+105
|/
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection 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-hyper
* arti-client: vanguards cargo feature: remove from experimentalIan Jackson2024-04-301-1/+0
| | | | Followup to !2109.
* arti-client: Make vanguards non-experimental.Gabriela Moldovan2024-04-291-1/+2
| | | | This makes the vanguards feature non-experimental.
* Fix recursive impl for arti_client::Error.Nick Mathewson2024-04-221-1/+1
| | | | This is an actual bug. Closes #1379.
* arti-client: add hs_circ_pool() method on TorClientRichard Pospesel2024-04-151-0/+14
|