Documentation ¶
Index ¶
- func BuildRR(rrList []string, question string, qtype uint16) []dns.RR
- func ConvPTRtoIP(ptr string) string
- func DecodeTypeAResponse(answer []dns.RR) []string
- func Lookup(msg *dns.Msg, server string) (*dns.Msg, error)
- func LookupWithClientEDNS(msg *dns.Msg, server string, client string) (*dns.Msg, error)
- func ReadCfg(filename string) map[string][]string
- func ReadServerListCfg(filename string) []string
- func ReverseString(req string) string
- func RoutedAddress() (string, error)
- type DNSReport
- type ProbeCacheEntry
- type ProbeMetric
- type Proxy
- func (p *Proxy) DomainRouteLookup(req string) []string
- func (p *Proxy) DumpCacheTable()
- func (p *Proxy) GetFromCache(question string, qtype uint16) []string
- func (p *Proxy) GetResponse(req *dns.Msg) (*dns.Msg, error)
- func (p *Proxy) MultipleLookup(msg *dns.Msg, serverList []string) map[string]string
- func (p *Proxy) RandomLookup(msg *dns.Msg, serverList []string) (*dns.Msg, error)
- func (p *Proxy) RenderProbeCacheList(s []string)
- func (p *Proxy) SeqLookup(msg *dns.Msg, serverList []string) (*dns.Msg, error)
- func (p *Proxy) SortByLatency(addrList []string) []string
- func (p *Proxy) TCPPing(dip string, dport uint16)
- func (p *Proxy) TCPProbe()
- func (p *Proxy) TableRender(name string, addrList map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvPTRtoIP ¶
func DecodeTypeAResponse ¶
func LookupWithClientEDNS ¶
LookupWithClientEDNS is used to get the response from external server
func ReadServerListCfg ¶
func ReverseString ¶
func RoutedAddress ¶
Types ¶
type ProbeCacheEntry ¶
type ProbeMetric ¶
type Proxy ¶
type Proxy struct { PTRCache *tsyncmap.Map ProbeChan chan *ProbeMetric LogLevel string ProbeLFUCacheSize int CacheTimeOut time.Duration LookupTimeOut time.Duration ProbeFrequency time.Duration Latitude float64 Longitude float64 ProbeWorkerCnt *uint64 MaxProberWorker uint64 ProbeDport uint16 BestRecordNum int // contains filtered or unexported fields }
func (*Proxy) DomainRouteLookup ¶
func (*Proxy) DumpCacheTable ¶
func (p *Proxy) DumpCacheTable()
func (*Proxy) MultipleLookup ¶
func (*Proxy) RandomLookup ¶
RandomLookup is based on shuffled serverlist sequence
func (*Proxy) RenderProbeCacheList ¶
func (*Proxy) SortByLatency ¶
Click to show internal directories.
Click to hide internal directories.