proxy

package
v0.0.0-...-9d84085 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 9 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 an multiple-host SNI-based reverse proxy

func New

func New() *Proxy

New returns a new proxy with default configuration

func (*Proxy) AddHost

func (p *Proxy) AddHost(sni string, addr string) error

AddHost adds a target host to the proxy

func (*Proxy) ListenAndServeTLS

func (p *Proxy) ListenAndServeTLS(addr string) error

ListenAndServeTLS starts the proxy server

func (*Proxy) RemoveHost

func (p *Proxy) RemoveHost(sni string) error

RemoveHost removes a target host from the proxy

func (*Proxy) WithCertificateManager

func (p *Proxy) WithCertificateManager(cm certmgr.CertificateManager) *Proxy

WithCertificateManager sets the proxy's certificate manager

func (*Proxy) WithHostManager

func (p *Proxy) WithHostManager(hm hostmgr.HostManager) *Proxy

WithHostManager sets the proxy's host manager

func (*Proxy) WithRequestMiddleware

func (p *Proxy) WithRequestMiddleware(rm reqmw.RequestMiddleware) *Proxy

WithRequestMiddleware sets the proxy's request-processing middleware

func (*Proxy) WithResponseMiddleware

func (p *Proxy) WithResponseMiddleware(rm respmw.ResponseMiddleware) *Proxy

WithResponseMiddleware sets the proxy's response-processing middleware

Jump to

Keyboard shortcuts

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