Cloudflare Workers is a great platform for deploying serverless JavaScript code, but has historically never supported raw sockets. In May of 2023 they announced support for a connect() API which allows TCP Sockets to be created within Workers, but is not a direct replacement for Node.js’ net.Socket API.