如何让 require('http').createServer().listen(port).on('connect', fn) 在 Openshift 3 Online 上工作?

How to get require('http').createServer().listen(port).on('connect', fn) to work on Openshift 3 Online?

const http = require('http');
const server = http.createServer(...).listen(8080);
server.on('connect', (req, cltSocket, head) => {
  console.log('This step will never be activated!');
  ...
  if (...) {
    let srvSocket = net.connect('9999', '127.0.0.1', () => {
      cltSocket.write('\r\n\r\n');
      srvSocket.write(head);
      srvSocket.pipe(cltSocket);
      cltSocket.pipe(srvSocket);
    });
  }
});

在 Openshift 3 Online 上 require('http').createServer().listen(port).on('connect', fn) 永远不会被激活。有谁知道这种具有挑战性的行为背后的机制以及如何解决它?

P.S。这不是一个真正重复的问题,因为在 "How to open an internal port in Openshift 3 Online" 中问题是关于打开内部端口的。扩展问题是"How to get require('http').createServer().listen(port).on('connect', fn) to work on Openshift 3 Online."

Openshift Online 阻止 'connect' 事件,其反向代理处理它并 returns 502 错误。该事件永远不会到达您的广告连播。