Generic SRV records checker for happyDomain.
For each SRV record attached to an svcs.UnknownSRV service, the checker
resolves every target and probes reachability:
- DNS resolution (A/AAAA), CNAME detection (RFC 2782 violation),
null-target detection (RFC 2782 "service explicitly unavailable")
- TCP connect to target:port for _tcp SRVs
- UDP probe for _udp SRVs, using ICMP port-unreachable detection
The checker also publishes TLS endpoints (host, port, SNI) for every
SRV target hitting a well-known direct-TLS port (443, 465, 636, 853,
993, 995, 5061, 5223, …) via the EndpointDiscoverer SDK interface, so
a downstream TLS checker can pick them up.
The HTML report groups records as cards and surfaces the most common
failure scenarios (DNS failure, CNAME target, TCP unreachable,
null-target) at the top with remediation guidance.
28 lines
707 B
Makefile
28 lines
707 B
Makefile
CHECKER_NAME := checker-srv
|
|
CHECKER_IMAGE := happydomain/$(CHECKER_NAME)
|
|
CHECKER_VERSION ?= custom-build
|
|
|
|
CHECKER_SOURCES := main.go $(wildcard checker/*.go)
|
|
|
|
GO_LDFLAGS := -X main.Version=$(CHECKER_VERSION)
|
|
|
|
.PHONY: all plugin docker test clean
|
|
|
|
all: $(CHECKER_NAME)
|
|
|
|
$(CHECKER_NAME): $(CHECKER_SOURCES)
|
|
go build -tags standalone -ldflags "$(GO_LDFLAGS)" -o $@ .
|
|
|
|
plugin: $(CHECKER_NAME).so
|
|
|
|
$(CHECKER_NAME).so: $(CHECKER_SOURCES) $(wildcard plugin/*.go)
|
|
go build -buildmode=plugin -ldflags "$(GO_LDFLAGS)" -o $@ ./plugin/
|
|
|
|
docker:
|
|
docker build --build-arg CHECKER_VERSION=$(CHECKER_VERSION) -t $(CHECKER_IMAGE) .
|
|
|
|
test:
|
|
go test -tags standalone ./...
|
|
|
|
clean:
|
|
rm -f $(CHECKER_NAME) $(CHECKER_NAME).so
|