l4regexp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 3

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.

Jump to

Keyboard shortcuts

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