From ce60384a45be62d1a38af66942beba9b72642ce6 Mon Sep 17 00:00:00 2001 From: Sergii Bezliudnyi Date: Wed, 24 Jun 2026 10:37:06 +0200 Subject: [PATCH 1/3] feat: add HTTPS (RFC 9460) DNS record type Adds 'HTTPS' to the DnsRecordType union so DNS check constructs can monitor a domain's HTTPS service-binding record (HTTP/3 advertisement via alpn, plus ipv4hint/ipv6hint/ech). Updates the DnsAssertionBuilder @example to the recommended assertion forms. --- packages/cli/src/constructs/dns-assertion.ts | 7 +++++++ packages/cli/src/constructs/dns-request.ts | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/constructs/dns-assertion.ts b/packages/cli/src/constructs/dns-assertion.ts index fff902303..8dbb6affe 100644 --- a/packages/cli/src/constructs/dns-assertion.ts +++ b/packages/cli/src/constructs/dns-assertion.ts @@ -21,6 +21,13 @@ export type DnsAssertion = CoreAssertion * // Response code assertions * DnsAssertionBuilder.responseCode().equals('NOERROR') * DnsAssertionBuilder.responseCode().equals('NXDOMAIN') + * + * // HTTPS (RFC 9460) record — monitor HTTP/3 advertisement. The answer renders + * // as: 1 . alpn="h3,h2" ipv4hint="..." ipv6hint="..." + * // Scope the match to the alpn value with a capture group (recommended): + * DnsAssertionBuilder.textAnswer('alpn="([^"]*)"').contains('h3') + * // Or assert against the whole rendered answer / its JSON `data` field: + * DnsAssertionBuilder.jsonAnswer('$.Answer[0].data').contains('alpn="h3') * ``` */ export class DnsAssertionBuilder { diff --git a/packages/cli/src/constructs/dns-request.ts b/packages/cli/src/constructs/dns-request.ts index 061f7a2b4..847fdfc63 100644 --- a/packages/cli/src/constructs/dns-request.ts +++ b/packages/cli/src/constructs/dns-request.ts @@ -8,6 +8,7 @@ export type DnsRecordType = | 'NS' | 'TXT' | 'SOA' + | 'HTTPS' export type DnsProtocol = | 'UDP' @@ -19,11 +20,14 @@ export type DnsProtocol = */ export interface DnsRequest { /** - * The DNS record type to query for. + * The DNS record type to query for. Use 'HTTPS' (RFC 9460) to monitor a + * domain's HTTPS service binding record — e.g. whether it advertises HTTP/3 + * via its `alpn` parameter, plus `ipv4hint`/`ipv6hint`/`ech`. * * @example "A" * @example "AAAA" * @example "TXT" + * @example "HTTPS" */ recordType: DnsRecordType From baaec811a473f671da011ceefcde3845af8a3ae2 Mon Sep 17 00:00:00 2001 From: Sergii Bezliudnyi Date: Wed, 24 Jun 2026 12:46:55 +0200 Subject: [PATCH 2/3] docs: keep the recordType description generic (HTTPS as an @example) --- packages/cli/src/constructs/dns-request.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/cli/src/constructs/dns-request.ts b/packages/cli/src/constructs/dns-request.ts index 847fdfc63..7ed84898d 100644 --- a/packages/cli/src/constructs/dns-request.ts +++ b/packages/cli/src/constructs/dns-request.ts @@ -20,9 +20,7 @@ export type DnsProtocol = */ export interface DnsRequest { /** - * The DNS record type to query for. Use 'HTTPS' (RFC 9460) to monitor a - * domain's HTTPS service binding record — e.g. whether it advertises HTTP/3 - * via its `alpn` parameter, plus `ipv4hint`/`ipv6hint`/`ech`. + * The DNS record type to query for. * * @example "A" * @example "AAAA" From 57131426ea63e9e79d61dd5afbf26bc5fd0eb683 Mon Sep 17 00:00:00 2001 From: Sergii Bezliudnyi Date: Wed, 24 Jun 2026 12:53:20 +0200 Subject: [PATCH 3/3] docs: trim the HTTPS assertion example to match the terse pattern --- packages/cli/src/constructs/dns-assertion.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/constructs/dns-assertion.ts b/packages/cli/src/constructs/dns-assertion.ts index 8dbb6affe..e4109284d 100644 --- a/packages/cli/src/constructs/dns-assertion.ts +++ b/packages/cli/src/constructs/dns-assertion.ts @@ -22,12 +22,9 @@ export type DnsAssertion = CoreAssertion * DnsAssertionBuilder.responseCode().equals('NOERROR') * DnsAssertionBuilder.responseCode().equals('NXDOMAIN') * - * // HTTPS (RFC 9460) record — monitor HTTP/3 advertisement. The answer renders - * // as: 1 . alpn="h3,h2" ipv4hint="..." ipv6hint="..." - * // Scope the match to the alpn value with a capture group (recommended): + * // HTTPS record assertions (HTTP/3 advertisement) * DnsAssertionBuilder.textAnswer('alpn="([^"]*)"').contains('h3') - * // Or assert against the whole rendered answer / its JSON `data` field: - * DnsAssertionBuilder.jsonAnswer('$.Answer[0].data').contains('alpn="h3') + * DnsAssertionBuilder.jsonAnswer('$.Answer[0].data').contains('h3') * ``` */ export class DnsAssertionBuilder {