PHPackages                             asmithsummer/roadblock\_country - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. asmithsummer/roadblock\_country

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

asmithsummer/roadblock\_country
===============================

Extends roadblock to provide country support

1.1.8(9mo ago)077BSD-3-ClausePHP

Since Oct 4Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/aSmithSummer/roadblock_country)[ Packagist](https://packagist.org/packages/asmithsummer/roadblock_country)[ RSS](/packages/asmithsummer-roadblock-country/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (21)Used By (0)

Roadblocks Country Silverstripe module
======================================

[](#roadblocks-country-silverstripe-module)

This module extends the Roadblocks module, providing configurable country identification.

The country IP ranges can be obtained from many third party providers, but the IP address from and to needs converting to a number before setting up. For example 0.0.0.0 is the number 0, while 255.255.255.255 is 4,294,967,296 (256 x 256 x 256 x 256)

Logs
----

[](#logs)

The country name is added to the request for each request. This way you can add classifications such as 'outside nz' to any IP range not in NZ.

Rules
-----

[](#rules)

Roadblock rules gain four new fields:

- Country:- the text representation of the country loaded
- Country allowed:- checkbox that reverses the log, ie allow vs deny
- Country number:- the number of requests with the country present
- Country offset:- the time in seconds to look back over requests

Model Admin
-----------

[](#model-admin)

A new country ip ranges model admin to manage the country ip ranges. This has bulk import and export functionality.

Test 'inspectors'
-----------------

[](#test-inspectors)

The roadblock rule inspectors model admin tab can specify the name of a country. // TODO add country ip to the request log test tab.

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

[](#installation)

```
composer require asmithsummer/roadblock_country
```

Example configuration
---------------------

[](#example-configuration)

As we are setting a new session for un-authenticated members, to prevent new sessions being created when they log in you should set login\_recording to true. This is not fool proof but a big improvement.

in your app's base \_config add the following:

```
---
Name: app_roadblock_country_settings
After: roadblock_country_settings
---
aSmithSummer\RoadblockCountry\Model\CountryIPRange:
  default_country_name: 'Outside New Zealand'
```

License
-------

[](#license)

See [License](LICENSE.md)

This module template defaults to using the "BSD-3-Clause" license. The BSD-3 license is one of the most permissive open-source license and is used by most Silverstripe CMS module.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance58

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.2% 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 ~42 days

Recently: every ~104 days

Total

17

Last Release

277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3d7b3240768c19659a792f89e4aa6894852f1ebcfdf7a9b9025c0e11d352430?d=identicon)[aSmithSummer](/maintainers/aSmithSummer)

---

Top Contributors

[![aSmithSummer](https://avatars.githubusercontent.com/u/68306498?v=4)](https://github.com/aSmithSummer "aSmithSummer (47 commits)")[![smizmo](https://avatars.githubusercontent.com/u/11566021?v=4)](https://github.com/smizmo "smizmo (4 commits)")

---

Tags

silverstripecms

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/asmithsummer-roadblock-country/health.svg)

```
[![Health](https://phpackages.com/badges/asmithsummer-roadblock-country/health.svg)](https://phpackages.com/packages/asmithsummer-roadblock-country)
```

###  Alternatives

[axllent/silverstripe-cms-tweaks

Several CMS usability improvements

1826.2k1](/packages/axllent-silverstripe-cms-tweaks)

PHPackages © 2026

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