Documentation ¶
Index ¶
- Variables
- type FakeDnsPool
- func (*FakeDnsPool) Descriptor() ([]byte, []int)deprecated
- func (x *FakeDnsPool) GetIpPool() string
- func (x *FakeDnsPool) GetLruSize() int64
- func (*FakeDnsPool) ProtoMessage()
- func (x *FakeDnsPool) ProtoReflect() protoreflect.Message
- func (x *FakeDnsPool) Reset()
- func (x *FakeDnsPool) String() string
- type FakeDnsPoolMulti
- type Holder
- func (fkdns *Holder) Close() error
- func (fkdns *Holder) GetDomainFromFakeDNS(ip net.Address) string
- func (fkdns *Holder) GetFakeIPForDomain(domain string) []net.Address
- func (fkdns *Holder) GetFakeIPForDomain3(domain string, ipv4, ipv6 bool) []net.Address
- func (fkdns *Holder) IsIPInIPPool(ip net.Address) bool
- func (fkdns *Holder) Start() error
- func (*Holder) Type() interface{}
- type HolderMulti
- func (h *HolderMulti) Close() error
- func (h *HolderMulti) GetDomainFromFakeDNS(ip net.Address) string
- func (h *HolderMulti) GetFakeIPForDomain(domain string) []net.Address
- func (h *HolderMulti) GetFakeIPForDomain3(domain string, ipv4, ipv6 bool) []net.Address
- func (h *HolderMulti) IsIPInIPPool(ip net.Address) bool
- func (h *HolderMulti) Start() error
- func (h *HolderMulti) Type() interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var File_app_dns_fakedns_fakedns_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type FakeDnsPool ¶
type FakeDnsPool struct { IpPool string `protobuf:"bytes,1,opt,name=ip_pool,json=ipPool,proto3" json:"ip_pool,omitempty"` //CIDR of IP pool used as fake DNS IP LruSize int64 `protobuf:"varint,2,opt,name=lruSize,proto3" json:"lruSize,omitempty"` //Size of Pool for remembering relationship between domain name and IP address // contains filtered or unexported fields }
func (*FakeDnsPool) Descriptor
deprecated
func (*FakeDnsPool) Descriptor() ([]byte, []int)
Deprecated: Use FakeDnsPool.ProtoReflect.Descriptor instead.
func (*FakeDnsPool) GetIpPool ¶
func (x *FakeDnsPool) GetIpPool() string
func (*FakeDnsPool) GetLruSize ¶
func (x *FakeDnsPool) GetLruSize() int64
func (*FakeDnsPool) ProtoMessage ¶
func (*FakeDnsPool) ProtoMessage()
func (*FakeDnsPool) ProtoReflect ¶
func (x *FakeDnsPool) ProtoReflect() protoreflect.Message
func (*FakeDnsPool) Reset ¶
func (x *FakeDnsPool) Reset()
func (*FakeDnsPool) String ¶
func (x *FakeDnsPool) String() string
type FakeDnsPoolMulti ¶
type FakeDnsPoolMulti struct { Pools []*FakeDnsPool `protobuf:"bytes,1,rep,name=pools,proto3" json:"pools,omitempty"` // contains filtered or unexported fields }
func (*FakeDnsPoolMulti) Descriptor
deprecated
func (*FakeDnsPoolMulti) Descriptor() ([]byte, []int)
Deprecated: Use FakeDnsPoolMulti.ProtoReflect.Descriptor instead.
func (*FakeDnsPoolMulti) GetPools ¶
func (x *FakeDnsPoolMulti) GetPools() []*FakeDnsPool
func (*FakeDnsPoolMulti) ProtoMessage ¶
func (*FakeDnsPoolMulti) ProtoMessage()
func (*FakeDnsPoolMulti) ProtoReflect ¶
func (x *FakeDnsPoolMulti) ProtoReflect() protoreflect.Message
func (*FakeDnsPoolMulti) Reset ¶
func (x *FakeDnsPoolMulti) Reset()
func (*FakeDnsPoolMulti) String ¶
func (x *FakeDnsPoolMulti) String() string
type Holder ¶
type Holder struct {
// contains filtered or unexported fields
}
func NewFakeDNSHolder ¶
func NewFakeDNSHolderConfigOnly ¶
func NewFakeDNSHolderConfigOnly(conf *FakeDnsPool) (*Holder, error)
func (*Holder) GetDomainFromFakeDNS ¶
GetDomainFromFakeDNS checks if an IP is a fake IP and have corresponding domain name
func (*Holder) GetFakeIPForDomain ¶
GetFakeIPForDomain checks and generate a fake IP for a domain name
func (*Holder) GetFakeIPForDomain3 ¶
type HolderMulti ¶
type HolderMulti struct {
// contains filtered or unexported fields
}
func NewFakeDNSHolderMulti ¶
func NewFakeDNSHolderMulti(conf *FakeDnsPoolMulti) (*HolderMulti, error)
func (*HolderMulti) Close ¶
func (h *HolderMulti) Close() error
func (*HolderMulti) GetDomainFromFakeDNS ¶
func (h *HolderMulti) GetDomainFromFakeDNS(ip net.Address) string
func (*HolderMulti) GetFakeIPForDomain ¶
func (h *HolderMulti) GetFakeIPForDomain(domain string) []net.Address
func (*HolderMulti) GetFakeIPForDomain3 ¶
func (h *HolderMulti) GetFakeIPForDomain3(domain string, ipv4, ipv6 bool) []net.Address
func (*HolderMulti) IsIPInIPPool ¶
func (h *HolderMulti) IsIPInIPPool(ip net.Address) bool
func (*HolderMulti) Start ¶
func (h *HolderMulti) Start() error
func (*HolderMulti) Type ¶
func (h *HolderMulti) Type() interface{}
Click to show internal directories.
Click to hide internal directories.