shunt

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DOMAIN_MARK_KEY

type DOMAIN_MARK_KEY struct{}

type ForceModeKey

type ForceModeKey struct{}

type IP_MARK_KEY

type IP_MARK_KEY struct{}

func (IP_MARK_KEY) String

func (IP_MARK_KEY) String() string

type Opts

type Opts struct {
	DirectDialer   netapi.Proxy
	DirectResolver netapi.Resolver
	ProxyDialer    netapi.Proxy
	ProxyResolver  netapi.Resolver
	BlockDialer    netapi.Proxy
	BLockResolver  netapi.Resolver
	DefaultMode    bypass.Mode
}

type Shunt

type Shunt struct {
	Opts
	// contains filtered or unexported fields
}

func NewShunt

func NewShunt(opt Opts) *Shunt

func (*Shunt) Close

func (f *Shunt) Close() error

func (*Shunt) Conn

func (s *Shunt) Conn(ctx context.Context, host netapi.Address) (net.Conn, error)

func (*Shunt) Dispatch

func (s *Shunt) Dispatch(ctx context.Context, host netapi.Address) (netapi.Address, error)

func (*Shunt) LookupIP

func (f *Shunt) LookupIP(ctx context.Context, domain string, opts ...func(*netapi.LookupIPOption)) ([]net.IP, error)

func (*Shunt) PacketConn

func (s *Shunt) PacketConn(ctx context.Context, host netapi.Address) (net.PacketConn, error)

func (*Shunt) Raw

func (*Shunt) Resolver

func (s *Shunt) Resolver(ctx context.Context, domain string) netapi.Resolver

func (*Shunt) SearchWithDefault

func (s *Shunt) SearchWithDefault(ctx context.Context, addr netapi.Address, defaultT bypass.ModeEnum) bypass.ModeEnum

func (*Shunt) Tags

func (s *Shunt) Tags() []string

func (*Shunt) Update

func (s *Shunt) Update(c *pc.Setting)

Jump to

Keyboard shortcuts

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