Initial, ported version.
Add support for proxying HTTP/HTTPS.