0.0
No commit activity in last 3 years
No release in over 3 years
Carnivore HTTP source
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 0.5.0
< 2.0, >= 1.0.0
~> 2.0.0
~> 2.13.4
~> 1.6.4
 Project Readme

Carnivore HTTP

Provides HTTP Carnivore::Source

Usage

HTTP

All requests are processed via single source

require 'carnivore'
require 'carnivore-http'

Carnivore.configure do
  source = Carnivore::Source.build(
    :type => :http,
    :args => {
      :port => 8080
    }
  )
end

HTTP with configured end points

All point builder definitions are hooked into source:

require 'carnivore'
require 'carnivore-http'

Carnivore.configure do
  source = Carnivore::Source.build(
    :type => :http_endpoints,
    :args => {
      :auto_respond => false
    }
  )
end.start!

HTTP paths

Multiple sources share same listener, and incoming messages are matched based on HTTP method + path

require 'carnivore'
require 'carnivore-http'

Carnivore.configure do
  source = Carnivore::Source.build(
    :type => :http_paths,
    :args => {
      :port => 8080,
      :path => '/test',
      :method => 'get'
    }
  )
end

Available options for :args

  • :bind address to bind
  • :port port to listen
  • :auto_respond confirm request immediately
  • :ssl ssl configuration
    • :cert path to cert file
    • :key path to key file
  • :authorization access restrictors
    • :allowed_origins list of IP or IP ranges
    • :htpasswd htpasswd for authentication
    • :credentials username/password key pair for authentication
    • :valid_on 'any' match any restrictor, 'all' match all restrictors
  • :endpoint specific uri to transmit (can include auth + path)
  • :method HTTP method for transmission

Info