proxy

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 4 more Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedDesktopEnvironment = errors.New("system proxy configuration is currently only supported on GNOME")
)

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