coffee-http-proxy

0.1.1 • Public • Published

CoffeeScript HTTP Proxy

Simple HTTP proxy server module.

The proxy module supports:

  • Proxy HTTP and HTTPS protocols
  • Proxying via proxy server
  • Customize behavior for each request (deny, change proxy, change host/port etc.)
  • Customize logging

This module just relay TCP connection according to HTTP Request. Modules are written in CoffeeScript. So proxy module itself (src/proxy.coffee) is small, about 120 lines.

Usage

In CoffeeScript,

proxy = require 'coffee-http-proxy'

server = proxy.createServer()

server.listen 8000, ->
  console.log 'Listening on port', 8000

In JavaScript,

var proxy = require('coffee-http-proxy');

var server = proxy.createServer();

server.listen(8000, function() {
  console.log('Listening on port', 8000);
});

To start proxy server,

proxy [--port 8000] [--proxy host:port] [--verbose]

For more detail, see src/simple-proxy.coffee.

Install

npm install coffee-http-proxy

Development Environment

In the module directory,

  • Install grunt.js: npm install -g grunt
  • Install development dependencies: npm install --dev
  • Build and test: grunt
  • Start watching code editing: grunt watch

Readme

Keywords

none

Package Sidebar

Install

npm i coffee-http-proxy

Weekly Downloads

1

Version

0.1.1

License

none

Last publish

Collaborators

  • kaz080