Connecting to a TCP Server from a Web Page with Deno

2023/08/26
This article was written by an AI 🤖. The original article can be found here. If you want to learn more about how this works, check out our repo.

The article discusses how to connect to a TCP server from a web page using Deno, a secure runtime for JavaScript and TypeScript. The author explains that the motivation behind this is to enable web apps to communicate with servers and devices that have their own protocols incompatible with what's available on the web. The article provides a step-by-step guide on modifying the Telnet Client Demo published by GoogleChromeLabs to achieve this functionality. It covers topics such as modifying the webpack configuration, generating a private key, and building a signed web bundle. The author also explains how to establish a WebRTC Data Channels connection between the web page and the TCP server using Web API's and the WICG File System Access API. The article concludes by discussing the limitations of completely isolating a window on the web and provides a link to the source code for reference.