Giter Site home page Giter Site logo

bouncer's Introduction

Introduction
------------

Bouncer is a real time statistics and security engine written in PHP.

It's designed to be called when your PHP request starts. Everything that can be cached is cached, so there should not be any performance issue. Actually your server is supposed to run faster with it, because it doesn't have to serve junk traffic anymore.

How does it operate? It first analyse what the agent claim to be, if it's a browser, a bot, which browser, which version. At the same time, it also compute an unique fingerprint based on the User-Agent and several common HTTP headers.

After that, it scores the agent, comparing what it claim to be, with how it's supposed to act. For example, Firefox is supposed to send several HTTP headers, Googlebot is supposed to operate from given IP adresses. It also compare the agent fingerprint with a local database, filled with thousand fingerprints of known, good, bad and suspicious agents.

Bouncer ship with an addictive visual dashboard to easily screen the traffic currently happening on your server.

Bouncer is currently running in production on several websites and we're very happy with how it performs.

Bouncer is proudly inspirated/derivated from the Bad Behavior and BBClone projects.

http://www.bbclone.de/
http://www.bad-behavior.ioerror.us/

Requirements
------------

There is no dependency, the Bouncer code use basic PHP.

EXCEPT, the default backend, which need the Memcache PHP extension and a memcache server running on localhost.

Bouncer is not supposed to be PHP4 compatible.

Licence
-------

Bouncer original code is licensed under the GPL and MIT licenses.

Installation
------------

Add the bouncer code as soon as you can in your PHP script:

    require_once 'Bouncer/Bouncer.php';
    Bounce::run(array('namespaces' => array('siteid')));

To output statistics, use the following code in a PHP file:

    require_once 'Bouncer/Bouncer.php';
    Bouncer::stats(array('namespace' => 'siteid'));

To use additional Rules, load Rules before you run:

    require_once 'Bouncer/Bouncer.php';
    require_once 'Bouncer/Rules/Httpbl.php';
    Bouncer_Rules_Httpbl::load(array('api_key' => 'myapikey'));
    Bounce::run(array('namespaces' => array('siteid')));

Dashboard
---------

You can type queries in the dashboard search field.

Filter by type:

  type:browser
  type:robot

Filter by status:

  status:nice
  status:neutral
  status:suspicious
  status:bad

Filter by name:

  name:firefox
  name:google

Negative filters:

  -name:explorer
  -status:bad

Advanced queries:

  type:browser -status:bad
  extension:fr system:macosx name:chrome

You may also try these keys: fingerprint, host, extension, signature, name, version, system, system_version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.