package
0.6.4
Repository: https://github.com/teaoslab/edgenode.git
Documentation: pkg.go.dev

# README

WAF

A basic WAF for TeaWeb.

Config Constructions

WAF
  Inbound
	  Rule Groups
		Rule Sets
		  Rules
			Checkpoint Param <Operator> Value
  Outbound
  	  Rule Groups
  	    ... 				

Apply WAF

Request  -->  WAF  -->   Backends
			/
Response  <-- WAF <----		

Coding

waf := teawaf.NewWAF()

// add rule groups here

err := waf.Init()
if err != nil {
	return
}
waf.Start()

// match http request
// (req *http.Request, responseWriter http.ResponseWriter)
goNext, ruleSet, _ := waf.MatchRequest(req, responseWriter)
if ruleSet != nil {
	log.Println("meet rule set:", ruleSet.Name, "action:", ruleSet.Action)
}
if !goNext {
	return
}

// stop the waf
// waf.Stop()

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

CaptchaCacheKey 获取Captcha缓存Key.
CaptchaDeleteCacheKey 清除计数.
CaptchaIncreaseFails 增加Captcha失败次数,以便后续操作.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewIPList 获取新对象.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewWAFManager 获取新对象.
No description provided by the author

# Constants

allow.
block.
block and show captcha.
No description provided by the author
No description provided by the author
No description provided by the author
针对GET的302重定向认证.
go to next rule group.
go to next rule set.
js cookie.
allow and log.
告警.
显示网页.
针对POST的307重定向认证.
记录IP.
标签.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
10 minutes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
contains binary.
No description provided by the author
ip.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
has key in slice or map.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
not contains binary.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
ActionDefinition action definition.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Get302Action 原理: origin url --> 302 verify url --> origin url TODO 将来支持meta refresh验证.
No description provided by the author
No description provided by the author
No description provided by the author
IPList IP列表管理.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Rule.
rule group.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WAFManager WAF管理器.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author