agency

package module
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_LEV_ERR   = 0
	LOG_LEV_WARN  = 1
	LOG_LEV_INFO  = 2
	LOG_LEV_DEBUG = 4
)
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, timeout time.Duration)

func SetLogLev added in v0.0.20

func SetLogLev(lev int)

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
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	// contains filtered or unexported fields
}

func New

func New(crt, key, ca string, 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