Adds a happyDomain checker that probes STUN/TURN servers end-to-end:
DNS/SRV discovery, UDP/TCP/TLS/DTLS dial, STUN binding + reflexive-addr
sanity, open-relay detection, authenticated TURN Allocate (long-term
creds or REST-API HMAC), public-relay check, CreatePermission + Send
round-trip through the relay, and optional ChannelBind.
Failing sub-tests carry a remediation string (`Fix`) that the HTML
report surfaces as a yellow headline callout and inline next to each
row. Mapping covers the most common coturn misconfigurations
(external-ip, relay-ip, lt-cred-mech, min-port/max-port, cert issues,
401 nonce drift, 441/442/486/508 allocation errors).
Implements sdk.EndpointDiscoverer (checker/discovery.go): every
stuns:/turns:/DTLS endpoint observed during Collect is published as a
DiscoveredEndpoint{Type: "tls"|"dtls"} so a downstream TLS checker can
verify certificates without re-parsing the observation.
Backed by pion/stun/v3 + pion/turn/v4 + pion/dtls/v3; SDK pinned to a
local replace until the EndpointDiscoverer interface ships in a tagged
release.
28 lines
713 B
Makefile
28 lines
713 B
Makefile
CHECKER_NAME := checker-stun-turn
|
|
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 clean test
|
|
|
|
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
|