kk-anti-reptile 1.0.0-RELEASE release, anti-crawler assembly

1.0.0-RELEASE release content

  1. Optimization: the refresh request and the authentication process without using the Filter, the servlet to the use of native, does not affect the efficiency of the normal request
  2. Optimization: improve the underlying principle interception, Interceptor spring system by the filter changed, to facilitate follow-up Spring mvc docking support
  3. New: Added a global interception modes, the default non-global interception
  4. New: Added interception mode configuration was not smart tips
  5. New: Added @AntiReptile comment marked interception interfaces support, annotations and profiles simultaneously effect the way
  6. Added: New Interface regular expression matching intercepted support

 kk-anti-reptile reptilian anti components Introduction

Outline

kk-anti-reptile is applied to 基于 spring-boot 开发的分布式系统the interface to open the anti-anti-crawler brush spring boot start assembly.

System Requirements

  • Based on spring-boot Development (spring-boot1.x, spring-boot2.x available)
  • You need to use redis

work process

kk-anti-reptile use  SpringMVC interceptor  request was filtered through a spring-boot extension point mechanism, examples of a Spring HandlerInterceptor Bean, is injected into the container through the Servlet Spring, can be filtered to a request

In the interior of the filter Interceptor kk-anti-reptile, but also by a chain of responsibility pattern, the various filter rules weaving, and to provide an abstract interface, the rules may be extended caller

Interceptor call request filtering the chain, such as filtration is not passed, intercepts the request and returns a status code 509, and outputs the verification code input page, the output code is correct, the rule calls for filtering rules chain reset

The current rule in the chain has the following two rules

ip-rule

ip-rule statistics requests within the current time window through the window of time, less than a specified maximum number of requests can be passed or not passed. Time window, maximum number of requests, ip white list can be configured

ua-rule

ua-rule by determining whether the request carries the User-Agent, to give the operating system, device information, the browser information, etc., of various dimensions may be configured to filter requests

Guess you like

Origin www.oschina.net/news/113306/kk-anti-reptile-1-0-released