dnscouch

package module
v0.0.0-...-ad7770b Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

README

dnscouch

Not a bench, more like a couch.

Obligatory screenshot:

dnscouchT screenshot

Aboot

There are 2 commands:

  • dnscouchT - a curses based table of results sorted by response time
  • dnscouch - raw csv formatted results, suitable for scripts / metrics ingestion.

Installation

go install github.com/jrwren/dnscouch/cmd/dnscouchT@latest

Running

dnscouchT
NTP

Invoke dnscouchT with the -t option to time NTP servers instaed of DNS servers.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FilteredServerMap = map[string]string{
	"1.1.1.2":         "Cloudflare Malware Filtered",
	"1.0.0.2":         "Cloudflare Malware Filtered",
	"1.1.1.3":         "Cloudflare Adult Filtered",
	"1.0.0.3":         "Cloudflare Adult Filtered",
	"9.9.9.9":         "Quad9 filtered Primary",
	"149.112.112.112": "Quad9 filtered Secondary",

	"9.9.9.11":       "Quad9 ecs unfiltered",
	"149.112.112.11": "Quad9 ecs unfiltered",
}
View Source
var NTPServerMap = map[string]string{
	"time.cloudflare.com":   "Cloudflare time",
	"ntp.ubuntu.com":        "NTP Ubuntu",
	"0.ubuntu.pool.ntp.org": "NTP Ubuntu 0",
	"1.ubuntu.pool.ntp.org": "NTP Ubuntu 1",
	"2.ubuntu.pool.ntp.org": "NTP Ubuntu 2",
	"ntp.nexcess.net":       "NexcessNet",
	"time.nist.gov":         "NIST",
	"pool.ntp.org":          "NTP org pool",
	"0.pool.ntp.org":        "NTP org pool 0",
	"1.pool.ntp.org":        "NTP org pool 1",
	"2.pool.ntp.org":        "NTP org pool 2",
	"time1.google.com":      "Google time",
	"time2.google.com":      "Google time",
	"time3.google.com":      "Google time",
	"time4.google.com":      "Google time",
	"time.windows.com":      "Windows time",
	"time.apple.com":        "Apple time",

	"ntp1.hetzner.de":       "Hetzner Online 1",
	"ntp2.hetzner.de":       "Hetzner Online 2",
	"ntp3.hetzner.de":       "Hetzner Online 3",
	"ntp.ripe.net":          "RIPE",
	"clock.isc.org":         "ISC",
	"0.amazon.pool.ntp.org": "Amazon 0",
	"1.amazon.pool.ntp.org": "Amazon 1",
	"2.amazon.pool.ntp.org": "Amazon 2",
	"3.amazon.pool.ntp.org": "Amazon 3",
}
View Source
var ServerMap4 = map[string]string{
	"1.1.1.1":        "Cloudflare One",
	"1.0.0.1":        "Cloudflare One",
	"8.8.8.8":        "Google Primary",
	"8.8.4.4":        "Google Secondary",
	"208.67.222.222": "OpenDNS Primary",
	"208.67.220.220": "OpenDNS Secondary",
	"4.2.2.1":        "Level 3",
	"209.244.0.3":    "Level 3",
	"209.244.0.4":    "Level 3",
	"9.9.9.10":       "Quad9 unfiltered",
	"149.112.112.10": "Quad9 unfiltered",
	"68.94.156.1":    "ATT Primary",
	"68.94.157.1":    "ATT Secondary",
	"12.121.117.201": "ATT Services",
	"8.26.56.26":     "Comodo Primary",
	"8.20.247.20":    "Comodo Secondary",
	"76.76.2.0":      "Control D Primary",
	"76.76.10.0":     "Control D Secondary",
	"185.228.168.9":  "Clean Browsing Primary",
	"185.228.169.9":  "Clean Browsing Secondary",
	"76.76.19.19":    "Alternate DNS Primary",
	"76.223.122.150": "Alternate DNS Secondary",
	"94.140.14.14":   "AdGuard DNS Primary",
	"94.140.15.15":   "AdGuard DNS Secondary",
}
View Source
var ServerMap6 = map[string]string{
	"[2606:4700:4700::1111]": "Cloudflare One",
	"[2606:4700:4700::1001]": "Cloudflare One",
	"[2001:4860:4860::8888]": "Google Primary",
	"[2001:4860:4860::8844]": "Google Secondary",
	"[2620:119:35::35]":      "OpenDNS Primary",
	"[2620:119:53::53]":      "OpenDNS Secondary",

	"[2620:fe::fe]": "Quad9 unfiltered",
	"[2620:fe::9]":  "Quad9 unfiltered",

	"[2606:1a40::]":       "Control D Primary",
	"[2606:1a40:1::]":     "Control D Secondary",
	"[2a0d:2a00:1::]":     "Clean Browsing Primary",
	"[2a0d:2a00:2::]":     "Clean Browsing Secondary",
	"[2602:fcbc::ad]":     "Alternate DNS Primary",
	"[2602:fcbc:2::ad]":   "Alternate DNS Secondary",
	"[2a10:50c0::ad1:ff]": "AdGuard DNS Primary",
	"[2a10:50c0::ad2:ff]": "AdGuard DNS Secondary",
}

Functions

func EnableComcast

func EnableComcast(servers map[string]string)

EnableComcast enables comcast DNS servers. They don't response from outside the comcast network.

func TimeDNSLookup

func TimeDNSLookup(server string) (time.Duration, error)

func TimeDNSLookupServers

func TimeDNSLookupServers(servers map[string]string) (map[string]time.Duration, error)

func TimeDNSLookupServersAvg

func TimeDNSLookupServersAvg(servers map[string]string, n int) (map[string]time.Duration, error)

func TimeNTPLookup

func TimeNTPLookup(server string) (time.Duration, error)

func TimeNTPLookupServers

func TimeNTPLookupServers() (map[string]time.Duration, error)

Types

type Result

type Result struct {
	ServerName, Desc string
	D                time.Duration
}

type Results

type Results []Result

func LookupNTPServersN

func LookupNTPServersN(n int) (Results, error)

func LookupServers

func LookupServers(servers map[string]string) (Results, error)

func LookupServersN

func LookupServersN(servers map[string]string, n int) (Results, error)

func (Results) Len

func (a Results) Len() int

func (Results) Less

func (a Results) Less(i, j int) bool

func (Results) Swap

func (a Results) Swap(i, j int)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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