net

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	SO_ORIGINAL_DST = 80
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CAPool

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

func NewCAPool

func NewCAPool() (*CAPool, error)

func (*CAPool) CACertPEM

func (p *CAPool) CACertPEM() []byte

func (*CAPool) GetCertificate

func (p *CAPool) GetCertificate(serverName string) (*tls.Certificate, error)

type HTTPInterceptor

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

func NewHTTPInterceptor

func NewHTTPInterceptor(pol *policy.Engine, events chan api.Event, caPool *CAPool) *HTTPInterceptor

func (*HTTPInterceptor) HandleHTTP

func (i *HTTPInterceptor) HandleHTTP(guestConn net.Conn, dstIP string, dstPort int)

func (*HTTPInterceptor) HandleHTTPS

func (i *HTTPInterceptor) HandleHTTPS(guestConn net.Conn, dstIP string, dstPort int)

type NFTablesNAT

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

func NewNFTablesNAT

func NewNFTablesNAT(tapInterface string) *NFTablesNAT

func (*NFTablesNAT) Cleanup

func (n *NFTablesNAT) Cleanup() error

func (*NFTablesNAT) Setup

func (n *NFTablesNAT) Setup() error

type NFTablesRules

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

func NewNFTablesRules

func NewNFTablesRules(tapInterface, gatewayIP string, httpPort, httpsPort int) *NFTablesRules

func (*NFTablesRules) Cleanup

func (r *NFTablesRules) Cleanup() error

func (*NFTablesRules) Setup

func (r *NFTablesRules) Setup() error

type ProxyConfig

type ProxyConfig struct {
	BindAddr  string // Address to bind (e.g., "192.168.100.1")
	HTTPPort  int    // Port for HTTP interception (e.g., 8080)
	HTTPSPort int    // Port for HTTPS interception (e.g., 8443)
	Policy    *policy.Engine
	Events    chan api.Event
	CAPool    *CAPool
}

type TransparentProxy

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

func NewTransparentProxy

func NewTransparentProxy(cfg *ProxyConfig) (*TransparentProxy, error)

func (*TransparentProxy) BindAddr

func (tp *TransparentProxy) BindAddr() string

func (*TransparentProxy) Close

func (tp *TransparentProxy) Close() error

func (*TransparentProxy) HTTPPort

func (tp *TransparentProxy) HTTPPort() int

func (*TransparentProxy) HTTPSPort

func (tp *TransparentProxy) HTTPSPort() int

func (*TransparentProxy) Start

func (tp *TransparentProxy) Start()

Jump to

Keyboard shortcuts

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