common

package
v0.0.0-...-874f226 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package common provides common functions.

Index

Constants

This section is empty.

Variables

View Source
var ReservedIPNetworkList []*net.IPNet

Functions

func FindRecordByType

func FindRecordByType(msg *dns.Msg, t uint16) string

func GetEDNSClientSubnetIP

func GetEDNSClientSubnetIP(m *dns.Msg) string

func HasAnswer

func HasAnswer(m *dns.Msg) bool

func HasSubDomain

func HasSubDomain(s string, sub string) bool

func IsEDNSClientSubnet

func IsEDNSClientSubnet(o *dns.OPT) *dns.EDNS0_SUBNET

func IsIPMatchList

func IsIPMatchList(ip net.IP, ipnl []*net.IPNet, isLog bool, name string) bool

func SetEDNSClientSubnet

func SetEDNSClientSubnet(m *dns.Msg, ip string, isNoCookie bool)

Types

type DNSUpstream

type DNSUpstream struct {
	Name             string
	Address          string
	Protocol         string
	SOCKS5Address    string
	Timeout          int
	EDNSClientSubnet *EDNSClientSubnetType
}

type EDNSClientSubnetType

type EDNSClientSubnetType struct {
	Policy     string
	ExternalIP string
	NoCookie   bool
}

Jump to

Keyboard shortcuts

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