summaryrefslogtreecommitdiff
path: root/crates/arti/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.
* Merge branch 'opaque_arti_2.0' into 'main'Nick Mathewson2026-01-151-9/+30
|\ | | | | | | | | | | | | Make all non-main APIs in arti experimental. Closes #2284, #2299, and #419 See merge request tpo/core/arti!3586
| * arti: rename experimental-api "run" to "run_proxy".Nick Mathewson2026-01-131-1/+1
| | | | | | | | | | Or rather, un-rename it. It's no longer a stable thing, so it doesn't need to have this particular name.
| * Make arti crate opaque by defaultNick Mathewson2026-01-131-9/+30
| | | | | | | | | | | | Only fn main() is now pub when experimental-api is disabled. Closes #2284.
* | arti: call `tor_log_ratelim::install_runtime`Steven Engler2026-01-141-2/+6
|/
* arti: Export the chosen ports in a ports_info.json file.Nick Mathewson2025-12-161-2/+2
| | | | | This allows applications to find out where arti is listening when arti has been configured to listen with the port "auto".
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* arti: Revise strings that implied that we were a SOCKS-only proxy.Nick Mathewson2025-10-281-1/+2
| | | | Closes #2225
* Rename "arti::socks" to "arti::proxy".Nick Mathewson2025-10-281-1/+1
| | | | I'm about to add another proxy type.
* 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.
* opentelemetry: Add some instrument macros.Wesley Aptekar-Cassels2025-09-241-1/+2
| | | | | I've added these in places that are useful for the debugging that I've been doing.
* arti: keys: Add `keys check-integrity` CLI toolhjrgrn2025-09-041-1/+1
|
* Document why we are using ring with rustlsNick Mathewson2025-08-191-0/+4
| | | | See #1977, #2122.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-6/+9
| | | | | | | | | | | | | | 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: hss: Add `arti hss ctor-migrate`hjrgrn2025-07-311-1/+1
|
* arti: keys: Add arti keys-rawhjrgrn2025-07-141-2/+5
| | | | | | | | | | | | | | | | | | | * CLI: Add `keys-raw` and subcommand `remove-by-path` * arti: Add `arti::subcommand::raw` for the CLI `keys-raw` * tor-keymgr: Add `ArtiNativeKeystoreError::UnexpectedRawEntry`, `ArtiEphemeralKeystoreError::NotSupported` * tor-keymgr: Add `tor-keymgr::raw` module * tor-keymgr: Add `Keystore::remove_unchecked` * tor-keymgr: Change `Keystore::list` to return `KeystoreEntry` * tor-keymgr: Add field `KeystoreEntry::raw_id` * doc: Update keys.md * doc: Add raw.md * tor-keymgr: BREAKING: `UnrecognizedEntryError::new` associated function is now only accessible within the crate `tor-keymgr` * tor-keymgr: BREAKING: `UnrecognizedEntryId` is renamed to `UnrecognizedEntry` * tor-keymgr: BREAKING: `KeyMgr::list()` and `Keystore::list()` now return `Result<Vec<KeystoreEntryResult<KeystoreEntry>>>`
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* arti: Add keys list and keys list-keystoreshjrgrn2025-06-121-1/+20
|
* arti, cell, dirclient: Use expect instead of unwrap.Nick Mathewson2025-05-291-1/+1
| | | | | | Clippy nightly detects this problem, though earlier clippy verisons haven't. The common element here is applying unwrap() to the result from a write!().
* tor-rtcompat: Remove ToplevelBlockon from RuntimeIan Jackson2025-03-041-2/+2
| | | | | | | | Introduce ToplevelRuntime as an alias, and use it in the top-level programs. Now none of the principal protocol implementation code has access to the executor's toplevel entrypoint, and can't call it by mistake.
* arti: Make Rpc argument unconditional when constructing socks proxyNick Mathewson2025-01-231-2/+1
| | | | | | Formerly this was a conditional method argument, which is a huge antipattern. Now it is unconditionally present, as `Option<T>` for a type that is uninhabited when RPC isn't supported.
* arti: Remove old workaround for runtime selection under RPC.Nick Mathewson2025-01-231-6/+1
| | | | | This was necessary before we had support for implementing RPC methods on generic types.
* 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.
* arti-client: add path resolver to `TorClient` and `TorClientConfig`Steven Engler2024-11-181-1/+1
| | | | | | Rather than using `arti_client::config::path_resolver()`, third-party code can get the path resolver using `TorClientConfig`s `AsRef<CfgPathResolver>` impl instead.
* update `CfgPath::path` to use a `CfgPathResolver`Steven Engler2024-11-181-0/+1
| | | | | | | | | | | | | | | | This is a big change across multiple crates since there isn't a good way to break it up. This changes the signature of `CfgPath::path` to: ``` pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> { ``` Making this change means that our global `CfgPathResolver` needs to be stored in the 'arti-client' library instead of `tor-config-path`, and must be passed through to anything that calls `path` to expand the variables.
* Merge branch 'dead' into 'main'Alexander Hansen Færøy2024-10-171-0/+2
|\ | | | | | | | | Disable a lot of dead code warnings and add a default-runtime feature in arti See merge request tpo/core/arti!2551
| * Disable a lot of dead code warningsIan Jackson2024-10-171-0/+2
| | | | | | | | | | | | | | 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: remove 'relay' subcommand and 'arti-relay' depSteven Engler2024-10-151-16/+1
|/
* arti: move 'relay' subcommand to 'subcommands::relay' moduleSteven Engler2024-09-251-9/+4
|
* arti: Gate the arti hsc subcommand behind a new "hsc" feature (fmt).Gabriela Moldovan2024-09-191-4/+1
|
* arti: Gate the arti hsc subcommand behind a new "hsc" feature.Gabriela Moldovan2024-09-191-7/+3
| | | | This new feature is experimental.
* arti: Add an enum for the hss subcommand.Gabriela Moldovan2024-09-171-27/+8
| | | | | | | This is needed because we'll soon add an `hss get-key` subcommand for getting and/or generating a service identity key alongside `hss onion-name` (`hss onion-name` will become a convenience around `hss get-key --key-type=onion-name`).
* arti: Remove a completed TODO.Gabriela Moldovan2024-09-171-1/+0
| | | | The tests were added in !2275
* arti: Move proxy subcommand to a separate module.Gabriela Moldovan2024-09-121-34/+5
| | | | | | | | No functional changes, this is just code motion. This helps organize the code in `arti/src/lib.rs` a bit. It now only contains the argument parsing and various other setup, and all the subcommands are contained in separate modules.
* arti: Move arti::run to subcommands::proxy.Gabriela Moldovan2024-09-121-154/+4
| | | | No functional changes, this is just code motion.
* rpc: Try using postage::watch to initialize ProxyInfo.Nick Mathewson2024-08-281-3/+3
| | | | | (This is a bit trickier than I would like, but it ensures that we never return a "not initialized yet" code.)
* RPC: Add experimental method to list SOCKS proxies.Nick Mathewson2024-08-281-10/+6
| | | | | | | We'll need this for our rpc-library code to meaningfully open SOCKS connections. Closes #1523.
* arti: Define a new ArtiRpcSession type.Nick Mathewson2024-08-281-0/+3
| | | | | | | This type exists in the `arti` crate. It wraps and delegates to `arti_rpcserver::RpcSession`. Subsequent commits will use it to expose information from the `arti` crate to the RPC system; right now it does nothing.
* arti: Avoid using the now-deprecated arti_client constant.Gabriela Moldovan2024-08-051-2/+2
| | | | We can just used `build_for_arti()` here.
* arti: Use Path::try_exists() instead of Path::exists().Gabriela Moldovan2024-07-301-1/+1
|
* arti: Gate the hsc subcommand behind the keymgr feature (fmt).Gabriela Moldovan2024-07-101-1/+5
|
* arti: Gate the hsc subcommand behind the keymgr feature.Gabriela Moldovan2024-07-101-3/+3
| | | | | | | | | | | The `arti hsc` subcommand can't run without keymgr support. Previously, it relied on `tor-keymgr/keymgr` being enabled indirectly by its dependencies, via the `experimental` feature. We need to be able to enable this feature in `arti` without relying on `experimental` (because `arti hsc` will eventually be made non-experimental). Part of #1487
* arti: Add an arti hsc subcommand.Gabriela Moldovan2024-06-271-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds an experimental `arti hsc` subcommand for managing client state and keys. Currently, it only supports the `prepare-service-discovery-keys` operation described in #1281 and `doc/dev/notes/client-auth.md`. A note on terminology: I am referring to services that encrypt the second layer of their descriptor as running in "restricted discovery" mode (because they can only be discovered, i.e. have their IPT points found out, by a set of authorized clients). The corresponding client "auth" keys, being the keys that enable the client to find out the list of intro points, pow-params etc. of the service, are referred to as service "discovery keys". Alternative names I considered: * extra descriptor encryption: accurate, but overly technical. IMO, the CLI should be accessible to users who aren't familiar with the nitty-gritty of the protocol * shielded mode: good, but slightly misleading. Calling it "shielded mode" makes it sound like a universally desirable "extra protection" that should almost always be enabled (which is not the case). Seeing `shielded_mode = off` in the config might be worry operators that don't fully understand what "extra descriptor encryption" or "shielded mode" means * restricted mode: slightly inaccurate. It implies this mechanism is a good substitute for conventional service-side authentication, which it isn't (because client authorization isn't instantaneous) Closes #1281
* arti: wait a short while on startup if lockfiles are unavailable.Nick Mathewson2024-06-241-1/+1
|
* arti: Add a TODO about a possible refactoring.Gabriela Moldovan2024-06-171-0/+2
| | | | | I propose we move each subcommand implementation to a `subcommand` submodule.
* arti: Move arti hss subcommand implementation to separate module.Gabriela Moldovan2024-06-171-38/+3
| | | | This addresses a TODO.
* relay: Add relay cargo feature flag and subcommandDavid Goulet2024-06-111-39/+63
| | | | | | | | | | Add the optional non default feature flag "relay" that will be used to enable relay support of arti. This commit also adds the "relay" subcommand to arti binary conditionnal on the feature flag in order to have a place holder starting point. Signed-off-by: David Goulet <[email protected]>
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Upgrade to futures-rustls 0.26.0, rustls 0.23.5.Nick Mathewson2024-04-221-0/+7
| | | | | | | | | The rustls upgrade will solve #1377 and CVE-2024-32650. Note that we've had to patch our RustlsProvider impl a bit in order to keep the tests passing. See comments. Closes #1377.