定制 asmithsummer/roadblock_country 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

asmithsummer/roadblock_country

最新稳定版本:1.1.8

Composer 安装命令:

composer require asmithsummer/roadblock_country

包简介

Extends roadblock to provide country support

README 文档

README

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

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

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

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

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

composer require asmithsummer/roadblock_country

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

See License

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.

统计信息

  • 总下载量: 77
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-06-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固