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)
Fri, Jun 28, 12:09 AM
Unknown Object (File)
Thu, Jun 27, 9:39 AM
Unknown Object (File)
Wed, Jun 26, 11:54 AM
Unknown Object (File)
Mon, Jun 24, 8:55 PM
Unknown Object (File)
Mon, Jun 24, 10:14 AM
Unknown Object (File)
Mon, Jun 24, 1:31 AM
Unknown Object (File)
Sat, Jun 8, 12:16 PM
Unknown Object (File)
Thu, Jun 6, 8:25 PM
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