NAME

CrowdSec::Client - CrowdSec client

SYNOPSIS

use CrowdSec::Client;
my $client = CrowdSec::Client->new({
  machineId => "myid",
  password  => "mypass",
  baseUrl   => "http://127.0.0.1:8080",
  autoLogin => 1;
});
$client->banIp({
  ip       => '1.2.3.4',
  duration => '5h',            # default 4h
  reason   => 'Ban by my app', # default: 'Banned by CrowdSec::Client'
}) or die( $client->error );

DESCRIPTION

CrowdSec::Client is a simple CrowdSec Watcher. It permits to ban an IP

SEE ALSO

https://crowdsec.net/

AUTHOR

Xavier Guimard <xguimard@linagora.mu>

COPYRIGHT AND LICENSE

Copyright (C) 2023 by Linagora <https://linagora.com>

License: AGPL-3.0 (see LICENSE file)