4 ms·
> It is easy to automate this using a forward proxy. I use one on a loopback address. The way I have it set up, I add a given domain to a text file, reload,^1 a
by heywoodlh 4y ago
> It is easy to automate this using a forward proxy. I use one on a loopback address. The way I have it set up, I add a given domain to a text file, reload,^1 and from then on, the proxy will rewrite the URLs using that domain to point to archive.org or whatever.
This sounds super useful to me. Would you be able to point me to some resources to set up a workflow for something similar?
- 1vuio0pswjnm7 4y agoUsing haproxy^1 as an example To redirect to the most recent archive.org capture, I use a date in the distant future such as 203001234567890. This will automatically redirect to the latest capture. http-request set-uri https://web.archive.org/web/20301234567890if_/http://%[req.hdr(host)]%[pathq] if { hdr(host) -m str -f hosts-archive.txt } To redirect to the earliest archive.org capture, I use 1. This will automatically redirect to the earliest capture. http-request set-uri https://web.archive.org/web/1if_/http://%[req.hdr(host)]%[pathq] if { hdr(host) -m str -f hosts-archive.txt } If I want to all requests for example.org files to retrieve from archive.org instead of example.org, I do something like echo example.org >> hosts-archive.txt echo reload|socat stdio /path/to/control/socket 1. https://www.haproxy.org https://www.haproxy.org for documentation.