http-party / node-http-proxy

A full-featured http proxy for node.js
https://github.com/http-party/node-http-proxy
Other
13.89k stars 1.97k forks source link

Add support to modify the proxyRes body's data, to act like a MITM interceptor proxy #1191

Open chenzx opened 7 years ago

chenzx commented 7 years ago

The testing scene is:

I have a embeded device, and i can not set global http proxy on it, and i run a webapp on it, which sends AJAX requests and gets JSON response.

I need to capture the real request-response flows between the embedded box and the remote web server. To do this, i need to modify all the url string in JSON from orginal "http://outsideserver/..." to "http://MITM-proxy-server/http://outsideserver/...“

That is to say, i need a MITM interceptor proxy, can i do this on the code base of http-proxy?

smalot commented 7 years ago

+1