summaryrefslogtreecommitdiff
path: root/crates/arti/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* arti, CI: Add a test case for command line helpIan Jackson2024-03-051-0/+3
|
* arti: Print help on `arti hss` without subcommandIan Jackson2024-03-051-0/+1
| | | | That's not the default.
* arti: Fix misplaced clap hunkIan Jackson2024-03-051-4/+4
| | | | | | | | | ab950a68 "arti: Add an hss subcommand." mistakenly moved the calls to `subcommand_required` and `arg_required_else_help` into the compile-time conditional. But they're related to the main command parsing. Fixes #1311
* Merge branch 'deny-unchecked-duration-substraction' into 'main'Ian Jackson2024-03-051-0/+1
|\ | | | | | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
| |
* | arti config watch: Pass Runtime as first argumentIan Jackson2024-03-041-1/+1
| | | | | | | | That seems often how we do things elsewhere.
* | arti config watch: Pass a Runtime, not a TorClient (fmt)Ian Jackson2024-03-041-1/+6
| |
* | arti config watch: Pass a Runtime, not a TorClientIan Jackson2024-03-041-1/+1
|/ | | | | | | | | | | | I found this confusing in !2009, where the variable is unused on Windows: I wondered if this meant our config-reloading only worked on Unix, since "obviously it would need the TorClient". But actually the TorClient was only used *in this argument* for its runtime. The actual reconfiguration of the TorClient is doen by it being in one of the ReconfigurableModule's. Change the type of the argument for clarity.
* Refactor and improve error hinting.Nick Mathewson2024-02-141-4/+4
| | | | | | | | | | | | 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: Use Weak references for the reconfigurable modules (fmt).Gabriela Moldovan2024-01-251-6/+1
|
* arti: Use Weak references for the reconfigurable modules.Gabriela Moldovan2024-01-251-1/+10
| | | | | | | | | | | | | | | Previously, the `ProxySet` (and all the other `reconfigurable_modules`) were kept alive by the `watch_for_config_changes` background thread, which was preventing them from being dropped when `run()` exited. IOW, onion services never received the shutdown signal. Now `watch_for_config_changes` takes `Weak` references, and the only strong references to the modules are kept in the `reconfigurable_modules` local variable in `run()`, which is dropped when `run()` exits (e.g. on SIGINT). This allows onion services to execute their shutdown logic on CTRL-C. Part of #1244
* tor-hsservice: Add TODO about testing arti hss.Gabriela Moldovan2024-01-181-0/+1
|
* arti: Use OnionService to get the onion_name().Gabriela Moldovan2024-01-181-7/+19
|
* Give an error when user configured onion services with no support.Nick Mathewson2024-01-161-0/+2
| | | | | | | | | | | We do this by adding a stub config and config builder type, whose only purpose is to generate an error if anything is deserialized into it. (If this turns out not to be the best pattern, we can change it later, since this is all internal to the `arti` crate.) Closes #1184.
* tor-keymgr: Abolish ArtiNativeKeystoreConfig::expand_keystore_dir.Gabriela Moldovan2024-01-101-2/+2
| | | | | | This resolves a `TODO HSS` in arti-client. Part of #1187
* arti::lib: Downgrade "TODO HSS" commentsNick Mathewson2024-01-091-2/+2
| | | | These are not "must fix before releasing onion services".
* arti: Fix log message typo.Gabriela Moldovan2023-12-141-1/+1
|
* Merge branch 'return-of-the-son-of-arti-todos' into 'main'Nick Mathewson2023-12-141-26/+36
|\ | | | | | | | | Resolve Arti crate todos, redux See merge request tpo/core/arti!1833
| * arti: Use a macro to declare modules as conditionally public.Nick Mathewson2023-12-131-25/+36
| | | | | | | | | | (We can't use `visibility::make(pub)` or `visible` here. Try it yourself if you don't believe me!)
| * arti: conditionally expose onion_proxy module when experimental-api is enabledNick Mathewson2023-12-121-4/+4
| |
| * Remove TODOs obsoleted by onion service reconfiguration.Nick Mathewson2023-12-121-1/+0
| | | | | | | | (This was solved with !1798)
* | arti: Print out the onion address retrieved from StateMgr.Gabriela Moldovan2023-12-141-1/+15
| |
* | arti: Add an hss subcommand.Gabriela Moldovan2023-12-141-2/+46
|/ | | | Part of #1071
* Reconfigure onion services when their configuration changes.Nick Mathewson2023-12-051-19/+4
| | | | Closes #1089.
* arti: Make reconfiguration slightly more abstractNick Mathewson2023-12-051-1/+13
| | | | | | | | | | Now instead of having a hardwired list of of things to reconfigure, the watch_cfg module now has a vector of ReconfigurableModule. As noted in the documentation, I don't intend that this should be our final API here: It is deliberately not exposed. When we revisit the structure of `arti` more, we should probably do this differently.
* Bump to clap 4 and resolve compiler errors.Nick Mathewson2023-11-151-2/+2
|
* HSS: Do not drop ProxySet immediately - let HS services continue to run (fmt)Ian Jackson2023-10-191-2/+4
|
* HSS: Do not drop ProxySet immediately - let HS services continue to runIan Jackson2023-10-191-4/+19
| | | | Dropping the ProxySet causes all the services to terminate.
* Merge branch 'generic-listen' into 'main'Nick Mathewson2023-10-161-27/+23
|\ | | | | | | | | arti, tor-config: Allow listening on generic addresses for SOCKS and DNS. See merge request tpo/core/arti!1613
| * Do not writelns in Display, undo localhost_port_legacy changes.Jani Monoses2023-09-251-1/+1
| |
| * arti, tor-config: Allow listening on generic addresses for SOCKS and DNS.Jani Monoses2023-09-221-27/+23
| |
* | arti: Actually launch the onion service code.Nick Mathewson2023-10-051-0/+9
| |
* | arti: add a set of OnionServiceProxyConfig types.Nick Mathewson2023-10-031-0/+4
|/ | | | | These don't yet attach to the rest of the ArtiConfig, or actually launch any onion services, but they're a start.
* arti: Use ConfigurationSources::try_from_cmdlineIan Jackson2023-08-071-3/+3
| | | | | | | | | | This will allow us to proceed if * the default config file locations can't be established (eg due to failure of the `directories` crate), but * configuration files are explicitly specified, so the defaults wouldn't be used
* arti: Add context to default config files error messageIan Jackson2023-08-071-1/+1
| | | | | | | | | | | | Improves the error mesage in #989 somewhat. Before: target/debug/arti: error: Can't construct project directories to resolve a path element After: target/debug/arti: error: identify default config file locations: Can't construct project directories to resolve a path element
* 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.
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* RPC: tell the `arti` SOCKS code about an RpcMgr object.Nick Mathewson2023-06-051-13/+23
| | | | | It will use this to find which TorClient to use when opening a stream.
* print both static sqlite/tls when 'static' feature is usedtrinity-1686a2023-05-081-2/+2
|
* RPC: Start on plumbing TorClient into our RPC codeNick Mathewson2023-05-041-2/+7
| | | | | Because of #837, we won't be able to work with _every_ TorClient<R>, so I'm only going to be using TorClient<PreferredRuntime> for now.
* RPC: Move the "listen" part of the RPC listener code to `arti`.Nick Mathewson2023-05-041-21/+30
| | | | | | | | | Now there's a module in `arti` that runs the loop for an RPC listener. The part of the old `listener` module that made the framed connections is now part of the `Session` object. There is now yet another a temporary location for the pipe; we should pick something better. At least now it's configurable.
* rpc: Make an RpcMgr type to own the DispatchTable.Nick Mathewson2023-05-041-1/+3
| | | | | | | | | In the future, this will probably hold more data as well, like a TorClient and some configuration info. The TorClient will present an issue; I've made comments about that. Closes #820