shunt

package
v0.3.1-rc.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BYPASS_DATA []byte

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 Mode

type Mode struct {
	Default  bool
	Mode     bypass.Mode
	Dialer   proxy.Proxy
	Resolver dns.DNS
}

type Shunt

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

func NewShunt

func NewShunt(modes []Mode) *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) (dns.IPRecord, error)

func (*Shunt) Resolver

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

func (*Shunt) Tags

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

func (*Shunt) Update

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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