0.1.2 • Published 7 years ago

rest-node-https-proxy-interceptor v0.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

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

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago