Building a Website Mirror with GOST Reverse Proxy
In some network environments, access to certain websites is unstable. Setting up a "mirror site" is a common solution: move the target site as-is onto your own domain or server, so visitors get the same content transparently.
But "mirroring a website" is far more than just forwarding the homepage HTML. A modern site (take GitHub for example) spreads its resources across multiple domains (github.com, raw.githubusercontent.com, avatars.githubusercontent.com, github.githubassets.com, …), and the links, redirects, cookies, and security policies inside its pages are all hard-coded to the original domain. A naive forward would send the user back to the origin on every link click and load images from the origin domain — the mirror would be pointless.
This article uses GitHub as an example to walk through how to turn a multi-domain site into a real mirror using GOST's reverse proxy.