constructor(options) {
        super();

        //TODO we never remove requests from here - see #8
        this._connections = new Map();

        let proxy = new MITMProxy();

        proxy.onRequest(handleIncomingRequest.bind(this));
        proxy.onResponse(handleIncomingResponse.bind(this));
        proxy.onError(handleProxyError.bind(this));

        proxy.listen({
            port: options.port,
            sslCaDir: options.sslCaDir
        });
    }
Responsible for creating and maintaining proxy server and exposing information about passing traffic.