Documentation ¶
Index ¶
- Constants
- Variables
- func GetDomainSuffix(name string) string
- func GetRootDomain(name string) (string, error)
- func QueryDNSCnameRecord(domain string) *dns.CNAME
- func QueryDNSSRVRecord(domain string) *dns.SRV
- func SendEmail(toEmails, subject, content string)
- func SetFQDN(domain string) string
- func ToDomainWithDot(domain string) string
- func TrimDomainDot(domain string) string
- type Fetcher
- type MailUser
Constants ¶
View Source
const ( IPVersion4 = 4 IPVersion6 = 6 )
View Source
const ( MailServerHostExmail = "smtp.exmail.qq.com" MailServerHost126 = "smtp.126.com" MailServerHost163 = "smtp.163.com" )
View Source
const (
DefaultDNSServer = "8.8.8.8:53"
)
Variables ¶
View Source
var ( DNSTimeout = 3 DNSRetry = 3 )
Functions ¶
func GetDomainSuffix ¶
func GetRootDomain ¶
func QueryDNSCnameRecord ¶
func QueryDNSSRVRecord ¶
func ToDomainWithDot ¶
func TrimDomainDot ¶
Types ¶
type Fetcher ¶
type Fetcher interface {
Fetch(ipv4, ipv6 bool, asn ...string) (map[string]map[string][]*net.IPNet, error)
}
https://github.com/g0dsCookie/asn2ip https://www.radb.net/query/help
func NewCachedFetcher ¶
func NewFetcher ¶
Click to show internal directories.
Click to hide internal directories.