hostfilter

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostFilter

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

HostFilter controls which hosts are intercepted (MITM) vs tunneled.

func New

func New(block, allow []string) *HostFilter

New creates a HostFilter. If allow is non-empty, only allowed hosts are intercepted; block is ignored. If only block is set, all hosts except blocked ones are intercepted.

func (*HostFilter) RuleCount

func (hf *HostFilter) RuleCount() int

RuleCount returns the total number of active rules.

func (*HostFilter) ShouldIntercept

func (hf *HostFilter) ShouldIntercept(host string) bool

ShouldIntercept returns true if the host should be MITM intercepted.

Jump to

Keyboard shortcuts

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