proxy

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: BSD-3-Clause, GPL-3.0, MIT, + 1 more Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy is a forward HTTP/HTTPS proxy that can filter requests.

func NewProxy

func NewProxy(filter filter, certGenerator certGenerator, port int) (*Proxy, error)

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Proxy) Start

func (p *Proxy) Start() (int, error)

Start starts the proxy on the given address.

If Proxy was configured with a port of 0, the actual port will be returned.

func (*Proxy) Stop

func (p *Proxy) Stop() error

Stop stops the proxy.

Jump to

Keyboard shortcuts

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