dns

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dns provides DNS-related utilities, including DNS-over-HTTPS and IP reverse lookups.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlocklistLookupAddr

func BlocklistLookupAddr(addr string) (bool, error)

BlocklistLookupAddr checks if the given IP address is listed in the Spamhaus blocklist.

func ReverseIP

func ReverseIP(addr string) (string, error)

ReverseIP returns the reverse DNS notation for an IP address.

Types

type DOHClient

type DOHClient struct {
	Client *http.Client
	URL    *url.URL
}

DOHClient describes a DNS over HTTPS client.

func NewDOHClient

func NewDOHClient(url *url.URL) *DOHClient

NewDOHClient creates a new DNS over HTTPS client with the provided URL.

func (*DOHClient) Exchange

func (c *DOHClient) Exchange(msg *dns.Msg) (*dns.Msg, error)

Exchange performs a DNS query using DNS over HTTPS.

Jump to

Keyboard shortcuts

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