Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngatngay/firewall-php
DQH Firewall Mod
https://github.com/ngatngay/firewall-php
Last synced: 11 days ago
JSON representation
DQH Firewall Mod
- Host: GitHub
- URL: https://github.com/ngatngay/firewall-php
- Owner: ngatngay
- Created: 2019-06-27T00:26:04.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T12:28:08.000Z (about 2 years ago)
- Last Synced: 2024-12-21T04:36:46.656Z (about 1 month ago)
- Language: PHP
- Size: 68.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Firewall for PHP
DQH Firewall Mod
## Yêu cầu
- PHP 7.4+ (Chưa kiểm tra trên các phiên bản PHP khác :))
## Cài đặt
```
composer require ngatngay/firewall-php:dev-main
```## Sử dụng
```php
new \NgatNgay\Firewall([
// Danh Sách Tên Miền Cho Phép POST (để domain của bạn)
'firewall_domains' => [
'buidoi.net',
'www.buidoi.net',
'localhost',
'ngatngay.gq'
],// Luôn bật tường lửa 2 lớp: 1 - tắt: 0
'firewall_2nd_layer' => 1,// Thời gian đợi sau mỗi đợt request
'firewall_wait_time' => 20,// Số Request tối đa trong 1 đợt
'firewall_penalty_allow' => 5,// Giới hạn khóa IP nếu lượng request vượt qua số này trong 1 phút
'firewall_request_to_block_in_min' => 200,// Thời gian đợi (ms)
'firewall_wait_allow' => 3000
]);
```## Demo
- index.php