summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice
Commit message (Collapse)AuthorAgeFilesLines
...
* | hss: launch task to establish introduce requests.Nick Mathewson2023-08-221-14/+76
| | | | | | | | | | (This requires us to change the type of the data sent in the stream. I hope to put it back soon.)
* | hss: Once an ipt session is established, let it keep running.Nick Mathewson2023-08-221-6/+10
| |
* | hss: make Ipt establisher code use an mpsc::Sender.Nick Mathewson2023-08-221-28/+32
| | | | | | | | | | This solves some problems but introduces a few new ones; I've tried to open comments for the latter.
* | hss: Establish intro point by RelayIds.Nick Mathewson2023-08-222-8/+55
|/
* Merge branch 'hss_ct_from_parts' into 'main'Nick Mathewson2023-08-222-16/+57
|\ | | | | | | | | hsservice: Compute rendezvous points correctly. See merge request tpo/core/arti!1521
| * hsservice: Fix an error message.Nick Mathewson2023-08-221-1/+1
| |
| * hsservice: Compute rendezvous points correctly.Nick Mathewson2023-08-222-15/+56
| | | | | | | | | | | | | | This duplicates some code from hsclient as noted in the comments; it might be good to reduce this, but the remaining nontrivial duplication is small, and the logic flow is slightly different because of the two-step process.
* | Merge branch 'hss-err' into 'main'gabi-2502023-08-186-19/+69
|\ \ | | | | | | | | | | | | tor-hsservice errors: Introduce more error types See merge request tpo/core/arti!1515
| * | tor-hsservice errors: Distinguish operational errors by contextIan Jackson2023-08-175-11/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the very least, I need FatalError to be distinct: IptEstablisher::new ought not to fail unless everything is terrible. Add a the Spawn variant to FatalError (that we'll need soon) and the Bug variant (which it seems likely we might need). This also gets rid of the crate-level Result alias.
| * | tor-hsservice errors: Return ReconfigureError from reconfigureIan Jackson2023-08-172-1/+3
| | | | | | | | | | | | This is what we do elsewhere.
| * | tor-hsservice errors: Use Bug for methods that oughtn't to failIan Jackson2023-08-172-4/+9
| | | | | | | | | | | | | | | | | | If the service encouters operational errors, surfacing them here is not helpful. So these methods ought to work, if they weren't called erroneously.
| * | tor-hsservice errors: Make stop() infallibleIan Jackson2023-08-171-1/+1
| | | | | | | | | | | | | | | The semantics of an Err return from this are unclear. Was it stopped? And what kind of error might we even return?
| * | tor-hsservice errors: Use `crate::Result` rather than importsIan Jackson2023-08-172-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to change the error return types of many methods, so we need a way to name `std::result::Result`. We could use `StdResult`, but, actually, properly distinguishing the kinds of errors that can occur in various contexts means we don't actually want a single Error type for the whole crate, so `crate::Result` is going to go away.
* | | Merge branch 'ipt-e-drop' into 'main'gabi-2502023-08-182-0/+20
|\ \ \ | | | | | | | | | | | | | | | | Define drop behaviour of IPT establisher, wrt status watch See merge request tpo/core/arti!1516
| * | | tor-hsservice: Define drop behaviour of IPT establisher statusIan Jackson2023-08-172-0/+20
| | | |
* | | | hsservice: Use correct circparameters_from_netparameters fnNick Mathewson2023-08-181-7/+5
| |_|/ |/| | | | | | | | I had incorrectly thought that this function was private.
* | | Merge branch 'allow_stream_req-hop-num' into 'main'Nick Mathewson2023-08-181-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-proto: Make ClientCirc::allow_stream_requests take a HopNum. Closes #1009 See merge request tpo/core/arti!1519
| * | | tor-proto: Make ClientCirc::allow_stream_requests take a HopNum.Gabriela Moldovan2023-08-181-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | For consistency with the other `ClientCirc` APIs, `ClientCirc::allow_stream_requests` now takes a `HopNum` argument. Upon receiving an incoming stream request, the reactor now checks if the request came from the hop specified in `allow_stream_requests` (and if it came from a different hop, the circuit is closed). Part of #1009
* / / tor-hsservice: Change IptEstablisher::new to take RelayIdsIan Jackson2023-08-171-3/+3
|/ / | | | | | | | | | | | | | | | | | | The IptEstablisher needs to continuously maintain the IPT even as the netdir is updated. Whereas, the IPT manager just wants to select the relay from the netdir once and then only think about the relay identity. So it makes sense for the establisher to do necessary lookups of the relay's ids in the netdir.
* | Merge branch 'rendezvous_handshake' into 'main'Nick Mathewson2023-08-173-0/+257
|\ \ | |/ |/| | | | | hsservice: new rend_handshake module See merge request tpo/core/arti!1512
| * hsservice: new rend_handshake moduleNick Mathewson2023-08-173-0/+257
| | | | | | | | | | | | | | | | | | This code has most of what we need to go from an INTRODUCE2 message we've just received to the point where we've connected to the rendezvous point and we're waiting for a stream of BEGIN messages. Unfinished pieces are marked with TODO HSS. Most of #980.
* | tor-hsservice: Have IptEstablisher::new() return the status watch (fmt)Ian Jackson2023-08-161-2/+1
| |
* | tor-hsservice: Have IptEstablisher::new() return the status watchIan Jackson2023-08-161-5/+6
|/ | | | | | | | | | | The IPT manager is going to want to separate the IptEstablisher struct (which contains the Drop signal) from the watch receiver. We could add an accessor to clone the watch, but the copy in the IptEstablisher would be redundant. This makes new()'s signature a bit funky but it's an internal method so I think that's fine.
* Wire up more of IptEstablisher.Nick Mathewson2023-08-162-7/+112
| | | | | It now supports running in a loop, trying to establish an introduction point, and reporting status.
* reformat establish_intro_onceNick Mathewson2023-08-151-75/+78
|
* Make establish_intro_once a method on a new IptEstablisherReactor.Nick Mathewson2023-08-151-18/+34
| | | | This will help with making a keep_established method.
* hsservice: Actually return from establish_intro_once.Nick Mathewson2023-08-151-13/+31
|
* hsservice: migrate IptStatus design to assume a postage::watchNick Mathewson2023-08-152-9/+13
|
* hsservice: Reject extensions in IntroEstablished cellsNick Mathewson2023-08-151-4/+12
| | | | | Intro points must not send these extensions except in response to a request that prompts them.
* hsservice: Send extensions in establish_intro msgs.Nick Mathewson2023-08-151-9/+18
| | | | | | I had planned to make this code accept extensions of unknown type, but for now I'm backing out of that plan: the set of extensions we send influences the set that we're willing to receive.
* Start working on the backend for an IptEstablisher.Nick Mathewson2023-08-142-8/+247
| | | | | | | | This should be enough now to establish real introduction points, though there is still a lot of work to do. Part of #976. This has been rebased and edited to incorporate discussions from !1465.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* hsservice: Upgrade tor-keymgr depNick Mathewson2023-08-011-1/+1
| | | | | | This breakage was caused by increasing the version of tor-keymgr and independently merging !1452, which added a dependency on the old version.
* Merge branch 'hss_apis' into 'main'Nick Mathewson2023-08-019-85/+551
|\ | | | | | | | | | | | | hsservice: Initial data structures and APIs Closes #972, #971, and #970 See merge request tpo/core/arti!1452
| * hsservice: Add a sketched API for HsDir publishers.Nick Mathewson2023-07-312-0/+99
| | | | | | | | | | | | | | As with the other APIs here, I'd expect that the implementors will need to refactor this a lot. Closes #972.
| * A couple of notes on intropoint establisher API.Nick Mathewson2023-07-311-1/+10
| |
| * hsservice: Add a draft API for intropoint establisher.Nick Mathewson2023-07-312-0/+107
| | | | | | | | | | | | | | Taken from @diziet's !1439 and lightly cleaned up so that it compiles. Closes #971.
| * hsservice: Adapt API sketches from onion-service-notes.mdNick Mathewson2023-07-313-0/+44
| |
| * hsservice: Adapt data structures from onion-service-notes.mdNick Mathewson2023-07-317-85/+292
| | | | | | | | | | | | | | Also, removed some older structures that don't make sense in the current design. Closes #970
* | Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
* | Update minor versions on crates that have had breaking changesNick Mathewson2023-08-011-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had first-order breaking changes: ``` retry-error tor-keymgr tor-proto tor-hsclient tor-rtmock ``` Additionally, these broke because they re-exposed RetryError: ``` tor-circmgr ``` Additionally, these broke because they may re-expose something from tor-proto: ``` arti-client tor-chanmgr tor-dirclient tor-dirmgr tor-guardmgr ``` Additionally, these broke for other fiddly reasons: `tor-ptmgr` implements traits from tor-chanmgr, which has a breaking change above. `arti-hyper` exposes types from arti-client in its API.
* Add exceptions for some cases of diverging_sub_expressionNick Mathewson2023-07-101-0/+1
| | | | | | | | See here for documentation on the lint: https://rust-lang.github.io/rust-clippy/master/index.html#/diverging_sub_expression The issue here, from what I can tell, is that the lint triggers whenever you use a diverging expression as a function body within an
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* Bump minor versions on crates with breaking changesNick Mathewson2023-06-301-1/+1
| | | | | | | | | | Done with: ``` cargo set-version --bump minor -p tor-hsclient cargo set-version --bump minor -p arti-rpcserver cargo set-version --bump minor -p tor-hscrypto cargo set-version --bump minor -p tor-cell ```
* Downgrade every "TODO HS" in tor-hsserviceNick Mathewson2023-06-205-26/+26
| | | | These are all service-specific, and not client-specific.
* keymgr: Move the HS client and service key specifiers out of tor-keymgr.Gabriela Moldovan2023-06-152-0/+35
| | | | | | The HS `HsClientSpecifier` and `HsClientSecretKeySpecifier` are moved to `tor-hsclient`. The HS service secret key specifier stubs are moved to `tor-hsservice`.
* Upgrade async-trait requirement to 1.54Nick Mathewson2023-06-121-1/+1
| | | | | | | | We need the fix from [82d69902], which first appeared in async-trait version 1.54. (Technically we only need this fix in tor-hsclient, but we may as well update our minimal async-trait version everywhere.) [82d69902]: https://github.com/dtolnay/async-trait/commit/82d69902535f5cb7f5d9e1ea4168c64abd496389
* Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Reformat Cargo.toml files.Nick Mathewson2023-05-151-1/+8
|
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-0/+1
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.