Hacker News new | ask | show | jobs
by bobbiechen 2238 days ago
Not the original commenter, but mitmproxy (https://mitmproxy.org/) can do this out-of-the-box for a single site with its reverse proxy:

    mitmdump --mode=reverse:https://news.ycombinator.com
And then visiting http://localhost:8080 will direct to the site.

There's also a nice (though under-documented) scripting interface, so you could probably write a script that does this for all sites in regular proxy mode. I found an example of this here, though I didn't test it: https://groups.google.com/forum/#!topic/mitmproxy/IAJ0-MHVC0...