Documentation ¶
Overview ¶
Package common provides common functions.
Index ¶
- Variables
- func FindRecordByType(msg *dns.Msg, t uint16) string
- func GetEDNSClientSubnetIP(m *dns.Msg) string
- func HasAnswer(m *dns.Msg) bool
- func HasSubDomain(s string, sub string) bool
- func IsDomainMatchRule(pattern string, domain string) bool
- func IsEDNSClientSubnet(o *dns.OPT) *dns.EDNS0_SUBNET
- func SetEDNSClientSubnet(m *dns.Msg, ip string, isNoCookie bool)
- func SetMinimumTTL(msg *dns.Msg, minimumTTL uint32)
- func SetTTLByMap(msg *dns.Msg, domainTTLMap map[string]uint32)
- type DNSUpstream
- type EDNSClientSubnetType
- type IPSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ReservedIPNetworkList = getReservedIPNetworkList()
Functions ¶
func GetEDNSClientSubnetIP ¶
func HasSubDomain ¶
func IsDomainMatchRule ¶
func IsEDNSClientSubnet ¶
func IsEDNSClientSubnet(o *dns.OPT) *dns.EDNS0_SUBNET
func SetMinimumTTL ¶
Types ¶
type DNSUpstream ¶
type DNSUpstream struct { Name string `yaml:"name" json:"name"` Address string `yaml:"address" json:"address"` Protocol string `yaml:"protocol" json:"protocol"` SOCKS5Address string `yaml:"socks5Address" json:"socks5Address"` Timeout int `yaml:"timeout" json:"timeout"` EDNSClientSubnet *EDNSClientSubnetType `yaml:"ednsClientSubnet" json:"ednsClientSubnet"` TCPPoolConfig struct { Enable bool `yaml:"enable" json:"enable"` InitialCapacity int `yaml:"initialCapacity" json:"initialCapacity"` MaxCapacity int `yaml:"maxCapacity" json:"maxCapacity"` IdleTimeout int `yaml:"idleTimeout" json:"idleTimeout"` } `yaml:"tcpPoolConfig" json:"tcpPoolConfig"` }
type EDNSClientSubnetType ¶
Click to show internal directories.
Click to hide internal directories.