modsecurity

package module
v0.0.0-...-a412509 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

go-modsecurity

Go Modsecurity Library

The Original code is at https://github.com/Freeaqingme/diato

This library has been forked as a separate repo to be updated and used by other projects and will be moved to a better repository in a future, please be careful while using it

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modsecurity

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

func NewModsecurity

func NewModsecurity() (*Modsecurity, error)

func (*Modsecurity) NewRuleSet

func (m *Modsecurity) NewRuleSet() *RuleSet

func (*Modsecurity) SetServerLogCallback

func (m *Modsecurity) SetServerLogCallback(callback func(string))

func (*Modsecurity) WhoAmI

func (m *Modsecurity) WhoAmI() string

Return information about this ModSecurity version and platform.

type RuleSet

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

func (*RuleSet) AddFile

func (r *RuleSet) AddFile(path string) error

func (*RuleSet) AddRules

func (r *RuleSet) AddRules(rules string) error

func (*RuleSet) NewTransaction

func (r *RuleSet) NewTransaction(remoteAddr, localAddr string) (*transaction, error)

NewTransaction Create a new transaction for a given configuration and ModSecurity core.

The transaction is the unit that will be used the inspect every request. It holds all the information for a given request.

Remember to cleanup the transaction when the transaction is complete using Cleanup()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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