aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hack in some sqlite memory limits to see if that helpsios-sqlite-hackseta2023-10-121-0/+2
|
* now this is really a hacketa2023-09-191-1/+1
|
* tor-ptmgr: add very basic support for unmanaged PTseta2023-09-195-1/+29
| | | | | | | | | | - `tor-ptmgr` has a new `add_unmanaged` function to insert an unmanaged PT into the `cmethods` table. - There are many ways to misuse this API and have it blow up in your face (for example, by overwriting an existing PT's cmethod, etc.) - It's unclear whether these are worth caring about. - The `TorClient` gains a new experimental `ptmgr()` function, and the `PtClientMethod` can now be constructed by user code.
* Merge branch 'partial-eqs' into 'main'Alexander Færøy2023-09-193-3/+9
|\ | | | | | | | | tor-hsservice: Implement PartialEq for HsClientDescEncKey, Anonimity, DescEncryptionConfig See merge request tpo/core/arti!1601
| * tor-hsservice: Derive PartialEq for Anonimity and DescEncryptionConfig.Gabriela Moldovan2023-09-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | This will enable the descriptor publisher to tell whether it needs to update the descriptor. When the publisher is notified of an `OnionServiceConfig` change, it checks whether the `anonimity` or `encrypt_descriptor` fields have changed. If they have, it rebuilds and republishes the descriptor using the new values (note: the publisher changes will be implemented in a future commit).
| * tor-hscrypto: Implement PartialEq for HsClientDescEncKey.Gabriela Moldovan2023-09-181-0/+6
| | | | | | | | Needed to implement `PartialEq` for `AuthorizedClientConfig`.
* | Merge branch 'ipt-accepting' into 'main'Nick Mathewson2023-09-181-29/+58
|\ \ | |/ |/| | | | | tor-hsservice: ipt mgr: Notify Establisher to start accepting See merge request tpo/core/arti!1598
| * tor-hsservice: ipt mgr: Apply deferred rustfmt churnIan Jackson2023-09-181-3/+1
| |
| * tor-hsservice: ipt mgr: Remove some allowsIan Jackson2023-09-181-4/+0
| |
| * tor-hsservice: ipt mgr: Instruct Establisher to start acceptingIan Jackson2023-09-181-1/+12
| |
| * tor-hsservice: ipt mgr: Introduce ErasedIptEstablisher aliasIan Jackson2023-09-181-4/+7
| | | | | | | | We're going to want to talk about this in the Mockable trait.
| * tor-hsservice: ipt mgr: Break apart publish_setIan Jackson2023-09-181-10/+26
| | | | | | | | | | | | | | | | The call site is going to want to do something other with the selected IPTs than just publish them. (This seems better than putting the Establisher notification in a function called `publish_set`.)
| * tor-hsservice: ipt mgr: Move `expires` bindingIan Jackson2023-09-181-8/+8
| | | | | | | | | | | | We're going to split this function, and this will be in the 2nd half. Code motion only.
| * tor-hsservice: ipt mgr: Split out publish None handlingIan Jackson2023-09-181-4/+9
| | | | | | | | | | We want a separate block so we can do other things besides just making an IptPublishSet.
* | Merge branch 'mock-advance' into 'main'Ian Jackson2023-09-185-6/+304
|\ \ | |/ |/| | | | | tor-rtmock: task: Provide advance_* to replace advance See merge request tpo/core/arti!1594
| * tor-hsservice: publish backoff tests: Add an allowIan Jackson2023-09-181-0/+1
| |
| * tor-rtmock: MockRuntime: Work around borrowck in Rust 1.65Ian Jackson2023-09-181-0/+2
| |
| * tor-rtmock: MockRuntime: Move deprecated advance to end of impl blockIan Jackson2023-09-181-17/+17
| | | | | | | | This will change the ordering in the docs.
| * tor-hsservice: timeout_track test: Use advance_byIan Jackson2023-09-181-1/+2
| |
| * tor-hsclient: expiry tests: Use advance_byIan Jackson2023-09-181-1/+1
| |
| * tor-hsclient: expiry: Fix a boundary error in time calculationIan Jackson2023-09-181-1/+4
| | | | | | | | | | We might loop, sleeping for zero. In real life this wouldn't last long, but with the mock executor it can busy loop.
| * tor-rtmock: MockRuntime: Add tests for advance_*Ian Jackson2023-09-181-0/+177
| |
| * tor-rtmock: MockRuntime: Provide advance_by() etc. and deprecate .advance()Ian Jackson2023-09-182-1/+102
| | | | | | | | | | | | | | | | advance_by can be used in a more natural way, rather than having to manually advance the clock in chunks to avoid triggering only the first sleep. It can also detects some "timeout triggered precisely" edge case bugs.
| * tor-rtmock: MockRuntime: Provide spawn_identified() wrapperIan Jackson2023-09-181-0/+13
| | | | | | | | We should encourage the use of this, rather than Spawn::spawn()
* | Merge branch 'ipt-misc' into 'main'Nick Mathewson2023-09-185-54/+45
|\ \ | | | | | | | | | | | | tor-hsservice: Pass correct parameters to Establisher See merge request tpo/core/arti!1597
| * | tor-hsservice: Apply deferred rustfmt churnIan Jackson2023-09-181-5/+1
| | |
| * | tor-crypto: Fix some derive formattingIan Jackson2023-09-181-1/+1
| | | | | | | | | | | | This was missing the conventional spaces. Noticed in passing.
| * | tor-hsservice: ipt mgr: Drop Mockable::new_intro_pointsIan Jackson2023-09-181-5/+0
| | | | | | | | | | | | | | | | | | We don't need this because the manager takes an IptsManagerView which can be connected to something other than a real publisher (and is pretty good at passing on the info).
| * | tor-hsservice: Pass correct parameters to EstablisherIan Jackson2023-09-181-5/+4
| | |
| * | tor-hsservice: Wrap k_hs_ipt_sid in an ArcIan Jackson2023-09-182-6/+12
| | |
| * | tor-hsservice: TODO HSS-IPT-PERSIST: make a new specific todoIan Jackson2023-09-181-6/+6
| | | | | | | | | | | | This is the persistent IPT feature.
| * | tor-hsservice: ipt mgr: Code motion needed to actually make iptIan Jackson2023-09-181-10/+10
| | | | | | | | | | | | We must generate keys and so on before we can set up an Establisher.
| * | tor-hsservice: Unify ids as IptLocalId replacing IntroPointIdIan Jackson2023-09-184-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IntroPointId was RelayIds but that's wrong, because there can be different IPTs at the same relay - but also because an established IPT might change its RelayIds. Use IptLocalId instead, which I think is the type we decided to use for this, and which is, conveniently, Copy. And change the variable names to match, everywhere. Specifically: in places where an intro point is implied (ipt_mgr.rs, ipt_establish.rs) use the name `lid` everywhere, like in ipt_mgr.rs. Elsewhere, use `ipt_lid`. (We could use a longer name, but in that case it should be changed in ipt_mgr.rs too.) No actual functional change in this commit.
| * | tor-hsservice: Use correct name for k_hs_ipt_sid variableIan Jackson2023-09-182-7/+8
| |/ | | | | | | | | | | | | Local variables can have contextually implied elements omitted. In this case that's `hs` and `ipt`, leaving `k_sid` as in ipt_mgr.rs. Put the full name in the doc comment.
* | Merge branch 'exit-selection-mainlineable' into 'main'eta2023-09-1814-12/+244
|\ \ | | | | | | | | | | | | arti-client: add exit selection with GeoIP country codes See merge request tpo/core/arti!1537
| * | arti-client: add exit selection with GeoIP country codeseta2023-09-1814-12/+244
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This threads the country codes work through the rest of the codebase: - `tor-dirmgr` will now enable GeoIP with the embedded database when the `geoip` future is enabled - This can be extended later using the `DirMgrConfig` to allow specifying a custom database; this is not done here, though - `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain new `country_code` members to allow filtering circuits by country - These are `()` in builds where the `geoip` feature is not enabled -- doing it this way means we don't have to copy and paste huge swathes of code, since we can't use `#[cfg]` in patterns - `ExitPathBuilder` gains (hacked-in) support for choosing a relay with the correct country code - Due to the lack of conjuction, we just copy and paste a small bit, pending further refactoring - `StreamPrefs` now lets you specify a country code, letting embedders make use of the feature
* | Merge branch 'ipt-set-2' into 'main'Ian Jackson2023-09-184-44/+285
|\ \ | |/ |/| | | | | tor-hsservice: Implement ipt_set See merge request tpo/core/arti!1577
| * tor-hsservice: ipt_set: Add some testsIan Jackson2023-09-182-0/+118
| |
| * tor-netdoc: "testing" feature: Provide test_parsed_hsdescIan Jackson2023-09-181-12/+20
| | | | | | | | | | | | This is actually just the start of an existing test case. tor-hsservice tests will want this in a moment.
| * tor-netdoc: tests: Hoist out TEST_DATA_HS_BLIND_ID (fmt)Ian Jackson2023-09-181-4/+1
| |
| * tor-netdoc: tests: Hoist out TEST_DATA_HS_BLIND_IDIan Jackson2023-09-181-3/+9
| |
| * tor-hsservice: ipt_set: note_publication_attempt: fmt bodgeIan Jackson2023-09-181-0/+1
| | | | | | | | Defend against rustfmt worsifying this by adding an empty comment.
| * tor-hsservice: ipt_set: note_publication_attempt: renameIan Jackson2023-09-181-3/+3
| | | | | | | | | | | | From ..._start. The old name is confusing when you see a call site, because the actual time passed isn't the start time, but the call site looks like it ought to be.
| * tor-hsservice: ipt_set: note_publication_attempt_start: implementIan Jackson2023-09-181-2/+28
| | | | | | | | This gains an almost impossible error case.
| * tor-hsservice: ipt_set: principal implementationIan Jackson2023-09-181-14/+91
| |
| * tor-hsservice: ipt_set: make await_update take &mut selfIan Jackson2023-09-181-1/+1
| | | | | | | | This is needed since the notification channel will be an mpsc.
| * tor-hsservice: Add a block to run_onceIan Jackson2023-09-181-9/+16
| |
| * tor-hsservice: Make IptSet be DebugIan Jackson2023-09-181-0/+1
| |
* | Merge branch 'make_hss_ntor_key' into 'main'Nick Mathewson2023-09-183-23/+43
|\ \ | |/ |/| | | | | | | | | Define a keypair type for HsSvcNtor{,Secret}Key, and use it in ipt_mgr. Closes #1030 See merge request tpo/core/arti!1590
| * Add a note about how the K_hss_ntor is passed.Nick Mathewson2023-09-171-0/+4
| |