proxy

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	Dial(context.Context, *addr.Addr) (net.Conn, error)
}
var DirectDialer Dialer = DialerFunc(func(ctx context.Context, a *addr.Addr) (net.Conn, error) {
	var d net.Dialer
	return d.DialContext(ctx, "tcp", a.String())
})

type DialerFunc

type DialerFunc func(context.Context, *addr.Addr) (net.Conn, error)

func (DialerFunc) Dial

func (f DialerFunc) Dial(ctx context.Context, h *addr.Addr) (net.Conn, error)

type Logger

type Logger interface {
	Error(msg string, fields ...any)
	Info(msg string, fields ...any)
}
var DiscardLogger Logger = discardLogger{}

func NewContextLogger

func NewContextLogger(l Logger, fields ...any) Logger

type Tunneler added in v1.2.0

type Tunneler interface {
	Tunnel(ctx context.Context, srcConn, dstConn net.Conn) error
}
var DefaultTunneler Tunneler = &defaultTunneler{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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