Добавил policy HY2XS_DNS_AAAA_POLICY и управляемое AAAA-поведение в preflight

This commit is contained in:
2026-05-08 10:34:19 +05:00
parent 97e679f69f
commit de4a65a959
6 changed files with 37 additions and 3 deletions
+10 -3
View File
@@ -143,9 +143,16 @@ export async function preflight(context: RuntimeContext): Promise<void> {
}
}
if (aaaa.length > 0) {
fail(
`domain ${context.config.domain} has DNS AAAA record while HY2XS profile is IPv4-only; remove AAAA record before install`
);
if (context.config.dnsAaaaPolicy === "strict") {
fail(
`domain ${context.config.domain} has DNS AAAA record while HY2XS profile is IPv4-only; remove AAAA record before install`
);
}
if (context.config.dnsAaaaPolicy === "warn") {
info(
`warning: domain ${context.config.domain} has DNS AAAA record while HY2XS profile is IPv4-only; continuing due to HY2XS_DNS_AAAA_POLICY=warn`
);
}
}
}