proxyutil

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: GPL-3.0 Imports: 4 Imported by: 4

Documentation

Overview

Package proxyutil contains helper functions that are used in all other dnsproxy packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIPAddrs

func AppendIPAddrs(ipAddrs *[]net.IPAddr, answers []dns.RR)

AppendIPAddrs appends the IP addresses got from dns.RR to the specified array

func ContainsIP added in v0.28.0

func ContainsIP(ips []net.IP, ip net.IP) bool

ContainsIP checks if the specified IP is in the array

func GetIPFromDNSRecord added in v0.27.0

func GetIPFromDNSRecord(r dns.RR) net.IP

GetIPFromDNSRecord - extracts IP address for a DNS record returns null if the record is of a wrong type

func HaveAdminRights added in v0.26.0

func HaveAdminRights() (bool, error)

HaveAdminRights checks if the current user has root (administrator) rights

func SortIPAddrs

func SortIPAddrs(ipAddrs []net.IPAddr) []net.IPAddr

SortIPAddrs sorts the specified IP addresses array IPv4 addresses go first, then IPv6 addresses

Types

This section is empty.

Jump to

Keyboard shortcuts

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