Documentation ¶
Overview ¶
Package dns is an implementation of core.DNS feature.
Index ¶
- Constants
- type ARecord
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetHosts() map[string]*v2ray_core_common_net.IPOrDomain
- func (c *Config) GetInternalHosts() map[string]net.IP
- func (m *Config) GetNameServers() []*v2ray_core_common_net2.Endpoint
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- type DomainRecord
- type LocalNameServer
- type NameServer
- type PendingRequest
- type Server
- type UDPNameServer
Constants ¶
View Source
const (
QueryTimeout = time.Second * 8
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Nameservers used by this DNS. Only traditional UDP servers are support at the moment. // A special value 'localhost' as a domain address can be set to use DNS on local system. NameServers []*v2ray_core_common_net2.Endpoint `protobuf:"bytes,1,rep,name=NameServers" json:"NameServers,omitempty"` // Static hosts. Domain to IP. Hosts map[string]*v2ray_core_common_net.IPOrDomain `` /* 130-byte string literal not displayed */ }
func (*Config) Descriptor ¶
func (*Config) GetHosts ¶
func (m *Config) GetHosts() map[string]*v2ray_core_common_net.IPOrDomain
func (*Config) GetNameServers ¶
func (m *Config) GetNameServers() []*v2ray_core_common_net2.Endpoint
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type DomainRecord ¶
func (*DomainRecord) Expired ¶
func (r *DomainRecord) Expired() bool
type LocalNameServer ¶
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶
func (*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 net.Destination, dispatcher core.Dispatcher) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶
func (s *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
func (*UDPNameServer) Cleanup ¶
func (s *UDPNameServer) Cleanup() error
func (*UDPNameServer) HandleResponse ¶
func (s *UDPNameServer) HandleResponse(payload *buf.Buffer)
func (*UDPNameServer) QueryA ¶
func (s *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.