summaryrefslogtreecommitdiff
path: root/crates/arti/src/subcommands
Commit message (Collapse)AuthorAgeFilesLines
* arti: keys: Fix `display_keystore_entries` outputhjrgrn2025-08-091-0/+1
|
* Merge branch 'update_to_edition_2024_v2' into 'main'Nick Mathewson2025-08-073-11/+13
|\ | | | | | | | | | | | | Update code for Edition 2024 (second attempt) Closes #2101 See merge request tpo/core/arti!3137
| * Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-073-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: keys: Improve CLI output by distinguishing KeyPath variantshjrgrn2025-08-061-17/+64
|/ | | | | * Update `display_entry` function to handle different `KeyPath` variants * Add functions `display_arti_entry` and `display_ctor_entry`
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-312-3/+11
| | | | Closes #2012.
* arti: hss: Add `arti hss ctor-migrate`hjrgrn2025-07-312-43/+191
|
* arti: raw: Rename `arti keys-raw remove-by-path`hjrgrn2025-07-151-12/+12
| | | | | * arti: raw: `remove-by-path` is now `remove-by-id` * arti: raw: Adjust integration tests
* arti: keys: Add arti keys-rawhjrgrn2025-07-142-37/+96
| | | | | | | | | | | | | | | | | | | * 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>>>`
* arti: keys: Fix arti keys help messagehjrgrn2025-06-231-2/+2
|
* arti: Add keys list and keys list-keystoreshjrgrn2025-06-121-0/+180
|
* Remove hsc quiet and force flags in favor of batchhjrgrn2025-04-141-33/+31
|
* arti: Optionally set up a Prometheus metrics exporterIan Jackson2025-04-081-0/+27
| | | | | | | | | | | | | New cargo feature `metrics`, currently experimental. New config option `metrics.prometheus.listen`. Uses standard `Listen` syntax, but not every configuration is supported due to upstream limitations. If the config option is set, use metrics-exporter-prometheus to offer an HTTP scrape endpoint. Or, if compiled out, fail. Currently there are no actual metrics exported at all.
* Merge branch '1630-scrub-address-from-output' into 'main'gabi-2502025-03-191-23/+28
|\ | | | | | | | | | | | | hsc: remove onion-address flag in favour of stdin Closes #1630 See merge request tpo/core/arti!2861
| * hsc: Improve get_onion_address functionhjrgrn2025-03-181-2/+3
| |
| * hsc: Add --quite CLI flaghjrgrn2025-03-171-10/+15
| | | | | | | | | | * Add `quite` to the common arguments * Substitute dialoguer in favor of `read_line` in `get_onion_address`
| * hsc: Improve get_onion_address functionhjrgrn2025-03-171-4/+3
| |
| * hsc: remove onion-address flag in favour of stdinhjrgrn2025-03-141-22/+22
| | | | | | | | | | * The user will be prompted interactively for the onion-address to prevent onion-address leaking in shell history
* | Merge branch 'hsc-lf' into 'main'gabi-2502025-03-181-1/+1
|\ \ | |/ |/| | | | | arti: hsc-key-get: Print LF after discovery key See merge request tpo/core/arti!2856
| * arti: hsc-key-get: Print LF after discovery keyplaybahn2025-03-131-1/+1
| | | | | | | | | | Did not print a newline after service discovery key. Looked bad. Prints newline now. Looks better.
* | hsc: remove TODO about display_service_discovery_key error handling.hjrgrn2025-03-141-1/+0
|/
* Deprecate --onion-name; introduce --onion-addressdisha2025-03-122-30/+42
|
* arti: Remove incorrect deprecation warning in hschjrgrn2025-03-101-1/+0
|
* tor-rtcompat: Remove ToplevelBlockon from RuntimeIan Jackson2025-03-041-3/+3
| | | | | | | | 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-19/+15
| | | | | | 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: Use connect points to listen for RPC connections.Nick Mathewson2024-12-191-34/+17
|
* 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-1/+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.
* arti: remove 'relay' subcommand and 'arti-relay' depSteven Engler2024-10-151-27/+0
|
* arti: move 'relay' subcommand to 'subcommands::relay' moduleSteven Engler2024-09-251-0/+27
|
* tor-keymgr: Rename the primary keystore for clarity.Gabriela Moldovan2024-09-231-1/+1
| | | | | | | | | | Previously, arti's primary keystore was referred to as its "default" keystore. However, "default" is inaccurate here: there is no way to meaningfully override this "default" (the "default" store acts as the main keystore). Throughout the codebase, we query all keystores for keys (including the secondary ones), but only ever write to the default/primary keystore. This is OK for now, because it enables us to have one mutable keystore, and multiple secondary, read-only stores.
* arti: Tolerate lowercase "no" in confirmation prompt.Gabriela Moldovan2024-09-191-3/+7
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2435#note_3080452
* arti: Fix typo in display_service_discovery_key function name.Gabriela Moldovan2024-09-191-3/+3
|
* arti: Add a subcommand for removing a client discovery key.Gabriela Moldovan2024-09-191-0/+35
| | | | Closes #1475
* arti: Add an hsc subcommand for rotating client keys.Gabriela Moldovan2024-09-191-0/+65
| | | | Part of #1475
* arti: Move public key output logic to a separate function.Gabriela Moldovan2024-09-191-4/+13
| | | | | This will be reused for `arti hsc key rotate`, which also outputs the public key.
* arti: Satisfy clippy.Gabriela Moldovan2024-09-181-4/+4
|
* arti: Add hsc key subcommand, deprecate hsc get-key.Gabriela Moldovan2024-09-181-3/+31
| | | | | | | | | | I am deprecating the old `hsc get-key` subcommand in favor of the new `hsc key get` subcommand. This is because I plan to implement the rest of the key management functionality (key deletion, rotation, etc.) as subcommands of the `hsc key` command. The alternative would be to add a new distinct top-level `hsc rotate-key`, `hsc remove-key`, etc. subcommand alongside the existing `hsc get-key` command (which IMO is less nice than the alternative I'm proposing).
* arti: Move the keygen-related args to a separate struct.Gabriela Moldovan2024-09-181-9/+17
| | | | These will be reused by a future `key rotate` subcommand.
* arti: Make sure we check the KeyType before running the command.Gabriela Moldovan2024-09-181-1/+5
| | | | | Otherwise, if/when we add support for other `KeyType`s we risk forgetting to update the rest of the implementation.
* arti: Move the shared arti hsc args to CommonArgs (fmt).Gabriela Moldovan2024-09-181-2/+4
|
* arti: Move the shared arti hsc args to CommonArgs.Gabriela Moldovan2024-09-181-16/+22
|
* arti: Move TorClient creation to the top-level (fmt).Gabriela Moldovan2024-09-181-4/+1
|
* arti: Move TorClient creation to the top-level.Gabriela Moldovan2024-09-181-8/+7
| | | | | The client will be used by future subcommands too, not just `prepare_service_discovery_key`.
* Merge branch 'svc-no-proxy-port' into 'main'David Goulet2024-09-171-14/+31
|\ | | | | | | | | | | | | arti: Allow running hidden services with SOCKS/DNS proxying disabled. Closes #1569 See merge request tpo/core/arti!2423
| * arti: Don't log that we are in SOCKS mode unless socks_listen is set.Gabriela Moldovan2024-09-171-6/+13
| | | | | | | | If `socks_listen` is disabled, we're not actually running in SOCKS mode.
| * arti: Allow running hidden services with SOCKS/DNS ports disabled.Gabriela Moldovan2024-09-171-8/+18
| | | | | | | | Closes #1569
* | arti: Remove get-key subcommand in favor of onion-name.Gabriela Moldovan2024-09-171-28/+7
| | | | | | | | | | | | | | | | The `hss get-key` subcommand is now folded into `onion-name`, which takes a `--generate` argument which specifies whether to generate the key if missing. Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2419#note_3078068
* | arti: Add CLI for generating an onion service hsid.Gabriela Moldovan2024-09-171-2/+83
| | | | | | | | | | | | | | | | | | | | | | This adds a new `hss get-key` subcommand for retrieving and generating service identity keys. The existing `hss onion-name` is now a convenience alias for `hss get-key --generate=no --key-type=onion-name`. Note: I am calling this new subcommand `get-key` for consistency with its client counterpart (`hsc get-key`). Closes #1621
* | arti: Add an enum for the hss subcommand.Gabriela Moldovan2024-09-171-12/+39
| | | | | | | | | | | | | | 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: Refactor hss::onion_name() implementation.Gabriela Moldovan2024-09-171-11/+29
| | | | | | | | | | This splits `onion_name` into multiple functions (which will be repurposed for the future `hss get-key` implementation).