Page MenuHomePhabricator

[lib/native] introduce handling Tunnelbroker peer-to-peer messages
ClosedPublic

Authored by kamil on Dec 18 2023, 4:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 1:55 PM
Unknown Object (File)
Mon, Nov 18, 11:48 AM
Unknown Object (File)
Fri, Nov 8, 5:11 PM
Unknown Object (File)
Mon, Nov 4, 10:57 PM
Unknown Object (File)
Oct 18 2024, 2:08 AM
Unknown Object (File)
Oct 18 2024, 2:08 AM
Unknown Object (File)
Oct 18 2024, 2:08 AM
Unknown Object (File)
Oct 18 2024, 2:08 AM
Subscribers

Details

Summary

This adds:

  1. Types od messages which is sent as payload of MessageToDevice between peers
  2. Validators
  3. Allow Tunnelbroker socket to call handler specific for platform

Depends on D10378

Test Plan

Tested in next diffs and end-to-end in [link to diff]

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 18 2023, 6:53 AM
lib/types/tunnelbroker/peer-to-peer-message-types.js
17–20 ↗(On Diff #34793)

We can now consider using Flow enums for these, as we have all of the requirements. There are 3 steps to enable them, but you might not have the cycles for this right now. Just figured I'd flag

lib/types/tunnelbroker/peer-to-peer-message-types.js
17–20 ↗(On Diff #34793)

Note for reviewers: this should not be numbers but strings, because later we need to add REFRESH_KEY_REQUEST: 'RefreshKeyRequest', which is sent by Identity, I'll update this shortly

michal added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
52 ↗(On Diff #34793)

This is more general and allows both sync and async functions

This revision is now accepted and ready to land.Jan 8 2024, 3:42 AM
kamil requested review of this revision.Jan 9 2024, 2:50 AM
kamil added 1 blocking reviewer(s): michal.
michal added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
166 ↗(On Diff #35407)

Do we still need void here after changing the return type to mixed?

lib/types/tunnelbroker/peer-to-peer-message-types.js
54 ↗(On Diff #35407)
This revision is now accepted and ready to land.Jan 9 2024, 3:01 AM