Skip to content

Instantly share code, notes, and snippets.

View 0xnandhi's full-sized avatar

Balasubramanian Achuthan 0xnandhi

View GitHub Profile
@0xnandhi
0xnandhi / script-inject-http-proxy.js
Created July 8, 2017 17:24 — forked from amontalenti/script-inject-http-proxy.js
script injecting proxy for Node.JS
var httpProxy = require('http-proxy');
var url = require('url');
httpProxy.createServer(function(req, res, proxy) {
var isHtml = false,
write = res.write,
writeHead = res.writeHead,
params = url.parse(req.url, true).query,
dest = params.dest || 'localhost',