shunt

package
v0.3.1-rc.9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 20 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   proxy.Proxy
	DirectResolver proxy.Resolver
	ProxyDialer    proxy.Proxy
	ProxyResolver  proxy.Resolver
	BlockDialer    proxy.Proxy
	BLockResolver  proxy.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 proxy.Address) (net.Conn, error)

func (*Shunt) Dispatch

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

func (*Shunt) Do

func (f *Shunt) Do(ctx context.Context, addr string, b []byte) ([]byte, error)

func (*Shunt) LookupIP

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

func (*Shunt) PacketConn

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

func (*Shunt) Record

func (f *Shunt) Record(ctx context.Context, domain string, t dnsmessage.Type) ([]net.IP, uint32, error)

func (*Shunt) Resolver

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

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