Documentation
¶
Index ¶
- func AddContextHandler(next http.Handler) http.Handler
- func ClientIP(r *http.Request) string
- func GetCertificateByDomain(helloInfo *tls.ClientHelloInfo) (*tls.Certificate, error)
- func RedirectRequest(w http.ResponseWriter, r *http.Request, location string)
- func RootHandle(w http.ResponseWriter, r *http.Request)
- type WafCert
- type WafData
- type WafHandleRoute
- type WafPolicyInterception
- type WafServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContextHandler ¶
AddContextHandler to add context handler
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 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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.