checker: implement ShareKey to mutualise TLS probes across targets
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing

A TLS probe result depends only on the set of endpoints actually dialed and
the probe knobs, never on which domain or service published them: the
observation is a map keyed by each endpoint's contract Ref
(host|port|effective SNI|STARTTLS|require). Implement sdk.ObservationSharer so
the host dials a host:port once and serves every target that resolves to the
same endpoint set, instead of re-handshaking per record. This is the
highest-value case among the checkers, since dane, xmpp, srv, dav, … all
funnel their endpoints into this single checker.

The share key sorts the endpoint Refs and folds in the probe timeout and the
cipher-enumeration flag, since both change what is collected (a tighter
timeout can fail a slow handshake; enumeration adds the Enum block). An empty
or unparseable entry set yields "" so the host falls back to per-target
caching.
This commit is contained in:
nemunaire 2026-06-18 14:14:22 +09:00
commit 03af5615ae
4 changed files with 131 additions and 4 deletions

6
go.mod
View file

@ -2,12 +2,14 @@ module git.happydns.org/checker-tls
go 1.25.0
require git.happydns.org/checker-sdk-go v1.5.0
require (
git.happydns.org/checker-sdk-go v1.11.0
github.com/refraction-networking/utls v1.8.2
)
require (
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/refraction-networking/utls v1.8.2 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/sys v0.31.0 // indirect
)