Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 2.46 KB

README.md

File metadata and controls

60 lines (39 loc) · 2.46 KB

httptables (just like Linux's iptables)

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: 8000
  • admin port: 10983

Design details please click OUTLINE.md

Deployment diagram

image

World views

In her world, each client has three separate identity, and each is unique

  • Origin The source address of client
  • User The User ID
  • Device 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 and X-User-ID

Features

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

Install

Please click INSTALL.md to view the installation documentation

Integration with httptables-manager

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/"

Copyleft

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.