summaryrefslogtreecommitdiff
path: root/crates/arti/src/subcommands
Commit message (Collapse)AuthorAgeFilesLines
* client: Factor out the "running a client" code into an inner typestateNick Mathewson2026-05-261-1/+1
| | | | | | 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.
* Merge branch 'socket-buf-size' into 'main'opara2026-05-211-3/+18
|\ | | | | | | | | | | | | Set socket buffer sizes (`SO_SNDBUF` and `SO_RCVBUF`) for proxy sockets Closes #2500 See merge request tpo/core/arti!3957
| * arti: add 'proxy.socket_{send,recv}_buf_size' config optionsSteven Engler2026-05-071-3/+18
| |
* | keymgr: Remove RawKeystoreEntryGabriela Moldovan2026-05-181-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | I think this adds unnecessary indirection, and it's a bit confusing to have two separate keystore entry types (we have `KeystoreEntry` too). This type exists just to server as a wrapper over the `RawEntryId` of an unrecognized keystore entry, and the `KeystoreId` of the keystore it was found in. This commit folds `RawKeystoreEntry` into `UnrecognizedEntry`, which was previously a thin wrapper over `RawKeystoreEntry`.
* | Make TorClient no longer implement Clone.Nick Mathewson2026-05-131-1/+1
| |
* | Make all TorClient constructors wrap the TorClient in an Arc.Nick Mathewson2026-05-132-2/+3
|/ | | | | | 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.
* Merge branch 'http-connect-wrapup' into 'main'Nick Mathewson2026-03-261-6/+5
|\ | | | | | | | | | | | | arti: Add option and documentation for http connect, then mark it stable. Closes #2409 See merge request tpo/core/arti!3811
| * arti: Add an option to disable http_connect.Nick Mathewson2026-03-251-6/+5
| | | | | | | | | | | | | | | | | | This option affects all socks listeners, because: - We don't have a convenient way to associate an option with each port. - The main purpose of having this option is as a switch in case we discover a major problem with this code.
* | arti: Mostly make clippy happy for wasm with --no-default-features.Nick Mathewson2026-03-251-0/+1
|/ | | | | (With no-default-features there is no runtime, and that still causes a compiler error.)
* arti: Extract responsibility for port listing.Nick Mathewson2026-02-191-8/+20
| | | | | Instead of doing this when we construct the listeners, we can do it in a separate method, to simplify the return type.
* arti: Refactor socks proxy launcher function.Nick Mathewson2026-02-191-3/+6
| | | | Part of #2301.
* arti: Refactor dns proxy launcher function.Nick Mathewson2026-02-191-3/+4
| | | | Part of #2301.
* arti: improve error message for invalid socks/dns portSteven Engler2026-02-021-10/+4
| | | | | | | | | | | Uses the standard clap error messages, for example: ```text $ cargo run -p arti -- proxy -p 123a error: invalid value '123a' for '-p <PORT>': invalid digit found in string For more information, try '--help'. ```
* arti: remove deprecated `proxy.dns_port` config optionSteven Engler2026-01-291-2/+2
|
* arti: remove deprecated `proxy.socks_port` config optionSteven Engler2026-01-291-3/+3
|
* arti: reword+reformat warning messageSteven Engler2026-01-291-1/+4
|
* arti: Do not panic when invalid ports are given as arguments to proxyNiel Duysters2026-01-301-2/+8
| | | | Use anyhow::Context to wrap error in useful message.
* keymgr: Make CTorPath more like the client/service specifiersGabriela Moldovan2026-01-061-3/+3
| | | | | | | | | | | | | This will make it easier to see the correspondence between CTorPaths and the HS client/service key specifiers. Initially, I was hoping this would make it easier to write a d-d macro that automatically derives a `CTorPath` variant (e.g. `HsClientDescEncKeypair`) from the KeySpecifier type name (`HsClientDescEncKeypairSpecifier`), but alas, I don't think d-d can "chop off" name suffixes ("Specifier", in this case). `from_ctor_path()`/`ctor_path()` implementations for converting `CTorPath`s to and from key specifiers.
* keymgr: Move Unrecognized errors out of KeyPathErrorGabriela Moldovan2026-01-062-3/+2
| | | | | | | | | | | | | | | | | | | | | Out of all the variants in `KeyPathError`, `Unrecognized` is the odd one out, because unlike the others, which are mainly just lower level parsing errors, `Unrecognized` is a higher level error constructed in `KeyMgr::describe()`. `KeyMgr::describe()` now returns an `Option`, because * the failure to describe a user provided `KeyPath` may or may not be an error * previously, `describe()` would only ever return `Ok` or `Err(KeyPathError::Unrecognized)`, which essentially a binary result. Also, `describe()` would never return any of the other `KeyPathError` kinds, which further suggests `Unrecognized` doesn't belong there The `Unrecognized` variant still exists, but is now part of `KeystoreCorruptionError`, (returned from `KeyMgr::validate_entry_integrity()`).
* arti: Remove no-longer needed helper functionGabriela Moldovan2026-01-061-23/+18
| | | | This folds `display_arti_entry()` into `display_entry()`.
* arti: Remove special handling for C Tor keys (fmt)Gabriela Moldovan2026-01-061-4/+1
|
* arti: Remove special handling for C Tor keysGabriela Moldovan2026-01-061-40/+2
| | | | | | | | | | This is no longer needed now that `KeyMgr::describe()` works on `CTorPath`s. Removing this special handling has the added bonus that the keymgr CLI output is now uniform for all keystores (before this change, `keys list` used a slightly different output format for displaying C Tor entries). The corresponding tests will be updated in a future commit.
* arti: Move "port_info_file" configuration into "storage"Nick Mathewson2025-12-161-1/+1
| | | | | | This was a little funny, since the other storage elements are declared in tor-client. Fortunately, our stacked configuration logic handles this fine.
* arti: Export the chosen ports in a ports_info.json file.Nick Mathewson2025-12-161-8/+26
| | | | | This allows applications to find out where arti is listening when arti has been configured to listen with the port "auto".
* arti: Change how proxy futures are returned.Nick Mathewson2025-12-161-15/+19
| | | | | | | | | | | | | | Previously, the proxy and dns modules only had "be a proxy" functions that ran forever. Now they have functions that bind to listeners and return a separate "be a proxy" future that runs forever. This lets us simplify some kludges in subcommands::proxy. More importantly, it will let us return the bound-to ports so that subcommands::proxy can write them to disk. This is a break in experimental-apis, which does not require a semver change.
* arti: tweak docs, add TODOs with respect to Listener.Nick Mathewson2025-12-161-0/+3
|
* Merge branch 'torclient-keymgr-accessor' into 'main'wesleyac2025-12-031-12/+10
|\ | | | | | | | | Add `KeyMgr` accessor to `TorClient` See merge request tpo/core/arti!3442
| * arti: keys: use `TorClient::keymgr` instead of `InertTorClient::keymgr` in ↵hjrgrn2025-11-051-12/+10
| | | | | | | | | | | | `run_check_integrity` This change simplifies the signature of `run_check_integrity`.
* | arti: Adjust a no-longer acccurate hss docGabriela Moldovan2025-12-011-1/+1
| |
* | arti: Add missing subcommand docsGabriela Moldovan2025-12-014-0/+6
| |
* | Add `hsc key ctor-migrate` subcommandhjrgrn2025-11-241-0/+119
|/
* arti: Revise strings that implied that we were a SOCKS-only proxy.Nick Mathewson2025-10-281-4/+10
| | | | Closes #2225
* arti: Renaming around socks/generic proxiesNick Mathewson2025-10-281-1/+1
| | | | This is _all_ renaming and comment adjustments.
* Rename "arti::socks" to "arti::proxy".Nick Mathewson2025-10-281-2/+2
| | | | I'm about to add another proxy type.
* arti: keys: Simplify `run_check_integrity`hjrgrn2025-10-081-9/+7
|
* arti: keys: Improve readability of `print_check_integrity_incipit`hjrgrn2025-10-081-11/+7
|
* arti: keys: Fix typo in `run_check_integrity`hjrgrn2025-10-081-1/+1
|
* arti: keys: Rename `invalid_entry` to `expired_entry` in `run_check_integrity`hjrgrn2025-10-081-3/+3
|
* arti: keys: Add warning for unexpected invalid keystore entryhjrgrn2025-10-081-14/+16
|
* arti: keys: Improve readability of `run_check_integrity`hjrgrn2025-10-081-5/+4
|
* arti: keys: Add comment explaining why `services` cannot be droppedhjrgrn2025-10-081-0/+2
|
* arti: keys: Add comment explaining difference between `affected_keystores` ↵hjrgrn2025-10-081-0/+5
| | | | and `keystores`
* arti: keys: Refactor `get_expired_keys`hjrgrn2025-10-081-9/+6
| | | | The function now returns `Result<Vec<InvalidKeystoreEntry<'a>>>`
* arti: keys: Add integrity check for empty expired_entrieshjrgrn2025-10-081-0/+14
| | | | | | | Add a check in `run_check_integrity` to verify that the `expired_entries` collection is empty after processing all registered keystores. This should always be true, as all expired entries are expected to be removed during iteration. If not, it indicates a bug.
* arti: keys: Introduce InvalidKeystoreEntry and InvalidKeystoreEntries structshjrgrn2025-10-081-33/+74
| | | | | Replace raw tuples with named structs to reduce type complexity and improve code clarity and maintainability.
* arti: keys: Remove `filter` in favor of `retain` in `run_check_integrity`hjrgrn2025-10-081-11/+9
|
* arti: keys: Add comment explaining expired entry handling in ↵hjrgrn2025-10-081-0/+2
| | | | `run_check_integrity`
* arti: keys: Improve `run_check_integrity` functionhjrgrn2025-10-081-11/+23
| | | | | | - Fix bug where expired keys from one keystore were incorrectly associated with all keystores - Remove unnecessary clone
* arti: keys: Adapt `maybe_remove_invalid_entries` to updated ↵hjrgrn2025-10-081-14/+19
| | | | `run_check_integrity`
* arti: keys: Refactor function `display_invalid_keystore_entries`hjrgrn2025-10-081-32/+40
| | | | | | - Add `display_invalid_keystore_entries` helper function `print_check_integrity_incipit` - Add `display_invalid_keystore_entries` comment