fakedns

package
v0.0.0-...-a887110 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2021 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 Holder

type Holder struct {
	// contains filtered or unexported fields
}

func NewFakeDNSHolder

func NewFakeDNSHolder() (*Holder, error)

func NewFakeDNSHolderConfigOnly

func NewFakeDNSHolderConfigOnly(conf *FakeDnsPool) (*Holder, error)

func (*Holder) Close

func (fkdns *Holder) Close() error

func (*Holder) GetDomainFromFakeDNS

func (fkdns *Holder) GetDomainFromFakeDNS(ip net.Address) string

GetDomainFromFakeDNS check if an IP is a fake IP and have corresponding domain name

func (*Holder) GetFakeIPForDomain

func (fkdns *Holder) GetFakeIPForDomain(domain string) []net.Address

GetFakeIPForDomain check and generate a fake IP for a domain name

func (*Holder) GetFakeIPRange

func (fkdns *Holder) GetFakeIPRange() *gonet.IPNet

GetFakeIPRange return fake IP range from configuration

func (*Holder) Start

func (fkdns *Holder) Start() error

func (*Holder) Type

func (*Holder) Type() interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL