Documentation ¶ Index ¶ type Dialer type DialerFunc func (f DialerFunc) Dial(ctx context.Context, h *addr.Addr) (net.Conn, error) type Logger func NewContextLogger(l Logger, fields ...any) Logger type Tunneler 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{} Source Files ¶ View all Source files dialer.gologger.gotunneler.go Directories ¶ Show internal Expand all Path Synopsis addr client mocks router server socks Click to show internal directories. Click to hide internal directories.