waf

package
v0.0.0-...-1bf96ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2022 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContextHandler

func AddContextHandler(next http.Handler) http.Handler

AddContextHandler to add context handler

func ClientIP

func ClientIP(r *http.Request) string

func GetCertificateByDomain

func GetCertificateByDomain(helloInfo *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificateByDomain ...

func RedirectRequest

func RedirectRequest(w http.ResponseWriter, r *http.Request, location string)

RedirectRequest for example: redirect 80 to 443

func RootHandle

func RootHandle(w http.ResponseWriter, r *http.Request)

Types

type WafCert

type WafCert struct {
	Hostname string
	TlsCert  *tls.Certificate
}

type WafData

type WafData struct {
	// contains filtered or unexported fields
}

type WafHandleRoute

type WafHandleRoute struct {
}

func (*WafHandleRoute) GetWafRoute

func (route *WafHandleRoute) GetWafRoute(r *http.Request) (*waf.WafRouteDto, error)

func (*WafHandleRoute) LoadWafRoute

func (route *WafHandleRoute) LoadWafRoute()

func (*WafHandleRoute) StopLoadWafRoute

func (route *WafHandleRoute) StopLoadWafRoute()

type WafPolicyInterception

type WafPolicyInterception struct {
}

func (*WafPolicyInterception) PolicyInterception

func (policy *WafPolicyInterception) PolicyInterception(w http.ResponseWriter, r *http.Request, tRoute *waf.WafRouteDto) error

type WafServer

type WafServer struct {
	// contains filtered or unexported fields
}

waf server author wuxw

func (*WafServer) InitWafConfig

func (waf *WafServer) InitWafConfig(wafDataDto waf.SlaveWafDataDto) error

func (*WafServer) StartWaf

func (waf *WafServer) StartWaf(wafDataDto waf.SlaveWafDataDto) error

start waf

func (*WafServer) StopWaf

func (waf *WafServer) StopWaf() (err error)

stop waf

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL