I'm redesigning my node-red-contrib-http-logger to use the mitm library for intercepting http(s) traffic. However after debugging a few evenings, it became at the end clear that I'm only allowed to create 1 mitm instance:
var Mitm = require("mitm"); var mitm = new Mitm();
A user should be able to add multiple logger nodes to his flow (node1 to listen for requests to host1, node2 to listen for requests to host2, ....). But they all have to share this single instance.