2 ms·
HTTPS proxying is perfectly possible, though. IMHO it's one of those bizarre cases where the code to implement it isn't even that hard necessarily. The challeng
by jerf 10y ago
HTTPS proxying is perfectly possible, though. IMHO it's one of those bizarre cases where the code to implement it isn't even that hard necessarily. The challenge is all in the fact that A: more people think they understand the HTTPS security model than actually understand the HTTPS security model and B: it's really easy to write code that "works" in the sense that it allows you to proxy pages, but allows you to proxy too many pages too easily. Programmers generally acquire a deep and generally-mostly-justified belief that getting code to do the thing they want it to do is the hard part, so code that appears to work is likely more correct than broken, but this is one case where it's quite shockingly easy to write code that works far too "well" and all the challenge is actually in writing all the test cases for when it is supposed to fail to proxy the page.
That's a lot of headwinds on a bit of code, but they are possible to overcome, if the motivation, and perhaps even more importantly, the humility is there.
- derefr 10y agoIt'd be nice to lift out Chromium's own network stack into a library (as a continuously-rebased-from-upstream derivative fork), and then build a proxy that made requests using said network stack. Then you'd get all the HSTS/cert-pinning logic, the CORS and only-N-requests-per-host-at-a-time policies, and a very good LRU cache implementation, "for free", for your proxy daemon. Heck, if you don't mind an extra 100MB of memory consumption, you could probably throw a "correct" proxy-daemon together in Javascript by relying on the browser network stack of a [headless] Electron instance.