mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-23 15:10:25 +08:00
WAF增加多个动作
This commit is contained in:
25
internal/waf/action_interface.go
Normal file
25
internal/waf/action_interface.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package waf
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ActionInterface interface {
|
||||
// Init 初始化
|
||||
Init(waf *WAF) error
|
||||
|
||||
// Code 代号
|
||||
Code() string
|
||||
|
||||
// IsAttack 是否为拦截攻击动作
|
||||
IsAttack() bool
|
||||
|
||||
// WillChange determine if the action will change the request
|
||||
WillChange() bool
|
||||
|
||||
// Perform perform the action
|
||||
Perform(waf *WAF, group *RuleGroup, set *RuleSet, request requests.Request, writer http.ResponseWriter) (allow bool)
|
||||
}
|
||||
Reference in New Issue
Block a user