Socket
Socket
Sign inDemoInstall

js-proxy

Package Overview
Dependencies
121
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    js-proxy

A multithreaded man-in-the-middle proxy to extract JavaScript from websites and modify it on the fly


Version published
Weekly downloads
73
decreased by-42.97%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#JS-Proxy

A multithreaded man-in-the-middle proxy which captures JavaScript on the fly and lets you modify it using a callback.

##Installation

npm install js-proxy

The callback function is called for each node returned by falafel

var proxy = require('js-proxy');

var options = {};
options.port = 9003;
options.threads = 3;
options.preprocess = function(input){
     // add in your preprocessing logic here
     return input;
};
options.postprocess = function(input){
     // add in your postprocessing logic here
     return input;
};
options.instrument = function(node) {
    if(node.type == "Program") {
   	node.update("'use strict;';\n" + node.source());
    }
}

proxy.start(options);

Keywords

FAQs

Last updated on 08 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc