telegramdesktop/tproxy-server ? reverse-engineered prompt
Reverse engineered prompt
Build me the server side for a proof of concept Telegram web proxy.
I want a Go service that sits behind Caddy on a normal HTTPS hostname, serves the public site for regular visitors, and only reveals a special bridge page when the request has the right secret from the hostname and MTProxy secret. After that, it should accept an authenticated relay session over HTTPS or WebSocket, handle multiplexed OPEN, DATA, WINDOW, and CLOSE frames, and forward each logical stream to a local official MTProxy instance without ever decrypting the MTProxy traffic.
Please make it practical to run on a fresh Linux server, with config examples, deployment files, and sensible defaults for a static site or a private loopback web app. Keep the bridge logic one shot and short lived, and make sure normal requests still look like an ordinary website. If anything is unclear, look up the current docs online and keep the implementation aligned with the README and protocol files.
Are you gonna build this?
make sure you review the code using coderabbit