proxy

package
v0.0.0-...-b1c8142 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlushWriter

type FlushWriter interface {
	io.Writer
	http.Flusher
}

type Proxy

type Proxy struct {
	ReadCount  uint64
	WriteCount uint64
	// contains filtered or unexported fields
}

func New

func New(host string, cert string) *Proxy

func (*Proxy) AddTranscoder

func (p *Proxy) AddTranscoder(contentType string, transcoder Transcoder)

func (*Proxy) EnableMitm

func (p *Proxy) EnableMitm(ca, key string) error

func (*Proxy) ServeHTTP

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

func (*Proxy) SetAuthentication

func (p *Proxy) SetAuthentication(user, pass string)

func (*Proxy) Start

func (p *Proxy) Start(host string) error

func (*Proxy) StartTLS

func (p *Proxy) StartTLS(host, cert, key string) error

type ResponseReader

type ResponseReader struct {
	io.Reader
	// contains filtered or unexported fields
}

func (*ResponseReader) ContentType

func (r *ResponseReader) ContentType() string

func (*ResponseReader) Header

func (r *ResponseReader) Header() http.Header

func (*ResponseReader) Request

func (r *ResponseReader) Request() *http.Request

type ResponseWriter

type ResponseWriter struct {
	io.Writer
	// contains filtered or unexported fields
}

func (*ResponseWriter) Header

func (w *ResponseWriter) Header() http.Header

func (*ResponseWriter) ReadFrom

func (w *ResponseWriter) ReadFrom(r io.Reader) error

func (*ResponseWriter) Write

func (w *ResponseWriter) Write(b []byte) (int, error)

func (*ResponseWriter) WriteHeader

func (w *ResponseWriter) WriteHeader(s int)

type Transcoder

type Transcoder interface {
	Transcode(*ResponseWriter, *ResponseReader, http.Header) error
}

Jump to

Keyboard shortcuts

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