summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | 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
* | | | Merge branch 'doc-link-fix' into 'main'Nick Mathewson2024-01-251-1/+1
|\ \ \ \ | |/ / / |/| | | | | | | | | | | tor-hsservice: Fix a broken doc link. See merge request tpo/core/arti!1918
| * | | tor-hsservice: Fix a broken doc link.Gabriela Moldovan2024-01-251-1/+1
|/ / /
* | | Merge branch 'publisher_consts' into 'main'gabi-2502024-01-252-34/+66
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve comments about publisher constants Closes #1121 See merge request tpo/core/arti!1911
| * | | Typo fixes.gabi-2502024-01-241-2/+2
| | | |
| * | | hss: Use estimator to determine a timeout for an hsdir uploadNick Mathewson2024-01-242-5/+29
| | | | | | | | | | | | | | | | This should give us better behavior if the network is slow.
| * | | hss: Revise timeout code for upload attemptsNick Mathewson2024-01-241-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have clearer-named constants for overall and individual timeouts, and we use them in the right places. Closes #1121.
| * | | hss: Downgrade comments on some publisher constants.Nick Mathewson2024-01-241-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These may need tuning eventually, but there's no reason to think that we have a better guess now. (They don't correspond to anything that C tor does, so we don't have that to guide us.) Part of #1121; see there for some more discussion.
* | | | Merge branch 'state' into 'main'Ian Jackson2024-01-249-64/+163
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move state_dir to tor_persist and start to implement it Closes #1205 See merge request tpo/core/arti!1913
| * | | | tor-persist: state_dir: Demote anyhow to dev depIan Jackson2024-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | It's not a runtime dep, in fact.
| * | | | tor-persist: load_store: More documentationIan Jackson2024-01-241-3/+29
| | | | |
| * | | | Fix doc comments.Nick Mathewson2024-01-242-2/+2
| | | | |
| * | | | tor-persist: state_dir: Implement the StorageHandle methodsIan Jackson2024-01-241-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | You can't call these yet and there aren't any tests. But this demonstrates use of the previous refactoring.
| * | | | tor-persist: state_dir: (intend to) use tor_persist::ErrorIan Jackson2024-01-241-16/+4
| | | | |
| * | | | tor-persist: have load_store module provide deletionIan Jackson2024-01-242-0/+10
| | | | |
| * | | | tor-persist: Provide load_store module for use by state_dirIan Jackson2024-01-243-22/+58
| | | | |
| * | | | tor-persist: Use correct pathnames in errorsIan Jackson2024-01-241-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, we would say the problem happened while accessing Resource::File { container: "STATE_DIR", file: "KEY.json", } which would imply that we failed to access "STATE_DIR/KEY.json". But that's not true: we *actually* access "STATE_DIR/state/KEY.json".
| * | | | state-dir: Use a real lock guardIan Jackson2024-01-243-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Bring in the fslock-guard crate and replace the Void in the structs. (Separated out since this contains Cargo.lock churn.)
| * | | | state-dir: Move from tor-hsservice to tor-persistIan Jackson2024-01-246-12/+15
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And, instead of being a hidden module, it's a public experimental one. I have feature-gated all the new dependencies since we probably want to feature-gate this module in perpetuity, since some builds of Arti won't need it. Closes #1205
* | | | Merge branch 'ahf/s101-2023-q4' into 'main'Nick Mathewson2024-01-241-0/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Update sponsor 101 numbers. See merge request tpo/core/arti!1905
| * | | | Update sponsor 101 numbers.Alexander Færøy2024-01-231-0/+26
| | | | |
* | | | | Merge branch 'onion-svc-status' into 'main'gabi-2502024-01-248-97/+258
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-hsservice: Make the publisher update the `OnionServiceStatus` See merge request tpo/core/arti!1902
| * | | | | tor-hsservice: Explain why the publisher never transitions to Recovering.Gabriela Moldovan2024-01-241-0/+48
| | | | | |
| * | | | | tor-hsservice: Update the IptManager status.Gabriela Moldovan2024-01-241-2/+7
| | | | | |
| * | | | | tor-hsservice: Remove Publisher::status().Gabriela Moldovan2024-01-241-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The publisher status is obtained via `StatusSender` (rather than by polling `Publisher::status()`). Part of #1083
| * | | | | tor-hsservice: Remove some TODOs about setting the OnionService status.Gabriela Moldovan2024-01-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the status of the `OnionService` is derived from the statuses of its subcomponents. Their initial status will be `Shutdown`, so we don't need to explicitly initialize it. As for setting the status when `RunnionOnionService::launch` fails, I don't think that's necessary: `launch()` returns an error on failure, so the user will know about it (it doesn't need to watch the stream of status events to find out it failed). Part of #1083
| * | | | | tor-hsservice: Change TODO to reference #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This isn't something we need to do for #1083.
| * | | | | tor-hsservice: Map the publisher status to a State variant.Gabriela Moldovan2024-01-241-1/+8
| | | | | |
| * | | | | tor-hsservice: Update the publisher state on shutdown.Gabriela Moldovan2024-01-241-2/+10
| | | | | |
| * | | | | tor-hsservice: Implement {Publisher, IptMgr}StatusSender.Gabriela Moldovan2024-01-241-23/+54
| | | | | |
| * | | | | tor-hsservice: Implement OnionServiceStatus::current_problem.Gabriela Moldovan2024-01-241-1/+9
| | | | | |
| * | | | | tor-hsservice: Rename OnionServiceStatus fields.Gabriela Moldovan2024-01-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | The new names are shorter and just as descriptive.
| * | | | | tor-hsservice: Remove outdated TODO.Gabriela Moldovan2024-01-241-2/+0
| | | | | |
| * | | | | tor-hsservice: Add separate status structs for the svc subsystems.Gabriela Moldovan2024-01-241-7/+48
| | | | | |
| * | | | | tor-hsservice: Replace StartupError with Problem.Gabriela Moldovan2024-01-241-10/+16
| | | | | |
| * | | | | tor-hsservice: Make UploadError public.Gabriela Moldovan2024-01-244-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need it to be public, because we're about to expose it in the `OnionServiceStatus`.
| * | | | | tor-hsservice: Implement Into<RetryError<E>> for BackoffError.Gabriela Moldovan2024-01-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're about to report the inner error in the `OnionServiceStatus` (without making `BackoffError` public).
| * | | | | tor-hsservice: Remove unused BackoffError variants.Gabriela Moldovan2024-01-241-31/+1
| | | | | | | | | | | | | | | | | | | | | | | | They're not used anywhere, so let's remove them.
| * | | | | tor-hsservice: Reassign a TODO to #1194.Gabriela Moldovan2024-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The key expiration status is only relevant if the service is running in "offline mode", so these TODOs should be part of #1194.
| * | | | | tor-hsservice: Remove unused field.Gabriela Moldovan2024-01-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | This field is unused now that we have `ipt_mgr_state` and `publisher_state`.
| * | | | | tor-hsservice: Give the IptManager a StatusSender.Gabriela Moldovan2024-01-242-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Part of #1083
| * | | | | tor-hsservice: Give the publisher a StatusSender.Gabriela Moldovan2024-01-243-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | The publisher needs it to notify `OnionService` of status changes.
| * | | | | tor-hsservice: Add separate StatusSender types for the publisher and IPT mgr.Gabriela Moldovan2024-01-241-0/+10
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | For updating the underlying component statuses of an `OnionServiceStatus. Part of #1083
* | | | | Merge branch 'fix-wallclock-bug-again' into 'main'gabi-2502024-01-242-5/+42
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | tor-hsservice: Make offset_within_srv_period() work with timestamps from newer periods. See merge request tpo/core/arti!1914
| * | | | tor-netdir: Add a unit test for HsDirParams::offset_within_srv_period.Gabriela Moldovan2024-01-242-1/+38
| | | | |
| * | | | tor-hsservice: Make offset_within_srv_period() work with timestamps from ↵Gabriela Moldovan2024-01-241-4/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newer periods. This fixes a bug where `offset_within_srv_period()` returns `None`, instead of the offset of `when` from the start of the SRV of the previous time period: ``` 2024-01-24T15:24:46Z ERROR tor_hsservice::svc::publish::reactor: descriptor upload failed for HS service allium-cepa2 and time period TimePeriod { interval_num: 19745, length: IntegerMinutes { value: 1440 }, epoch_offset_in_sec: 43200 }: error: Programming error: internal error (bug) at /../arti/crates/tor-hsservice/src/svc/publish/reactor.rs:218:13: current wallclock time not within SRV range?! (now=SystemTime { tv_sec: 1706109886, tv_nsec: 246572852 }, SRV_start=SystemTime { tv_sec: 1705968000, tv_nsec: 0 }) ``` We need to be able to calculate this offset even if `now` is not within the SRV range (because we upload the descriptor to the HsDirs of the *previous* time period too). Note a similar bug exited in `offset_within_period()` (which no longer exists) too! That one was fixed in !1744: ``` Hidden services can have multiple "active" time periods for which they generate descriptors. We need to be able to compute the offset of a timestamp from the start of a given time period, even if that timestamp falls within the "next" time period (for example, when publishing descriptors for the "previous" time period, the `when` timestamp will fall outside the `(start, end)` range of the "previous" time period). ```
* | | | Merge branch 'hss_errorkinds' into 'main'Nick Mathewson2024-01-245-48/+57
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | hsservice: Fix some errorkinds and related error handling issues. Closes #1225 See merge request tpo/core/arti!1906
| * | | hss: Report errors from keep_intro_established.Nick Mathewson2024-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | Also, change `keep_intro_established`'s return type to indicate that it has no non-failing return cases.
| * | | hss: Refactor keep_intro_established to avoid needing NetDirNick Mathewson2024-01-241-22/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have the NetDir in establish_intro_once, so we might as well use it to get the intro-point details there. This confirms that we will not need IptError::NoNetdir, since we use wait_for_netdir in establish_intro_once.