httptables is a based on the OpenResty, kind of a firewall for http requests based on headers. It parses a set of rules for each HTTP header and apply the matching policy. Policy using Restful interface management, easy enough to integration with the third party system(User behavior analysis system).
proxy port
: 8000admin port
: 10983
Design details please click OUTLINE.md。
- Httptables: implemented
- Httptables-Manager: implemented
- User-Behavior-Analysis: not implemented
In her world, each client has three separate identity, and each is unique
Origin
The source address of clientUser
The User IDDevice
The Device ID
The User and Device, retrieve from request's header, you can customize the getattr function, see more
NB: By default, this module makes the assumption your request contain two headers,
X-Device-ID
andX-User-ID
Support the following actions
- circuit breakers
- Reject Blocking the user requests, return the response of custom content
- speed bump
- Defer SLowing down of the request of the user
- other
- user defined
Please click INSTALL.md to view the installation documentation
open lua/config.py and modify the contents of the httptables-manager-ip
_M.http_endpoint.rule_types = "http://httptables-manager-ip:10085/apis/rule_types/"
_M.http_endpoint.rules = "http://httptables-manager-ip:10085/apis/rules/"
Thank you for the following open source projects
-
OpenResty
OpenResty™ is a full-fledged web platform by integrating the standard Nginx core, LuaJIT, many carefully written Lua libraries, lots of high quality 3rd-party Nginx modules, and most of their external dependencies. It is designed to help developers easily build scalable web applications, web services, and dynamic web gateways.
-
Kong
Kong is a scalable, open source API Layer (also known as an API Gateway, or API Middleware). Kong runs in front of any RESTful API and is extended through Plugins, which provide extra functionalities and services beyond the core platform.