summaryrefslogtreecommitdiff
path: root/crates/arti/src
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
| * arti: Add a todo to describe how and why to test build_list.Nick Mathewson2023-12-131-0/+7
| |
| * arti: Use BTreeMap for maps of onion service configs.Nick Mathewson2023-12-131-9/+9
| |
| * arti: Simplify build_list slightlyNick Mathewson2023-12-131-4/+3
| |
| * 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: Test for expected value of onion service cfg.Nick Mathewson2023-12-121-2/+34
| |
| * arti: resolve a TODO in onion_proxy launch_new.Nick Mathewson2023-12-121-7/+2
| |
| * arti: rethink a TODO HSS about nicknamesNick Mathewson2023-12-121-1/+9
| | | | | | | | | | | | The TODO HSS in question is about our inability to serialize every possible builder. The right answer here might be to use something else instead of a ListBuilder.
| * arti: Enforce onion service nickname distinctnessNick Mathewson2023-12-122-18/+39
| | | | | | | | | | | | | | | | | | | | | | The most logical way to do this was to change the "List" type to a HashMap, and add a build function to the ListBuilder. This change additionally renames: OnionServiceProxyConfig{List=>Map} NamedProxyMap => ProxyBuilderMap (We now have two kinds of map, and this name change will clarify the distinction.)
| * arti: Downgrade a TODO HSS about testing onion-service config.Nick Mathewson2023-12-121-1/+2
| | | | | | | | | | | | | | IIUC, there will never be a Some(InNew) entry here, since we will never have an onion service be configured by default. Instead we test this kind of configuration by having commented-out options that we uncomment as needed.
| * arti: Generalize a TODO HSS about reconfiguration.Nick Mathewson2023-12-122-1/+10
| | | | | | | | | | | | It's correct that we'd like someday for the `arti` crate APIs to allow all the different modes supported by `Reconfigure` enum; this is #1156, and it does not block an HSS release.
| * 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-122-2/+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
* | arti: Use warn_report on anyhow::Error in onion_proxyNick Mathewson2023-12-121-4/+1
|/ | | | This was made possible by !1818.
* Merge branch 'todo_hsrproxy' into 'main'Nick Mathewson2023-12-111-1/+4
|\ | | | | | | | | Resolve several TODO HSS items in hsrproxy See merge request tpo/core/arti!1809
| * hsrproxy: Take nickname as an argument and pass it to forwarding functionNick Mathewson2023-12-071-1/+4
| | | | | | | | We'll use this for logging.
* | Add a TODO HSS comment about Reconfigure.Ian Jackson2023-12-111-0/+1
| |
* | Reconfigure onion services when their configuration changes.Nick Mathewson2023-12-052-28/+20
| | | | | | | | Closes #1089.
* | arti: Make reconfiguration slightly more abstractNick Mathewson2023-12-052-24/+94
| | | | | | | | | | | | | | | | | | | | 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.
* | arti: Backend support for reconfiguring onion proxies.Nick Mathewson2023-12-051-6/+101
|/
* Merge branch 'msrv-followup' into 'main'Nick Mathewson2023-12-041-16/+4
|\ | | | | | | | | Followups from MSRV 1.70 upgrade See merge request tpo/core/arti!1785
| * arti: rewrite ilog10_roundup using checked_ilog10.Nick Mathewson2023-11-301-16/+4
| |
* | Merge branch 'dirs' into 'main'gabi-2502023-12-041-2/+0
|\ \ | | | | | | | | | | | | Cleanup and clarification re cache_dir and state_dir (rename in tor_dirmgr) See merge request tpo/core/arti!1789
| * | arti-example-config: Do not claim that state_dir is unusedIan Jackson2023-12-041-2/+0
| | | | | | | | | | | | tor-ptmgr uses it, and the key manager too.
* | | arti cfg: suppress a warningIan Jackson2023-12-041-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | There is a TODO HSS for this. Fixes cargo check --workspace --all-targets producing warning: unused variable: `result` --> crates/arti/src/cfg.rs:1060:13 | 1060 | let result = file.resolve::<(TorClientConfig, ArtiConfig)>(); | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_result` | = note: `#[warn(unused_variables)]` on by default
* / Move from `trust-dns` to `hickory`Andrew2023-11-301-6/+6
|/ | | | | | This is not a change of ownership but just rebranding. Signed-off-by: Andrew <[email protected]>
* Revert "hsrproxy: Temporarily change the format of ProxyRule."Nick Mathewson2023-11-292-9/+6
| | | | | | | | | | | This reverts commit 21605d2c9e601c3a5099bfd8d8c887cbb3b36c0a. We're doing this because we wanted the configuration of proxy rules to be a 2-tuple, as in `[ "22", "127.0.0.1:22" ]`. But `config` couldn't handle that before, so we temporarily changed it to a string, as in "22 => 127.0.0.1:22". Closes #1058.
* Bump to clap 4 and resolve compiler errors.Nick Mathewson2023-11-151-2/+2
|
* handle_socks_conn: update parameter name in doc commentJim Newsome2023-10-251-1/+1
|
* 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.