Documentation ¶
Index ¶
- Variables
- type Device
- type FakeUDPConn
- type Stack
- func (s *Stack) Handle(conn *core.TCPConn, target *net.TCPAddr)
- func (s *Stack) HandleMessage(m *dns.Msg)
- func (s *Stack) HandlePacket(conn *core.UDPConn, target *net.UDPAddr)
- func (s *Stack) HandleQuery(conn *core.UDPConn)
- func (s *Stack) LookupAddr(addr net.Addr) (net.Addr, error)
- func (s *Stack) LookupIP(addr net.IP) (*socks.Addr, error)
- func (s *Stack) Start(dev Device, lg logger.Logger, mtu int) error
- type UDPConn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFake is ... ErrNotFake = errors.New("not fake") // ErrNotFound is ... ErrNotFound = errors.New("not found") )
Functions ¶
This section is empty.
Types ¶
type FakeUDPConn ¶
FakeUDPConn is ...
func NewFakeUDPConn ¶
NewFakeUDPConn is ...
type Stack ¶
type Stack struct { // Stack is ... core.Stack // Handler is ... Handler gonet.Handler // Hijack is ... Hijack bool // contains filtered or unexported fields }
Stack is core.Handler
func NewStack ¶
func NewStack(handler gonet.Handler, resolver resolver.Resolver, tree *suffixtree.DomainTree, matcher geosite.Matcher, hijack bool) *Stack
NewStack is ....
func (*Stack) HandleMessage ¶
HandleMessage handles dns.Msg
func (*Stack) HandlePacket ¶
HandlePacket handles core.UDPConn
func (*Stack) HandleQuery ¶
HandleQuery handles dns queries
func (*Stack) LookupAddr ¶
LookupAddr converts fake ip to real domain address
Click to show internal directories.
Click to hide internal directories.