summaryrefslogtreecommitdiff
path: root/crates/arti/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix note in config that claimed onion services weren't implementedNick Mathewson2024-03-271-1/+4
| | | | | Instead, link to documentation, and give the warning about their security.
* hss: Make the limit for streams configurable.Nick Mathewson2024-03-261-3/+1
| | | | Closes #1124.
* Add example unmanaged pluggable transport to config.Nick Mathewson2024-03-141-0/+10
|
* Merge branch 'encapsulate_config_rs' into 'main'Nick Mathewson2024-03-132-8/+19
|\ | | | | | | | | Encapsulate usage of config-rs inside tor-config. See merge request tpo/core/arti!2040
| * tor-config: Put config::Config inside a wrapper type.Nick Mathewson2024-03-131-1/+1
| | | | | | | | This will let us replace Config with something better.
| * Use ConfigurationSource::Verbatim in our tests.Nick Mathewson2024-03-131-7/+17
| |
| * tor-config: Allow ConfigurationSource to be verbatim text.Nick Mathewson2024-03-131-0/+1
| | | | | | | | | | This will let us test our configuration logic without having to use the `config` crate directly.
* | Run maint/add_warning.Nick Mathewson2024-03-132-0/+2
|/
* arti-client: Add VanguardsConfig to TorClientConfig.Gabriela Moldovan2024-03-111-0/+11
|
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* 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-052-0/+2
|\ | | | | | | | | | | | | deny clippy::unchecked_duration_subtraction Closes #1304 See merge request tpo/core/arti!2008
| * deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-292-0/+2
| |
* | arti config watch: Pass Runtime as first argumentIan Jackson2024-03-042-3/+3
| | | | | | | | 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-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'analyzer_windows_problems' into 'main'gabi-2502024-03-042-2/+5
|\ \ | | | | | | | | | | | | Fix rust-analyzer problems seen with default features on Windows See merge request tpo/core/arti!2009
| * | arti: do not warn about unused variable on WindowsTobias Stoeckmann2024-02-291-0/+1
| | | | | | | | | | | | | | | Do not complain on non-unix systems that variable client is not used. It is only accessed within the function on unix systems.
| * | arti: define RpcConfig only if neededTobias Stoeckmann2024-02-291-1/+1
| | | | | | | | | | | | The RpcConfig struct is only used if feature rpc is selected.
| * | arti: use name bindings only if neededTobias Stoeckmann2024-02-291-1/+3
| |/ | | | | | | | | The local name binding for tor_config::define_list_builder_accessors is only needed if feature onion-service-service is selected.
* / arti: Fix Windows testTobias Stoeckmann2024-03-011-4/+10
|/ | | | | Windows has a 100-nanosecond precision, so avoid test failure due to a known system limitation.
* arti: Don't output ANSI escape codes when logging to file.Gabriela Moldovan2024-02-221-0/+1
| | | | Closes #1298
* Merge branch 'keystore-dir' into 'main'gabi-2502024-02-211-2/+0
|\ | | | | | | | | | | | | arti, arti-client, tor-keymgr: Remove keystore dir configuration. Closes #1202 See merge request tpo/core/arti!1995
| * arti, arti-client, tor-keymgr: Remove keystore dir configuration.Gabriela Moldovan2024-02-211-2/+0
| | | | | | | | Closes #1202
* | tor-hsservice: config: max_concurrent_streams_per_circuit: comment outIan Jackson2024-02-211-0/+2
|/ | | | | This is not implemented. It is better to have it commented out than providing a knob that isn't connected to anything.
* Merge branch 'fast_and_stable' into 'main'Nick Mathewson2024-02-202-0/+8
|\ | | | | | | | | | | | | Require the Fast and Stable flags as appropriate. Closes #1100 See merge request tpo/core/arti!1976
| * Add a configuration option for long_lived_ports.Nick Mathewson2024-02-202-0/+8
| |
* | 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.
* educe: Use std's default for enums where default variant is unitIan Jackson2024-02-121-4/+2
| | | | | | | | | | | | | Since Rust 1.66, std's default works properly for enums, provided that the default variant is a unit. Review all uses of `#[educe(default)]` on enums and replace them with std where possible, which is most of them. In 1.66 and later, std's `#[derive(Default)]` doesn't infer any generic bounds on the derived impl, where it's an enum - since the unit variant can always be constructed. So this change doesn't add any generic bounds and is not API-visible.
* Clarify onion service example(s) a little more.Nick Mathewson2024-02-081-3/+5
|
* arti: Only exit if all the modules have been dropped.Gabriela Moldovan2024-01-251-7/+8
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1917#note_2988815
* 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-252-5/+22
| | | | | | | | | | | | | | | 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
|
* arti: Make OnionServiceProxyConfig pub(crate).Gabriela Moldovan2024-01-181-2/+2
| | | | | We are about to need the `svc_cfg` (for calling `TorClient::create_onion_service`).
* tor-hsservice: Create a separate RunningOnionService type.Gabriela Moldovan2024-01-181-2/+2
| | | | | | | | This will enable us to construct non-launched (but configured) `OnionService`s. We need this, for example, for implementing the `arti hss` CLI command. Part of #1227
* Merge branch 'err_on_no_onion_service_support' into 'main'Nick Mathewson2024-01-163-4/+51
|\ | | | | | | | | | | | | Give an error when user configured onion services with no support. Closes #1184 See merge request tpo/core/arti!1885
| * On error, suggest recompiling with onion-service-servicegabi-2502024-01-161-1/+1
| |
| * Give an error when user configured onion services with no support.Nick Mathewson2024-01-163-4/+51
| | | | | | | | | | | | | | | | | | | | | | 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.
* | hsrproxy: Temporarily remove ability to config unix addressesNick Mathewson2024-01-162-3/+2
|/ | | | | | | | I'm taking this out for now since we don't have support for actually making these addresses work, and the current behavior will just ignore connections silently. Closes #1245
* 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::cfg: Turn a TODO HSS into a ticket.Nick Mathewson2024-01-091-1/+1
|
* Fix typosDimitris Apostolou2024-01-081-1/+1
|
* 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-144-59/+140
|\ | | | | | | | | Resolve Arti crate todos, redux See merge request tpo/core/arti!1833
| * Trivial case fix in a comment.Ian Jackson2023-12-141-1/+1
| |