proxy

package
v0.0.0-...-1c66c14 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hijack

func Hijack(w http.ResponseWriter) (net.Conn, error)

Types

type BufConn

type BufConn struct {
	net.Conn
	io.Reader
}

func Client

func Client(ctx context.Context, conn net.Conn, host string) (*BufConn, error)

func (*BufConn) Read

func (c *BufConn) Read(p []byte) (n int, err error)

func (*BufConn) Write

func (c *BufConn) Write(b []byte) (n int, err error)

type Forwarder

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

func NewForwarder

func NewForwarder() *Forwarder

func (*Forwarder) CollectMetrics

func (f *Forwarder) CollectMetrics(w *bufio.Writer)

func (*Forwarder) Errors

func (f *Forwarder) Errors() <-chan error

func (*Forwarder) Forward

func (f *Forwarder) Forward(accepted net.Conn, dialed net.Conn)

func (*Forwarder) Shutdown

func (f *Forwarder) Shutdown()

Jump to

Keyboard shortcuts

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