Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/satrobit/lua-resty-ddos
A sample module for ddos mitigation in OpenResty
https://github.com/satrobit/lua-resty-ddos
Last synced: 3 months ago
JSON representation
A sample module for ddos mitigation in OpenResty
- Host: GitHub
- URL: https://github.com/satrobit/lua-resty-ddos
- Owner: satrobit
- License: mit
- Created: 2019-07-26T14:26:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-11T17:35:17.000Z (over 4 years ago)
- Last Synced: 2024-04-24T00:33:34.432Z (7 months ago)
- Language: Lua
- Homepage:
- Size: 5.86 KB
- Stars: 15
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-resty - lua-resty-ddos
README
Name
====lua-resty-ddos - This library uses Cookie Validation to detect bots from real users.
Table of Contents
=================* [Name](#name)
* [Status](#status)
* [Synopsis](#synopsis)
* [Methods](#methods)
* [run](#run)
* [Installation](#installation)
* [Authors](#authors)Status
======This library is WIP. Please don't use in production!
Synopsis
========
```lua
lua_package_path "/path/to/lua-resty-ddos/lib/?.lua;;";server {
location / {
rewrite_by_lua '
local ddos = require "resty.ddos"
ddos.run("some-key")
';
}
}
```Methods
=======[Back to TOC](#table-of-contents)
run
---
`syntax: ddos:run(key)`Runs the module with the provided key to use in JWT.
[Back to TOC](#table-of-contents)
Installation
============Run the following in the module directory:
```
luarocks make
```You need to configure
the [lua_package_path](https://github.com/chaoslawful/lua-nginx-module#lua_package_path) directive to
add the path of your `lua-resty-ddos` source tree to ngx_lua's Lua module search path, as in```
http {
lua_package_path "/path/to/lua-resty-ddos/lib/?.lua;;";
...
}
```and then load the library in Lua:
```lua
local ck = require "resty.ddos"
```[Back to TOC](#table-of-contents)
Authors
=======Amir Keshavarz .
[Back to TOC](#table-of-contents)