node-http-mitm-proxy icon indicating copy to clipboard operation
node-http-mitm-proxy copied to clipboard

Listening on a given port indefinitely

Open Minyar2004 opened this issue 4 years ago • 0 comments

'use strict';
var port = 4389;
var Proxy = require('http-mitm-proxy');
var proxy = Proxy();
proxy.listen({port: port});
console.log('listening on ' + port);

The MITM creates a HTTPS server for EACH new domain.

MITM logs :

  http-mitm-proxy starting server for tag.aticdn.net +531ms
  http-mitm-proxy https server started for tag.aticdn.net on 37617 +2ms
  http-mitm-proxy starting server for tlp-04.kameleoon.com +170ms
  http-mitm-proxy https server started for tlp-04.kameleoon.com on 37600 +2ms
  http-mitm-proxy starting server for www.google-analytics.com +2s
  http-mitm-proxy https server started for www.google-analytics.com on 44490 +2ms

The servers which are open and which listen on a port, have never been closed. They still listening as long as MITM is started.

This strange behavior causes memory saturation problems.

Is there a solution to close these servers or not to create a new server for each domain: To solve this problem: 1- Is it possible to close the server when the client has finished browsing? 2- Is it possible to create only one server used for all the domains?

Thank you

Minyar2004 avatar Sep 29 '20 09:09 Minyar2004