Could be cool to see an implementation using Chrome's experimental Direct Sockets API [0]. The API requires using a form of new web packaging known as Isolated Web Apps which have a strict CSP [1] though, so it might not be possible to use it for this since I'd assume it's dynamically executing a lot of code.
[0]: https://github.com/WICG/direct-sockets/blob/main/docs/explai...
[1]: https://github.com/WICG/isolated-web-apps/blob/main/README.m...