summaryrefslogtreecommitdiff
path: root/crates/arti-client/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* Remove unnecessary `doc(cfg(...))` attributesNeel Chauhan2025-12-041-5/+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]>
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-2/+2
| | | | Run maint/add_warning
* Remove "doc_auto_cfg" incantation from all crates.Nick Mathewson2025-09-291-1/+1
| | | | This feature has been removed from nightly, in favor of doc_cfg.
* proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-1/+1
| | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* arti-client: Fix test for FlowCtrl=2.Nick Mathewson2025-08-061-3/+3
| | | | | (It is possible for arti-client to have flowctl-cc disabled, but for tor-proto to have it enabled.)
* tor_proto: add FLOWCTRL_CC to supported_client_protocolsNick Mathewson2025-08-061-5/+13
| | | | | Since we now allow it to be turned on, we can include it among our supported protocols.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+1
|
* arti-client: Keep a somewhat accurate notion of our release date.Nick Mathewson2025-04-161-0/+19
| | | | | | | | | This doesn't need to be perfect, but we need to use it to see if a consensus is new enough that we should obey its recommendations. This commit also adds a script to update or check our release date, and calls this script from our cargo-publish script.
* Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+3
|
* arti-client: Implement the basics of protocol enforcement.Nick Mathewson2025-04-161-1/+1
| | | | This is the major part of #1849.
* New functions to report supported subprotocolsNick Mathewson2025-04-161-0/+98
| | | | | | | | | | | | | | | Part of #1849. Note that these functions are distributed across crates, so that if (in the future) we stop doing API breaks with every release, we will get the right outputs. Note also that these functions build the list of protocols out of specific symbolic features, rather than numbers: this makes it easier to avoid errors about "which feature was Relay=4 again", and easier to avoid accidentally referring to a protocol that doesn't exist, like "Consensus" (should be "Cons") or "HsDir" (case is wrong).
* clippy: deny `mod_module_files`Steven Engler2025-01-061-0/+1
| | | | | | Denies 'mod.rs' files for consistency. https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
* add_warnings, *: Allow clippy::needless_lifetimesNick Mathewson2024-12-031-0/+1
| | | | | | | | In 1.83, this warning triggers on many of our crates. We're thinking of fixing them all, but for now, we're going to disable the warning. This is part of #1765.
* Disable a lot of dead code warningsIan Jackson2024-10-171-0/+3
| | | | | | | Now cargo check --workspace --no-default-features --all-targets cargo build -p arti --no-default-features --features=memquota,tokio,native-tls are both clean.
* arti-client: Add an InertTorClient for accessing client state.Gabriela Moldovan2024-08-281-1/+1
| | | | | | | | | | | | | | | | Implements the `TorClientThatIsntRunning` mentioned in !2314 (see also `doc/dev/notes/keymgr-porcelain.md`), except `TorClientThatIsntRunning` is called `InertTorClient`. This commit is mostly code motion: I've moved the `create_keymgr` function and the impls of `generate_service_discovery_key` and `get_service_discovery_key` from `TorClient` to `InertTorClient`. The `InertTorClient` advertises itself as a handle for accessing the keystores and other persistent state, but it currently only has 2 functions (`generate_service_discovery_key` and `get_service_discovery_key`). I expect it will grow additional functionality in the future.
* arti-client: Add a function for generating client authorization keys.Gabriela Moldovan2024-06-271-0/+10
| | | | Part of #1281
* Add a maximum to local_resource_timeout.Nick Mathewson2024-06-241-1/+1
|
* rpc: Add an isolated-client method on TorClient.Nick Mathewson2024-05-091-1/+1
|
* 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.
* | RPC: Implement methods to get and watch client bootstrap status.Nick Mathewson2024-05-061-0/+2
|/
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Refactor and improve error hinting.Nick Mathewson2024-02-141-1/+1
| | | | | | | | | | | | 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.
* arti-client: add exit selection with GeoIP country codeseta2023-09-181-0/+4
| | | | | | | | | | | | | | | | | | | | 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 add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* keymgr: Move dummy implementation to tor-keymgr.Gabriela Moldovan2023-06-221-1/+0
|
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* arti-client: Create module exposing one of the key manager APIs.Gabriela Moldovan2023-06-201-1/+0
| | | | | | | | This moves the key manager API selection (dummy vs "real" impl) into the `keymgr` module. The module exports the dummy API if the `keymgr` feature is disabled, and the impl from `tor-keymgr` otherwise. Part of #897
* arti-client: Use a dummy key manager if the keymgr feature is disabled.Gabriela Moldovan2023-06-151-0/+2
| | | | | | | | | 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.
* add opaque ErrorHint API, impl ErrorHint from BadPermissionsShady Katy2023-01-271-1/+1
|
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-237/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* Add pt-client and bridge-client features to arti and arti-clientIan Jackson2022-10-121-0/+2
|
* arti-client README: Say we intend to provide FFIIan Jackson2022-09-021-1/+2
|
* READMEs: arti-client: Remove caveats and add some xrefsIan Jackson2022-09-021-7/+15
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-241-0/+1
|
* Document more explicitly what "voiding a semver warranty" entailsNick Mathewson2022-08-111-1/+5
| | | | Closes #522.
* Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | Update all lint blocks
* Merge branch 'main' into 'accel-features'Nick Mathewson2022-06-161-2/+5
|\ | | | | | | # Conflicts: # crates/arti-client/Cargo.toml
| * Remove "rustls" from "full", for license reasons.Nick Mathewson2022-06-151-2/+5
| | | | | | | | | | | | | | | | | | Rustls uses ring, which uses code from BoringSSL, which derived from OpenSSL before OpenSSL changed their license. So ring is currently under 3BSD/SSLEay licenses, which aren't GPL-compatible, which may be a problem for some people. See #493.
* | Add "accel-*" features to arti-client and arti.Nick Mathewson2022-06-131-0/+9
|/ | | | | | | | | | These need to be optional: they improve performance by shifting to asm implementations, which may not be everybody's idea of good practice. These are not 'pure' features, since they select one implementation but disable another. Therefore they don't go in `full`. Closes #441.
* Document "full", "experimental" in toplevel crate documentation.Nick Mathewson2022-06-131-41/+65
| | | | | Also, unify the features documentation format for those two crates, and document previously undocumented features there.
* lints: Add let_unit_value allow to all cratesIan Jackson2022-05-311-0/+1
| | | | | From running add_warning, with manual picking of the right hunks/lines.