resolver

package
v1.0.15-dev Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: ISC Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedResolver

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

CachedResolver implements socks5.Resolver with automatic cache cleanup.

func NewCachedResolver

func NewCachedResolver(ttl time.Duration) *CachedResolver

NewCachedResolver creates a new resolver with cache TTL.

func (*CachedResolver) Resolve

func (r *CachedResolver) Resolve(ctx context.Context, name string) (context.Context, net.IP, error)

Resolve implements the socks5.Resolver interface.

func (*CachedResolver) Stop

func (r *CachedResolver) Stop()

Stop terminates the background cleanup goroutine.

Jump to

Keyboard shortcuts

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