agency

package module
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const RESPONSE_BUF_SIZ = 512

Variables

This section is empty.

Functions

func ReverseServe

func ReverseServe(network string, tlsCfg *tls.Config, quicConf *quic.Config, handle http.Handler)

func ReverseTrans added in v0.0.15

func ReverseTrans(network string, tlsCfg *tls.Config, quicConf *quic.Config, upstream string)

Types

type FullDuplexStream

type FullDuplexStream interface {
	io.ReadWriteCloser
	SetDeadline(t time.Time) error
	SetReadDeadline(t time.Time) error
	SetWriteDeadline(t time.Time) error
}

type Proxy

type Proxy struct {
	TlsCfg       *tls.Config
	QuicConf     *quic.Config
	BufSiz       int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	// contains filtered or unexported fields
}

func New

func New(crt, key, ca string, bufsiz, rTimeout, wTimeout int) (*Proxy, error)

func (*Proxy) ListenAndServe

func (p *Proxy) ListenAndServe(comeFrom, upStream string) error

type Response

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

func (*Response) Flush added in v0.0.12

func (resp *Response) Flush(body []byte) (int, error)

func (*Response) Header

func (resp *Response) Header() http.Header

func (*Response) Write

func (resp *Response) Write(body []byte) (int, error)

func (*Response) WriteHeader

func (resp *Response) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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