mdtahseen7/shrina-proxy — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a fast CORS proxy server for streaming video links. I want to be able to give it a media URL through a normal query parameter, a path URL, or a base64 encoded URL, then have it fetch the content and return it with the right CORS headers so it works in a browser player.

It should handle HLS streams properly, especially M3U8 playlists, TS video chunks, subtitles, and weird cases where video chunks use image extensions. When a playlist comes through, rewrite the segment links so they also go back through the proxy.

Please include sensible caching, request timeouts, optional allowed domains, logging, and support for common compressed responses like gzip, brotli, deflate, and zstd. Add basic protection so bad or invalid URLs fail clearly.

I also want simple status and monitoring routes for server health, cache stats, worker stats, metrics, clearing cache, and resetting metrics. Use TypeScript with an Express style server, and include env config plus scripts to run, build, and test it.

Want more depth? Deep Reverse