networkrules

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 4 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkRules

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

func NewNetworkRules

func NewNetworkRules() *NetworkRules

func (*NetworkRules) CreateBlockResponse

func (nr *NetworkRules) CreateBlockResponse(req *http.Request) *http.Response

CreateBlockResponse creates a response for a blocked request.

func (*NetworkRules) CreateRedirectResponse

func (nr *NetworkRules) CreateRedirectResponse(req *http.Request, to string) *http.Response

CreateRedirectResponse creates a response for a redirected request.

func (*NetworkRules) ModifyReq

func (nr *NetworkRules) ModifyReq(req *http.Request) (appliedRules []rule.Rule, shouldBlock bool, redirectURL string)

func (*NetworkRules) ModifyRes

func (nr *NetworkRules) ModifyRes(req *http.Request, res *http.Response) []rule.Rule

func (*NetworkRules) ParseRule

func (nr *NetworkRules) ParseRule(rawRule string, filterName *string) (isException bool, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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