Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MatchRegexp ¶
type MatchRegexp struct {
Count uint16 `json:"count,omitempty"`
Hex bool `json:"hex,omitempty"`
Pattern string `json:"pattern,omitempty"`
// contains filtered or unexported fields
}
MatchRegexp is able to match any connections with regular expressions.
func (*MatchRegexp) CaddyModule ¶
func (m *MatchRegexp) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*MatchRegexp) Match ¶
func (m *MatchRegexp) Match(cx *layer4.Connection) (bool, error)
Match returns true if the connection bytes match the regular expression.
func (*MatchRegexp) Provision ¶
func (m *MatchRegexp) Provision(_ caddy.Context) (err error)
Provision parses m's regular expression and sets m's minimum read bytes count.
func (*MatchRegexp) UnmarshalCaddyfile ¶
func (m *MatchRegexp) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile sets up the MatchRegexp from Caddyfile tokens. Syntax:
regexp <pattern> [<count>] [hex]
The optional count and hex arguments may appear in any order. When hex is present, the pattern is matched against an uppercase hexadecimal representation of the bytes instead of the raw bytes.
Click to show internal directories.
Click to hide internal directories.