proxy

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 4 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, ignoredHosts []string) (*Proxy, error)

func (*Proxy) ServeHTTP

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

func (*Proxy) Start

func (p *Proxy) Start() error

Start starts the proxy on the given address.

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