aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/ipt_mgr.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* tor-hsservice: ipt_mgr: Document further data structure stabilityIan Jackson2023-09-071-0/+7
|
* tor-hsservice: ipt_mgr: Fix last_descriptor_expiry_including_slop (fmt)Ian Jackson2023-09-071-4/+5
|
* tor-hsservice: ipt_mgr: Fix last_descriptor_expiry_including_slopIan Jackson2023-09-071-4/+7
| | | | This should be an Option, to correspond to what's in IptSet.
* tor-hsservice: ipt_set: Add an IptLocalId fieldIan Jackson2023-09-071-0/+1
|
* tor-hsservice: Move IptLocalId into crate toplevelIan Jackson2023-09-071-14/+1
|
* Merge branch 'hss_config' into 'main'Nick Mathewson2023-09-071-5/+1
|\ | | | | | | | | Begin working on configuration logic for onion services See merge request tpo/core/arti!1557
| * HSS: Start making builders for config structs.Nick Mathewson2023-09-071-5/+1
| | | | | | | | Note a few issues encountered while doing so.
* | tor-hsservice: ipt_set: Define the shared data structureIan Jackson2023-09-061-0/+9
| | | | | | | | | | | | | | | | | | Put a last_descriptor_expiry_including_slop into the IptSet. Define who is responsible for which data. The code at the sites that interacts with this needs to be bodged, to make it still compile. That code is wrong, and the new API for sharing the state doesn't exist yet.
* | tor-hsservice: Move PublishIptSet and its pieces into a new moduleIan Jackson2023-09-061-19/+6
| | | | | | | | | | This is going to be complicated enough we probably want it split out of the publisher.
* | tor-hsservice: De-linkify a docs link to a private itemIan Jackson2023-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | Weirdly, rustdoc says 189 | /// TODO HSS surely this should be [`tor_proto::crypto::handshake::ntor::NtorSecretKey`] ? | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `crypto` in module `tor_proto` when it should probably complain the item is private. Anyway, we can't link to it, so don't.
* | tor-hsservice: Add a TODO HSS re expiry timesIan Jackson2023-09-051-0/+1
| |
* | tor-hsservice: publish: Add type alias for PublishIptSetIan Jackson2023-09-051-2/+0
| |
* | tor-hsservice: Add a TODO re PublishIptSetIan Jackson2023-09-051-0/+2
| |
* | RustfmtIan Jackson2023-08-301-2/+2
| |
* | tor-hsservice: ipt_mgr: Clarify/correct `is_good` commentIan Jackson2023-08-301-1/+1
| | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937979
* | tor-hsservice: ipt_mgr: Actually generate k_sidIan Jackson2023-08-301-6/+2
| | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937978
* | tor-hsservice: Fix type of descriptor expiryIan Jackson2023-08-301-3/+3
| | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937976 If we're publishing with Durations, then we can use Instant at least while everything remains in-core.
* | tor-hsservice: Fix type of descriptor lifetime in IptSetIan Jackson2023-08-301-3/+3
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937976
* | tor-hsservice: ipt_mgr: Replace a panicIan Jackson2023-08-301-1/+1
| | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937971
* | tor-hsservice: ipt_mgr: Discussion of IPT publication strategyIan Jackson2023-08-301-2/+20
| | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937970
* | tor-hsservice: ipt_mgr: Remove stray commentIan Jackson2023-08-301-2/+0
| | | | | | | | | | Apropos https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1559#note_2937969
* | tor-hsservice: ipt_mgr: Calculate a publish::IptSetIan Jackson2023-08-291-6/+79
| |
* | tor-hsservice: ipt_mgr: Break out Ipt::is_good (fmt)Ian Jackson2023-08-291-2/+1
| |
* | tor-hsservice: ipt_mgr: Break out Ipt::is_goodIan Jackson2023-08-291-4/+11
| | | | | | | | | | I'm going to want to reuse this, and it makes the code clearer at the one call site already.
* | tor-hsservice: ipt_mgr: Sort-of create IPT key materialIan Jackson2023-08-291-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the key material to `struct Ipt`, and add some code to generate it. However, this is all rather unsatisfactory. I got a bit lost in the maze of 25519 key types, and neded up making a provisional dummy `NtorKeyPair` type, which will need to be deleted again. And, I wasn't able to generate K_hs_ipt_sid because of a mismatch in Rng traits, which seems to be caused by us not properly wrapping up the underlying crypto key types ? At least the warts seem to be fairly localised.
* | tor-hsservice: ipt_mgr: Reorganise publication set handlingIan Jackson2023-08-291-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | Replace the publish_set closure (whose body is just TODOs right now) with a proper function. Change the type of the publication set to be Option<publish::IptSet>, like the publisher now wants. The value of the enum IptSetStatus is now no longer reified; instead, these situations are the three branches of an if, and described in comments.
* | tor-hsservice: ipt_mgr: Rename `irelays` field from `relays`Ian Jackson2023-08-291-12/+12
| | | | | | | | | | | | Previous code review comments suggested this variable would be better with a name that more clearly distinguished it from (say) something containing `Relay`s.
* | tor-hsservice: Have the manager be in charge of expiry timeIan Jackson2023-08-291-4/+28
| | | | | | | | | | | | | | | | | | | | | | Add the expiry time (as wall clock time) to publish::IptSet. The manager is in a good position to know this information. Provide constants that will be used (for now) for actually calculating the expiry times. (Right now the part where the expiry time would actually be calculated doesn't exist, but it will come soon.)
* | tor-hsservice: Reconcile types between manager and publisherIan Jackson2023-08-291-11/+4
| | | | | | | | | | | | | | | | | | | | Move ipt_mgr::IptSetToPublish to be publish::IptSet, and use it everywhere appropriate. Define descriptor::Ipt to be an IntroPointDesc from tor_netdoc. The manager will have all the information to produce these, so it will be convenient to simply hand them, pre-canned, to the publisher.
* | tor-hsservice: Have Establisher provide more information to Manager (fmt)Ian Jackson2023-08-291-1/+4
| |
* | tor-hsservice: Have Establisher provide more information to ManagerIan Jackson2023-08-291-2/+5
| | | | | | | | | | | | The establisher has a netdir; the manager generally doesn't. So it will be convenient for the establisher to provide the linkspecs and so on.
* | hs: Intro point selection: Actually call is_hs_intro_point() (fmt)Ian Jackson2023-08-291-5/+5
| |
* | hs: Intro point selection: Actually call is_hs_intro_point()Ian Jackson2023-08-291-0/+1
| | | | | | | | | | | | | | | | Call site as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1550#note_2936401 Plus a TODO comment with an opinion from me about this API. (Note not a TODO HSS so this is on the back burner.)
* | tor-hsservice: Actually select new intro point relays (fmt)Ian Jackson2023-08-291-2/+6
| |
* | tor-hsservice: Actually select new intro point relaysIan Jackson2023-08-291-9/+59
| | | | | | | | | | | | | | | | I doubt this would work yet because it will probably crash at startup due to the unhandled error case. Handling the error case would have a conflict with !1549 so let's do that later.
* | tor-hsservice: ipt mgr: Split up idempotently_progress_things_nowIan Jackson2023-08-251-4/+19
|/ | | | | | | | Break publication out of this function, which was rather long. This does seem to make conceptual sense, now I've done it. For example, note how the 2nd half didn't need &mut self, and so doesn't ever `return CONTINUE;`
* tor-hsservice: Use real HsNickname in ipt_mgrIan Jackson2023-08-231-4/+1
|
* 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-231-11/+15
| | | | | | | | 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: 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: About half of an IPT ManagerIan Jackson2023-08-231-0/+774
There are many TODOs and no tests, but it does compile.