nodejs - Error: connect ECONNREFUSED 127.0.0.1:80 with http-proxy module

Viewed 1193

I'm using http-proxy npm module to create a proxy server to intercept and mirroring the requests from an app. After starting the server, I will run the app with this command from cli

open /Users/dev/Applications/Opey\ Go.app/ --args --proxy-server=127.0.0.1:8080 --ignore-certificate-errors

The app will open but what is happening is that I get this error in console

Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 80
}

How I can fix this?I just want to intercept the app traffic before mirroring it to the requested url.

0 Answers
Related