kingst/twproxy — pull request #2 by huixue (2011-12-09 06:27:16+00:00)
Title: main.cpp changes, note two big parts: 1) multiple server threads doing a...

...ccept() on different ports. 2) the MITM HTTPS work flow requires we forge fake certificate, based on the original certificate we get from the remote site. Therefore, we MUST enableSSLClient() first, to get that SSL, read its certificate information, then enableSSLServer(...), to create a fake cert for the browser to swallow.