aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src
Commit message (Collapse)AuthorAgeFilesLines
...
* hss: Retry rendezvous circuit attempts.Nick Mathewson2023-08-241-8/+26
| | | | Closes #1013.
* tor-keymgr, tor-hsservice: Run rustfmt to make derives uglierIan Jackson2023-08-231-3/+3
|
* tor-keymgr, tor-hsservice: deser for ArtiPathComponent and HsNicknameIan Jackson2023-08-231-0/+21
|
* tor-hsservice: Use real HsNickname in configIan Jackson2023-08-231-4/+4
|
* tor-hsservice: Use real HsNickname in ipt_mgrIan Jackson2023-08-231-4/+1
|
* tor-hsservice: Provide a sensible HsNicknameIan Jackson2023-08-232-0/+90
|
* Rerun maint/add_warningIan Jackson2023-08-231-0/+1
| | | | | Fixes CI. There was a semantic conflict between !1535 (which added a suppression) and !1523 (which added a new module).
* Merge branch 'hss_send_raw' into 'main'Ian Jackson2023-08-231-20/+2
|\ | | | | | | | | hss: use send_raw_msg in rend_handshake. See merge request tpo/core/arti!1536
| * hss: use send_raw_msg in rend_handshake.Nick Mathewson2023-08-221-20/+2
| |
* | ipt establisher API: pass a struct to new() (fmt)Ian Jackson2023-08-231-6/+2
| | | | | | | | One of rustfmt's changes here is wrong. Whatever.
* | ipt establisher API: pass a struct to new()Ian Jackson2023-08-232-20/+47
| | | | | | | | | | | | | | | | Now new() only has a reasonable number of arguments and removes some repetition in the mocking arrangements in the IPT Manager. This is the minimum amount that needs to be done in the commit that touches both the IPT Establisher and the Manager.
* | tor-hsservice: Add a TODO for breaking up the big functionIan Jackson2023-08-231-0/+2
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934367
* | tor-hsservice: timeout_track: Add some TODOsIan Jackson2023-08-231-0/+3
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934299
* | tor-hsservice: ipt-m: Add a TODO about code motionIan Jackson2023-08-231-0/+2
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934300
* | tor-hsservice: ipt-m: tests: Fix wrong commentIan Jackson2023-08-231-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934298
* | Fix doc formatting.gabi-2502023-08-231-1/+1
| |
* | tor-hsservice: About half of an IPT ManagerIan Jackson2023-08-234-2/+798
| | | | | | | | There are many TODOs and no tests, but it does compile.
* | tor-hsservice: Expose the ipt_establish and publish modulesIan Jackson2023-08-231-2/+2
| | | | | | | | | | | | I still think putting these in svc/ module doesn't make much sense. Anyway, we can leave them there for now, but I need to get at them from crate::ipt_establisher.
* | tor-hsservice: Provide timeout tracking utilities - testsIan Jackson2023-08-231-2/+199
| |
* | tor-hsservice: Provide timeout tracking utilitiesIan Jackson2023-08-232-0/+432
| | | | | | | | | | This module is perhaps rather more comprehensive than needed right now. But I found I kept wanting to change which bits of it I used.
* | Use "typos-cli" to fix a bunch of typos.Nick Mathewson2023-08-222-2/+2
| |
* | hss: Improve comments in IptEstablisher::drop.Nick Mathewson2023-08-221-2/+8
| |
* | hss: Allow IptEstablisher to start in Advertised mode.Nick Mathewson2023-08-221-18/+20
| |
* | hss: switch to select_biasedNick Mathewson2023-08-221-1/+1
| |
* | hss: change terminate oneshot to send "void".Nick Mathewson2023-08-221-7/+9
| | | | | | | | We don't actually want to distinguish drop from not-drop.
* | HSS: Use correct timeouts and delays in IptEstablisherNick Mathewson2023-08-221-8/+7
| |
* | HSS: Use a more accurate timeout for ESTABLISH_INTRO handshake.Nick Mathewson2023-08-221-10/+11
| |
* | HSS: Refactor RendRequest so we can return a stream of it.Nick Mathewson2023-08-224-46/+72
| | | | | | | | | | | | | | We need a type that holds a rend_handshake::IntroRequest object internally, but where we don't materialize that object from the Introduce2 message inside the MsgHandler, since that's more crypto than we want to put in that task.
* | HSS: Use DropNotifyWatchSender.Nick Mathewson2023-08-221-3/+3
| | | | | | | | This ensures that the status becomes Faulty when the reactor exits.
* | HSS: Implement start_accepting and drop for IptEstablisher.Nick Mathewson2023-08-221-14/+75
| | | | | | | | This does not yet do exactly what's documented, but it's closer.
* | 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-221-8/+54
|/
* Merge branch 'hss_ct_from_parts' into 'main'Nick Mathewson2023-08-221-14/+55
|\ | | | | | | | | 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-221-13/+54
| | | | | | | | | | | | | | 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-185-19/+68
|\ \ | | | | | | | | | | | | 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-171-1/+2
| | | | | | | | | | | | 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-181-0/+19
|\ \ \ | | | | | | | | | | | | | | | | 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-171-0/+19
| | | |
* | | | 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-172-0/+255
|\ \ | |/ |/| | | | | hsservice: new rend_handshake module See merge request tpo/core/arti!1512