Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including rainbowsocks-http with all npm packages installed. Try it out:

var rainbowsocksHttp = require("rainbowsocks-http")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

rainbowsocks-http v0.0.0

http interface for tunneling though a SOCKS4a proxy

rainbowsocks-http

Similar to node.js's http interface tunneling though a SOCKS4a proxy

Install

npm install rainbowsocks-http

API

var http = require('rainbowsocks-http')(socksPort [, socksHost || '127.0.0.1']);

http.request is the only method available currently with very basic options support.

Example

// var http = require('rainbowsocks-http')(socksPort [, socksHost || '127.0.0.1']);
var http = require('./')(9050);

var req = http.request('http://github.com', function(res) {
  console.log('statusCode: ', res.statusCode);
  console.log('headers: ', res.headers);
  res.on('data', function(data) {
    console.log(data);
  });
});

req.on('error', function(err) {
  console.log('oh no: ', err);
});

Licence

MIT

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free