aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-hsservice: Make OpenReplayLog error transparent.Wesley Aptekar-Cassels2025-08-131-1/+1
| |
* | tor-hsservice: Fix clippy.Wesley Aptekar-Cassels2025-08-131-3/+2
| |
* | tor-hsservice: Add disable_pow_compilation option.Wesley Aptekar-Cassels2025-08-133-15/+41
| | | | | | | | | | | | I'm not 100% on this being here, it seems like it might want to be a option for all onion services, rather than per-service. However, this is good enough for now.
* | tor-hsservice: Warn when enable_pow is set on a non hs-pow-full build.Wesley Aptekar-Cassels2025-08-132-1/+11
| |
* | tor-hsservice: Remove unimplemented config option.Wesley Aptekar-Cassels2025-08-131-10/+0
| | | | | | | | | | This config option doesn't really apply to Prop 362 (which is what's implemented in Arti), as far as I can tell.
* | tor-hsservice: Remove outdated TODO.Wesley Aptekar-Cassels2025-08-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have thought about this and come to the conclusion (which is what I suspected when I wrote it) that the current behaviour is correct. The attack described is completely impractical (the space of nonces is very large), and checking whether a nonce is a replay is cheaper than verifying a PoW solve, so we want to do that first. Splitting this into something like the following: * Check replay log without updating * Check that solve is valid * Update replay log Would require adding a somewhat dangerous API to the ReplayLog, and requires doing more work per request for something that isn't even a practical attack, AFAICT.
* | tor-hsservice: Add note about not persisting per-PoW-period state.Wesley Aptekar-Cassels2025-08-131-1/+7
| |
* | tor-hsservice: Add metrics support to PoW code.Wesley Aptekar-Cassels2025-08-132-3/+59
| |
* | tor-hsservice: Restore PoW verifier state from disk.Wesley Aptekar-Cassels2025-08-131-2/+25
| | | | | | | | | | We restored the seeds, but doing so is counterproductive if we don't also recreate the verifiers needed to check solves for those seeds.
* | tor-hsservice: Add pow_rend_queue_depth config option.Wesley Aptekar-Cassels2025-08-132-35/+111
| |
* | tor-hsservice: Pass Rng into PoW code where possible.Wesley Aptekar-Cassels2025-08-132-10/+11
| |
* | tor-hsservice: Implement enable_pow option.Wesley Aptekar-Cassels2025-08-136-61/+139
| | | | | | | | | | | | This does not currently allow this option to be changed at runtime, although the code is structured so that allowing it to be changed at runtime won't be too hard. This is tracked by #2082.
* | tor-hsservice: Reenable publisher test in hs-pow-full.Wesley Aptekar-Cassels2025-08-132-12/+3
| | | | | | | | MockExecutor now supports the features needed for this test to work.
* | tor-hsservice: Add PowManager to OnionServiceStatus.Wesley Aptekar-Cassels2025-08-137-35/+130
| |
* | tor-hsservice: Change ReplayLog error type.Wesley Aptekar-Cassels2025-08-135-17/+21
|/ | | | | | | | This disentangles the ReplyLog from the IptManager. This will allow us to make the InternalPowError type more public (in order to use it in the OnionServiceStatus code) without also having to make the CreateIptError type more public.
* Fix warnings and errors from edition 2024.Nick Mathewson2025-08-071-3/+2
| | | | | | | | | | The two main causes of errors were: - Since some of the lifetime rules have changed, we no longer need to do as many "bind a variable and immediately return it" patterns, and so clippy now warns about them. - We needed to adjust the explicit captures (`use<...>`) in a couple of our RPIT instances.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-0720-76/+86
| | | | | | | | | | | | | | 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.
* Update code for Edition 2024Nick Mathewson2025-08-073-3/+3
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* Merge branch 'msrv-fixes' into 'main'Nick Mathewson2025-08-051-0/+8
|\ | | | | | | | | Resolve a few issues that had been waiting for an MSRV update. See merge request tpo/core/arti!3129
| * hsservice: copy our TODO about eventually replacing once_cell.Nick Mathewson2025-08-051-0/+8
| |
* | Merge branch 'prop362-fixups' into 'main'wesleyac2025-08-054-77/+254
|\ \ | |/ |/| | | | | Fix a few TODOs for PoW See merge request tpo/core/arti!3106
| * tor-hsservice: cargo fmt.Wesley Aptekar-Cassels2025-08-051-1/+1
| |
| * tor-hsservice: Fix clippy lints.Wesley Aptekar-Cassels2025-08-051-2/+2
| |
| * tor-hsservice: Use saturating versions of time math functions.Wesley Aptekar-Cassels2025-08-051-1/+3
| |
| * tor-hsservice: Remove redundant check.Wesley Aptekar-Cassels2025-08-051-7/+1
| |
| * tor-hsservice: Don't panic on PoW main loop error.Wesley Aptekar-Cassels2025-08-051-5/+8
| |
| * tor-hsservice: Change detection of empty queue in tests.Wesley Aptekar-Cassels2025-08-051-3/+3
| |
| * tor-hsservice: Clean up use of MockRuntime functions.Wesley Aptekar-Cassels2025-08-051-10/+2
| |
| * tor-hsservice: Refactor PoW test helper functions.Wesley Aptekar-Cassels2025-08-051-57/+56
| |
| * tor-hsservice: Make PoW timeout logic smarter.Wesley Aptekar-Cassels2025-08-051-5/+11
| |
| * tor-hsservice: Make several PoW loop functions return Result.Wesley Aptekar-Cassels2025-08-051-6/+12
| | | | | | | | | | These now `warn!` and cleanly exit their respective threads on error, instead of panicking.
| * tor-hsservice: Add explanation of REND_REQUEST_QUEUE_MAX_DEPTH default.Wesley Aptekar-Cassels2025-08-051-0/+6
| |
| * tor-hsservice: Clean up try_from syntax.Wesley Aptekar-Cassels2025-08-051-4/+6
| |
| * tor-cell: Add ProofOfWorkV1::cap_effort function.Wesley Aptekar-Cassels2025-08-051-6/+1
| |
| * tor-hsservice: Make main_loop_task return Result.Wesley Aptekar-Cassels2025-08-051-5/+11
| | | | | | | | | | | | This just pushes around where the panic is for now, but enables better handling of this error, and it makes it clearer that this panic will only stop this thread.
| * tor-hsservice: Time out RendRequests in PoW queue.Wesley Aptekar-Cassels2025-08-051-13/+94
| |
| * tor-hsservice: Increase rend request queue depth.Wesley Aptekar-Cassels2025-08-051-2/+3
| | | | | | | | | | | | | | | | The "a few KB" measurement was done by using the get_size crate to measure the size of the RendRequest object, but due to limitations in that crate (and in my willingness to go implement ways of checking the size of external types), it might be somewhat off. The ~32MB value is based on the idea that each RendRequest is 4KB.
| * tor-hsservice: Persist suggested_effort.Wesley Aptekar-Cassels2025-08-051-6/+14
| |
| * tor-hsservice: Add consensus params for Prop 362.Wesley Aptekar-Cassels2025-08-054-26/+102
| | | | | | | | | | | | | | | | | | | | | | This adds the three new parameters specified in Prop 362 [0]. Two of these replace hardcoded defaults in the code. The third, HiddenServiceProofOfWorkV1ServiceIntroTimeoutSeconds, is not implemented yet, but will be in a future commit. [0]: https://spec.torproject.org/proposals/362-update-pow-control-loop.html
* | Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
|/
* hsservice: Do not send the REND1 to the virtual hop.Gabriela Moldovan2025-08-051-2/+5
| | | | | The service is supposed to send the RENDEZVOUS1 to the rendezvous point itself, not the virtual hop.
* hsservice, hsclient: Enable tor-circmgr/send-control-msg too.Gabriela Moldovan2025-08-051-1/+1
|
* tunnel: Implement start_conversation() for all tunnel typesDavid Goulet2025-08-052-2/+2
| | | | | | | | | | The BaseTunnel now has a start_conversation() which takes a TargetHop meaning it can be used with a multi path tunnel. The Conversation object has been moved into the tunnel namespace out of the circuit one. Signed-off-by: David Goulet <[email protected]>
* hs: Use the new Tunnel interface for onion serviceDavid Goulet2025-08-056-78/+69
|
* Bump version of tor-basic-utilsIan Jackson2025-08-051-1/+1
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Bump derive-deftly to 1.2.0Ian Jackson2025-08-041-1/+1
| | | | No upstream changes that break our code.
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-312-3/+3
| | | | Closes #2012.
* tor-hsservice: Fix doccomment link.Wesley Aptekar-Cassels2025-07-231-1/+1
|
* tor-hsservice: Add monotonic request id to RendRequestOrdByEffort.Wesley Aptekar-Cassels2025-07-231-4/+23
| | | | | This ensures that even in situations where multiple requests are received at the exact same time, we will not drop any requests.