Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (19 sloc) 563 Bytes
#/opt/node/bin node
{Proxy, Cycler} = require './index'
http = require 'http'
log = require 'node-log'
log.setName 'ipcannon'
# Demo:
range = []
range.push "216.19.216.#{x}" for x in [3..254]
cycler = new Cycler
source: range
proxy = new Proxy
host: ''
port: 80
cycler: cycler
# Event handling
proxy.on 'request', (req) -> log.debug "Proxying request to #{}"
proxy.on 'error', (err, req) -> log.error err
proxy.on 'ready', (host, port) -> "Proxy started on #{host}:#{port}"