fix(dnsserver): Enable multiple DNS record support by removing the premature break in processDnsRequest. Now the DNS server aggregates answers from all matching handlers for NS, A, and TXT records, and improves NS record serialization for DNSSEC.

This commit is contained in:
2025-05-30 17:09:02 +00:00
parent e7cb0921fc
commit 2b97dffb47
8 changed files with 1290 additions and 89 deletions

View File

@ -606,7 +606,7 @@ export class DnsServer {
}
answered = true;
break;
// Continue processing other handlers to allow multiple records
}
}
}
@ -756,6 +756,9 @@ export class DnsServer {
Buffer.from([dnskeyData.algorithm]),
dnskeyData.key,
]);
case 'NS':
// NS records contain domain names
return this.nameToBuffer(data);
case 'SOA':
// Implement SOA record serialization if needed
// For now, return an empty buffer or handle as needed