Versions in this module Expand all Collapse all v1 v1.2.0 Jul 13, 2025 Changes in this version + type Tunneler interface + Tunnel func(ctx context.Context, srcConn, dstConn net.Conn) error + var DefaultTunneler Tunneler = &defaultTunneler{} v1.1.0 Jun 6, 2025 Changes in this version + type Dialer interface + Dial func(context.Context, *addr.Addr) (net.Conn, error) + var DirectDialer Dialer = DialerFunc(func(ctx context.Context, a *addr.Addr) (net.Conn, error) { ... }) + type DialerFunc func(context.Context, *addr.Addr) (net.Conn, error) + func (f DialerFunc) Dial(ctx context.Context, h *addr.Addr) (net.Conn, error) + type Logger interface + Error func(msg string, fields ...any) + Info func(msg string, fields ...any) + var DiscardLogger Logger = discardLogger{} + func NewContextLogger(l Logger, fields ...any) Logger + type Proto int + const ProtoDirect + const ProtoHTTP + const ProtoSOCKS + const ProtoSOCKS4 + const ProtoSOCKS4a + const ProtoSOCKS5 + const ProtoSOCKS5h + func (p *Proto) UnmarshalText(text []byte) error + func (p Proto) MarshalText() ([]byte, error) + func (p Proto) String() string + type Proxy interface + ForwardHTTP func(ctx context.Context, r *http.Request, dstHost *addr.Addr) (*http.Response, error) + OpenTunnel func(ctx context.Context, srcConn net.Conn, dstHost *addr.Addr) (done <-chan error, err error) + func New(d Dialer) Proxy v1.0.0 May 31, 2025