aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/internal_prelude.rs
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-2/+1
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* tor-hssrvice: port to web-time-compat.Nick Mathewson2026-03-261-1/+1
|
* Refactor common code that builds circtargets for HS.Nick Mathewson2025-12-041-3/+1
| | | | | | | | | This code was duplicated across hsclient and hsservice. Logically, it belongs in netdir, since that's where we have the latest required-protocol information, and the ability to look up relays by IDs. Closes #1223
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-1/+2
|
* hsservice: Move derive_more::From out of internal_prelude.Nick Mathewson2025-08-191-1/+1
| | | | | | | | | | | | | | This fixes an error from nightly. The trouble is that with nightly, there's a now a [derive macro for From][issue]. That doesn't cause a conflict when we `use derive_more::From`, but it _does_ cause a conflict when we import `derive_more::From` via `use internal_prelude::*`. So as a solution, we just import `derive_more::From` explicitly. Closes #2124 [issue]: https://github.com/rust-lang/rust/pull/144922
* Merge branch 'relay-reactor-placeholder' into 'main'David Goulet2025-08-181-2/+2
|\ | | | | | | | | proto: Add a placeholder for the relay reactor. See merge request tpo/core/arti!3162
| * proto: Move the `stream` module under `client` (breaking).Gabriela Moldovan2025-08-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The `stream` module is client-specific, for the most part, so I am moving it under `client`. Later on, we will factor out the parts that can be shared with the relay implementation. Note: this is a breaking change as the deleted `stream` module was `pub`. We could've kept the module and reexported from it the public types from `tor_proto::client::stream`, but I think it's better to have this `client` namespacing, because it makes the separation between the client and relay parts clearer.
* | tor-hsservice: Change ReplayLog error type.Wesley Aptekar-Cassels2025-08-131-1/+0
|/ | | | | | | | 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.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-22/+22
| | | | | | | | | | | | | | 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.
* tunnel: Implement start_conversation() for all tunnel typesDavid Goulet2025-08-051-1/+1
| | | | | | | | | | 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-051-2/+2
|
* Use new DisplayRedacted/DebugRedacted code for HsId.Nick Mathewson2025-07-311-1/+1
| | | | Closes #2012.
* tor-hsservice: Make ReplayLog generic.Wesley Aptekar-Cassels2025-02-101-1/+1
|
* proto: Remove ConversationInHandlerDavid Goulet2025-02-041-1/+1
| | | | | | | | | | | | | | | | | | | It is unused but most importantly it allows any RELAY cell to be sent from anywhere in the code which is really not desirable because it is skipping congestion control. It also allows us to remove the `control_tx` from the reactor which is one less channel to track/understand/think about. This opens up the door to all sorts of problems especially side channel that can be exploited if we are not careful. We can always bring this back if we need it but for now, it is unused and allows us to remove the `CtrlMsg::SendRelayCell` control message. No code behavior change. Signed-off-by: David Goulet <[email protected]>
* circ: Specialize the circparams from netparams functionDavid Goulet2025-01-161-1/+0
| | | | | | | | | | | | | | | Congestion control parameters have specific values depending on the circuit type. Instead of using a CircuitType, which is removed in this commit, specialize the function in this case onion and exit. This allows us to get rid of CircuitType and solely use TargetCircUsage instead. At this commit, we use .expect() on the Builder. Future commit will remove this to return a Result in case of failure. Worth noting that we don't expect one. Signed-off-by: David Goulet <[email protected]>
* Move helpers from tor-hsservice to tor-netdir.Wesley Aptekar-Cassels2024-11-251-2/+1
| | | | | These helpers seem potentially broadly useful, and only really discoverable if they're here.
* Introduce mpsc_channel_no_memquota and use it in the places it's wantedIan Jackson2024-10-151-0/+1
| | | | | These are the call sites where using this fucntion is correct. (Outside tor-rtmock, which we'll do separately.)
* tor-hsservice: Remove now-unused import from internal prelude.Gabriela Moldovan2024-10-081-1/+1
|
* tor-keymgr: Rename KeyPathRange to ArtiPathRange (fmt).Gabriela Moldovan2024-10-081-1/+1
|
* tor-keymgr: Rename KeyPathRange to ArtiPathRange.Gabriela Moldovan2024-10-081-1/+1
| | | | | This is only used for representing portions of `ArtiPath`s, so let's rename it accordingly.
* Upgrade to derive_more version 1.0.0Nick Mathewson2024-09-251-1/+0
| | | | | | The `derive_more` crate broke backward compatibility with this version, so this change involved quite a few manual fixups. With luck, they'll keep compatibility for some while in the future.
* tor-hsservice: Remove unused import from internal prelude.Gabriela Moldovan2024-09-171-1/+1
|
* tor_hsservice use get::<HsIdKey> rather than get::<HsIdKeypair>Adam Joseph F0B74D717CDE8412A3E0D4D5F29AC8080DA8E1E02024-09-091-1/+4
| | | | | | | | | | There are three places where we query the KeyMgr for an `HsIdKeypair` but all we really need is the public part. This commit changes those three callsites to instead use `get::<HsIdKey>`. This relies on the previous commit, which makes sure that a request for an `HsIdKey` will always succeed if the keystore has a `HsIdKeypair` with the same service nickname.
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-1/+2
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* tor-hsservice: Remove unused import from internal prelude.Gabriela Moldovan2024-08-051-1/+0
| | | | | The base64ct dependency is now unused in tor-hsservice, so we should consider removing it at some point.
* tor-hsservice: Remove unused code.Gabriela Moldovan2024-07-091-1/+0
| | | | This is being reimplemented as #1292
* Apply import alphabetisation churnIan Jackson2024-04-031-1/+1
|
* Switch to derive-deftlyIan Jackson2024-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the combination of a number of separate commits, many of which were generated by seddery, and then rebased and squashed. Cargo.toml perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml (not regenerated during rebase) update Cargo.lock `cargo fetch` without --locked (regenerated during rebase) seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}' (not regenerated during rebase) Manually add `#[derive_deftly_adhoc]` where needed. seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}' (not regenerated during rebase) Manually fix up an import Manually update some builder attrs Manually fix up tor_rtmock::time_core This was missed in my seddery, due to me rebasing the branch and not redoing the seddery.
* Use tor_basic_utils::PathExt::display_lossyIan Jackson2024-03-051-1/+1
| | | | | Change Path::display to this new function, in call sites where it's being used for a diagnostic.
* tor-hsservice: Fix description of sub-module handlingIan Jackson2024-03-051-3/+3
|
* tor-hsservice: prelude: Manually tidy and group Arti and crate imports (fmt)Ian Jackson2024-03-051-27/+15
|
* tor-hsservice: prelude: Manually tidy and group Arti and crate importsIan Jackson2024-03-051-41/+31
|
* tor-hsservice: prelude: Use braced group syntaxIan Jackson2024-03-051-143/+151
| | | | This reduces visual clutter and reclaims horizontal space.
* tor-hsservice: prelude: Manually tidy and group std and upstreams (fmt)Ian Jackson2024-03-051-8/+8
|
* tor-hsservice: prelude: Manually tidy and group std and upstreamsIan Jackson2024-03-051-35/+20
|
* tor-hsservice: prelude: Don't import postage::sink::SendErrorIan Jackson2024-03-051-1/+0
| | | | This is too vague.
* tor-hsservice: prelude: Don't import futures::streamIan Jackson2024-03-051-1/+1
| | | | This is too vague.
* Run rustfmtIan Jackson2024-03-051-123/+108
| | | | | This alphabetises the imports, ready for us to do some more manual tidying.
* tor-hsservice: prelude: Move most imports from status.rsIan Jackson2024-03-051-0/+1
|
* tor-hsservice: prelude: Move most imports from req.rsIan Jackson2024-03-051-0/+13
|
* tor-hsservice: prelude: Move imports from replay.rsIan Jackson2024-03-051-0/+9
|
* tor-hsservice: prelude: Move most imports from rend_handshake.rsIan Jackson2024-03-051-0/+7
|
* tor-hsservice: prelude: Move imports from reupload_timer.rsIan Jackson2024-03-051-0/+1
|
* tor-hsservice: prelude: Move imports from reactor.rsIan Jackson2024-03-051-2/+23
|
* tor-hsservice: prelude: Move imports from descriptor.rsIan Jackson2024-03-051-0/+13
| | | | We use these via an import of the parent, publish.rs.
* tor-hsservice: prelude: Move imports from backoff.rsIan Jackson2024-03-051-1/+4
|
* tor-hsservice: prelude: Move imports from publish.rsIan Jackson2024-03-051-0/+2
|
* tor-hsservice: prelude: Move imports from keys.rsIan Jackson2024-03-051-0/+5
|
* tor-hsservice: prelude: Move imports from ipt_set.rsIan Jackson2024-03-051-1/+8
|
* tor-hsservice: prelude: Move imports from helpers.rsIan Jackson2024-03-051-0/+2
|