Skip to content
This repository has been archived by the owner on Jul 23, 2023. It is now read-only.
/ shadowd_perl Public archive

A Shadow Daemon connector for Perl applications


Notifications You must be signed in to change notification settings


Repository files navigation


Build Status

Shadow Daemon is a web application firewall that intercepts requests at the application level. This repository contains a component of Shadow Daemon to connect Perl applications with the shadowd server.


For the full documentation please refer to


You can install the modules with CPAN:

cpan -i Shadowd::Connector

It is also possible to clone this repository and install the modules manually:

perl Makefile.PL
make install

You also have to create a configuration file. You can copy misc/examples/connectors.ini to /etc/shadowd/connectors.ini. The example configuration is annotated and should be self-explanatory.


To protect CGI applications you simply have to load the module:

use Shadowd::Connector::CGI;

This can be automated by executing Perl scripts with:

perl -mShadowd::Connector::CGI


Mojolicious applications require a small modification. It is necessary to create a hook to intercept requests:

use Shadowd::Connector::Mojolicious;

sub startup {
  my $app = shift;

  $app->hook(before_dispatch => sub {
    my $self = shift;
    return Shadowd::Connector::Mojolicious->new($self)->start();

  # ...


Mojolicious::Lite applications require a small change as well:

use Shadowd::Connector::Mojolicious;

under sub {
  my $self = shift;
  return Shadowd::Connector::Mojolicious->new($self)->start();

The connector is only executed if the request matches a route.