New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rest-node-https-proxy-interceptor

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rest-node-https-proxy-interceptor

https proxy for the rest node client

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

rest node https proxy interceptor

this is a plugin for the cujojs/rest module. what this plugin does is add support for using an HTTPS proxy.

this plugin ONLY works with the node client of cujojs/rest.

Install

npm install rest-node-https-proxy-interceptor

Proxy

to use this you need to have a proxy running, for example squid. Change the url accordingly!

An online list of free SSL/HTTPS proxies can be found here

Usage

var rest = require("rest/client/node")
var restHttpsProxy = require("rest-node-https-proxy-interceptor")

var client = rest.wrap(restHttpsProxy, {
    url: "http://127.0.0.1:3128" // you can also use tcp://127.0.0.1:3128
})

client('https://nodejs.org/en/').then(function(response) {
    // response will contain the html of https://nodejs.org/en/
    // and the HTTPS request/response will be proxied through http://127.0.0.1:3128
});

How is it possible to proxy HTTPS?

You can proxy HTTPS requests through a proxy by using a so called HTTP CONNECT Tunnel. You can read more about it here:

Test

npm test

License

MIT

Keywords

rest

FAQs

Package last updated on 13 Feb 2017

Did you know?

Socket

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