Documentation ¶
Overview ¶
Package dns is a generated protocol buffer package.
It is generated from these files:
v2ray.com/core/app/dns/config.proto
It has these top-level messages:
Config
Index ¶
- Constants
- type ARecord
- type CacheServer
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetHosts() map[string]*v2ray_core_common_net.AddressPB
- func (this *Config) GetInternalHosts() map[string]net.IP
- func (m *Config) GetNameServers() []*v2ray_core_common_net2.DestinationPB
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- type DomainRecord
- type LocalNameServer
- type NameServer
- type PendingRequest
- type Server
- type UDPNameServer
- func (this *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
- func (this *UDPNameServer) BuildQueryA(domain string, id uint16) *alloc.Buffer
- func (this *UDPNameServer) Cleanup()
- func (this *UDPNameServer) DispatchQuery(payload *alloc.Buffer)
- func (this *UDPNameServer) HandleResponse(dest v2net.Destination, payload *alloc.Buffer)
- func (this *UDPNameServer) QueryA(domain string) <-chan *ARecord
Constants ¶
View Source
const ( DefaultTTL = uint32(3600) CleanupInterval = time.Second * 120 CleanupThreshold = 512 )
View Source
const (
APP_ID = app.ID(2)
)
View Source
const (
QueryTimeout = time.Second * 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheServer ¶
func NewCacheServer ¶
func NewCacheServer(space app.Space, config *Config) *CacheServer
func (*CacheServer) GetCached ¶
func (this *CacheServer) GetCached(domain string) []net.IP
Private: Visible for testing.
func (*CacheServer) Release ¶
func (this *CacheServer) Release()
type Config ¶
type Config struct { NameServers []*v2ray_core_common_net2.DestinationPB `protobuf:"bytes,1,rep,name=NameServers,json=nameServers" json:"NameServers,omitempty"` Hosts map[string]*v2ray_core_common_net.AddressPB `` /* 141-byte string literal not displayed */ }
func (*Config) Descriptor ¶
func (*Config) GetNameServers ¶
func (m *Config) GetNameServers() []*v2ray_core_common_net2.DestinationPB
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type DomainRecord ¶
type DomainRecord struct {
A *ARecord
}
type LocalNameServer ¶
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶
func (this *LocalNameServer) QueryA(domain string) <-chan *ARecord
type NameServer ¶
type PendingRequest ¶
type PendingRequest struct {
// contains filtered or unexported fields
}
type UDPNameServer ¶
func NewUDPNameServer ¶
func NewUDPNameServer(address v2net.Destination, dispatcher dispatcher.PacketDispatcher) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶
func (this *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
Private: Visible for testing.
func (*UDPNameServer) BuildQueryA ¶
func (this *UDPNameServer) BuildQueryA(domain string, id uint16) *alloc.Buffer
func (*UDPNameServer) DispatchQuery ¶
func (this *UDPNameServer) DispatchQuery(payload *alloc.Buffer)
func (*UDPNameServer) HandleResponse ¶
func (this *UDPNameServer) HandleResponse(dest v2net.Destination, payload *alloc.Buffer)
Private: Visible for testing.
func (*UDPNameServer) QueryA ¶
func (this *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.