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 CacheServerFactory
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetHosts() map[string]*v2ray_core_common_net.IPOrDomain
- func (v *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
- func (v *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
- func (v *UDPNameServer) BuildQueryA(domain string, id uint16) *buf.Buffer
- func (v *UDPNameServer) Cleanup()
- func (v *UDPNameServer) DispatchQuery(payload *buf.Buffer)
- func (v *UDPNameServer) HandleResponse(dest v2net.Destination, payload *buf.Buffer)
- func (v *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 ¶ added in v1.13.1
func NewCacheServer ¶ added in v1.13.1
func NewCacheServer(space app.Space, config *Config) *CacheServer
func (*CacheServer) GetCached ¶ added in v1.13.1
func (v *CacheServer) GetCached(domain string) []net.IP
Private: Visible for testing.
func (*CacheServer) Release ¶ added in v1.13.1
func (v *CacheServer) Release()
type CacheServerFactory ¶
type CacheServerFactory struct{}
func (CacheServerFactory) AppId ¶
func (v CacheServerFactory) AppId() app.ID
func (CacheServerFactory) Create ¶
func (v CacheServerFactory) Create(space app.Space, config interface{}) (app.Application, error)
type Config ¶ added in v1.13.1
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 ¶ added in v1.13.1
type DomainRecord struct {
A *ARecord
}
type LocalNameServer ¶ added in v1.13.1
type LocalNameServer struct { }
func (*LocalNameServer) QueryA ¶ added in v1.13.1
func (v *LocalNameServer) QueryA(domain string) <-chan *ARecord
type NameServer ¶ added in v1.13.1
type PendingRequest ¶ added in v1.13.1
type PendingRequest struct {
// contains filtered or unexported fields
}
type UDPNameServer ¶ added in v1.13.1
func NewUDPNameServer ¶ added in v1.13.1
func NewUDPNameServer(address v2net.Destination, dispatcher dispatcher.PacketDispatcher) *UDPNameServer
func (*UDPNameServer) AssignUnusedID ¶ added in v1.13.1
func (v *UDPNameServer) AssignUnusedID(response chan<- *ARecord) uint16
Private: Visible for testing.
func (*UDPNameServer) BuildQueryA ¶ added in v1.17.1
func (v *UDPNameServer) BuildQueryA(domain string, id uint16) *buf.Buffer
func (*UDPNameServer) Cleanup ¶ added in v1.13.1
func (v *UDPNameServer) Cleanup()
Private: Visible for testing.
func (*UDPNameServer) DispatchQuery ¶ added in v1.17.1
func (v *UDPNameServer) DispatchQuery(payload *buf.Buffer)
func (*UDPNameServer) HandleResponse ¶ added in v1.13.1
func (v *UDPNameServer) HandleResponse(dest v2net.Destination, payload *buf.Buffer)
Private: Visible for testing.
func (*UDPNameServer) QueryA ¶ added in v1.13.1
func (v *UDPNameServer) QueryA(domain string) <-chan *ARecord
Click to show internal directories.
Click to hide internal directories.