 
   run: ->
     @summary "Starting..."
+    do @blockPorts
+
     queries = {}
     http.createServer((request, response) ->
       url   = "#{request.headers.host}#{request.url}"

"use strict"

# Libraries
http    = require "http"
colors  = require "colors"
Table   = require "cli-table"

ZenProxy =



      request.pipe proxy, end: true

  blockPorts: ->
    for rule in global.config.rules
      for host in rule.hosts when host.block is true
        childProcess.exec "iptables -A INPUT -p tcp --dport #{host.port} -j DROP"

  summary: (message) ->
    table = new Table head: ["ZENproxy".green + " v0.08.27".grey + " - #{message}"], colWidths: [80]
    console.log table.toString()
