Documentation
¶
Index ¶
- type BlockInfo
- type NetworkRules
- func (nr *NetworkRules) CreateBlockPageResponse(req *http.Request, appliedRules []rule.Rule, whitelistPort int) (*http.Response, error)
- func (nr *NetworkRules) CreateBlockResponse(req *http.Request) *http.Response
- func (nr *NetworkRules) CreateRedirectResponse(req *http.Request, to string) *http.Response
- func (nr *NetworkRules) ModifyReq(req *http.Request) (appliedRules []rule.Rule, shouldBlock bool, redirectURL string)
- func (nr *NetworkRules) ModifyRes(req *http.Request, res *http.Response) ([]rule.Rule, error)
- func (nr *NetworkRules) ParseRule(rawRule string, filterName *string) (isException bool, err error)
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) CreateBlockPageResponse ¶ added in v0.12.0
func (*NetworkRules) CreateBlockResponse ¶
func (nr *NetworkRules) CreateBlockResponse(req *http.Request) *http.Response
CreateBlockResponse creates a response for a blocked request.
func (*NetworkRules) CreateRedirectResponse ¶
CreateRedirectResponse creates a response for a redirected request.
Click to show internal directories.
Click to hide internal directories.