I'm looking for a small, fast, and reliable https proxy that I can extend to do the following:
- Look for https handshake requests.
- Run a regular expression against the host name being requested.
- If the expression matches the host name then don't send the request on but respond with a 302 redirect to a different site.
So, I guess I have the following questions about this:
Is this possible? (I'm pretty sure the handshake request is not encrypted, I know I can do some pattern matching, the real question is...would I be able to send a fake 302 redirect to the client without it complaining about not having completed the handshake?)
If it is possible, is there a linux app out there that does some or all of this? (I found this: http://www.kubat.nl/pages/microproxy) I was considering trying to build the remaining features into it but didn't want to try that if something else already does it.
Do you have suggestions for other C++ Linux proxies I might be able to build this into?
Thanks in advance for your feedback.