Page MenuHomePhabricator

[lib] implement creating Tunnelbroker socket
ClosedPublic

Authored by kamil on Oct 26 2023, 8:56 AM.
Tags
None
Referenced Files
F2898489: D9607.id32563.diff
Sat, Oct 5, 3:25 AM
Unknown Object (File)
Wed, Oct 2, 1:07 PM
Unknown Object (File)
Wed, Oct 2, 1:07 PM
Unknown Object (File)
Wed, Oct 2, 1:07 PM
Unknown Object (File)
Wed, Oct 2, 1:07 PM
Unknown Object (File)
Wed, Oct 2, 6:01 AM
Unknown Object (File)
Sat, Sep 7, 1:50 AM
Unknown Object (File)
Aug 24 2024, 3:38 PM
Subscribers

Details

Summary

Creates socket and implement initial handlers.

Depends on D9606

Test Plan

Tested in next 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.Oct 27 2023, 5:37 AM
kamil added inline comments.
lib/facts/tunnelbroker.js
6 ↗(On Diff #32429)

I'll change this to staging after deployment and landing this stack, for now, I preferer this - it's easier for me to work on this.

lib/tunnelbroker/tunnelbroker-context.js
50–53 ↗(On Diff #32429)

We should retry here, but I want to avoid unnecessary computation on the client right now, when the socket most likely will be closed because the clients are not logged in to Identity and auth will fail. Improving this is tracked here.

michal added inline comments.
lib/facts/tunnelbroker.js
6 ↗(On Diff #32429)

Nit: can we change it to localhost?

lib/tunnelbroker/tunnelbroker-context.js
54–56 ↗(On Diff #32429)

Should we close the connection here?

This revision is now accepted and ready to land.Oct 30 2023, 10:00 AM

use localhost

lib/facts/tunnelbroker.js
6 ↗(On Diff #32429)

yes!

lib/tunnelbroker/tunnelbroker-context.js
54–56 ↗(On Diff #32429)

As far as I know close and error comes along, but close is later (as a result of error) so it's usually better to handle only close events. link to standard

move createTunnelbrokerSocket to tunnelbroker-context.js