PHPackages                             turbo124/waf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. turbo124/waf

ActiveLibrary[Security](/categories/security)

turbo124/waf
============

Firewall package

v1.0.0(2y ago)20MITPHP

Since Mar 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/turbo124/waf)[ Packagist](https://packagist.org/packages/turbo124/waf)[ RSS](/packages/turbo124-waf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

Web Application Firewall
========================

[](#web-application-firewall)

A wrapper over the Cloudflare WAF.

Stop threats at the network edge, not at your application.

Ban IP addresses at the network edge
------------------------------------

[](#ban-ip-addresses-at-the-network-edge)

### Initialize the Cloudflare WAF

[](#initialize-the-cloudflare-waf)

```
$zone = The Cloudflare Zone ID
$account_id = The Cloudflare Account ID;
$email = The email address associated with the cloudflare account;
$api_key = The cloudflare API key (must have permissions with write Zone Rulesets and Rules);

```

Init the WAF
------------

[](#init-the-waf)

```
$waf = new \Turbo124\Waf\Waf($api_key, $email, $zone, $account_id);
```

### Ban a IP address

[](#ban-a-ip-address)

```
$waf->unbanIp('103.15.248.112');
```

### Unban a IP Address

[](#unban-a-ip-address)

```
$waf->unbanIp('103.15.248.112');
```

### Ban a ASN

[](#ban-a-asn)

```
$waf->banAsn('10343');
```

### UnBan a ASN

[](#unban-a-asn)

```
$waf->unbanAsn('10343');
```

### Ban a country by their ISO 3166 2 country code

[](#ban-a-country-by-their-iso-3166-2-country-code)

```
$waf->banCountry('DE');
```

### UnBan a country by their ISO 3166 2 country code

[](#unban-a-country-by-their-iso-3166-2-country-code)

```
$waf->unbanCountry('DE');
```

### Managed challenge a IP Address

[](#managed-challenge-a-ip-address)

```
$waf->challengeIp('103.15.248.112');
```

### Disable managed challenge on a IP Address

[](#disable-managed-challenge-on-a-ip-address)

```
$waf->unchallengeIp('103.15.248.112');
```

Bonus intelligence helpers.
---------------------------

[](#bonus-intelligence-helpers)

Cloudflare providers some nifty intelligence metrics on certain domains and IP addresses and can provide risk ratings

### Get Domain Information

[](#get-domain-information)

```
$waf->meta->getDomainInfo('example.com');
```

#### Response

[](#response)

```
[
  "domain" => "puabook.com",
  "ip" => "51.254.35.55",
  "risk_type_string" => "Parked & For Sale Domains,Security Risks",
  "risk_type" => [
    [
      "id" => 128,
      "super_category_id" => 32,
      "name" => "Parked & For Sale Domains",
    ],
    [
      "id" => 32,
      "name" => "Security Risks",
    ],
  ],
  "content_catgories" => [],
  "content_category_string" => "",
]
```

### Get IP Information

[](#get-ip-information)

```
$waf->meta->getIpInfo('210.140.43.55');
```

#### Response

[](#response-1)

```
[
  "ip" => "210.140.43.55",
  "asn" => 4694,
  "country" => "JP",
  "risk_types" => [],
]
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

772d ago

Major Versions

v0.0.1 → v1.0.02024-03-28

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5827962?v=4)[David Bomba](/maintainers/turbo124)[@turbo124](https://github.com/turbo124)

---

Top Contributors

[![turbo124](https://avatars.githubusercontent.com/u/5827962?v=4)](https://github.com/turbo124 "turbo124 (23 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/turbo124-waf/health.svg)

```
[![Health](https://phpackages.com/badges/turbo124-waf/health.svg)](https://phpackages.com/packages/turbo124-waf)
```

###  Alternatives

[spatie/ssl-certificate-chain-resolver

SSL certificate chain resolver

3069.6k](/packages/spatie-ssl-certificate-chain-resolver)[dgtlss/warden

A Laravel package that proactively monitors your dependencies for security vulnerabilities by running automated composer audits and sending notifications via webhooks and email

8745.6k](/packages/dgtlss-warden)[icawebdesign/hibp-php

PHP library for accessing the Have I Been Pwned API.

2545.6k2](/packages/icawebdesign-hibp-php)[ymirapp/cli

Ymir command-line tool

2619.6k](/packages/ymirapp-cli)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
