2 ms·
I am writing a web server in vanilla TypeScript/Node. It is raw sockets first and then minimal http support over the socket layer. This morning I wrote the pro
by austin-cheney 2y ago
I am writing a web server in vanilla TypeScript/Node. It is raw sockets first and then minimal http support over the socket layer.
This morning I wrote the proxy solution in about 10 lines of code. Its really just some supporting code around these two lines, because everything is much easier when it’s just streams:
socket.pipe(proxy);
proxy.pipe(socket);
The goal is to use this as the web server for my home network supporting all my vanity domains that scales up to allow drop in applications. My first home app will be a wrapper around a yt-dlp/ffmpeg script available through a web page.