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:
@@ -54,9 +54,17 @@ The smartdns library is structured into three main modules:
|
||||
### Handler System:
|
||||
- Pattern-based domain matching using minimatch
|
||||
- Support for all common record types
|
||||
- **Multiple Handler Support**: As of v7.4.2+, multiple handlers can contribute records of the same type
|
||||
- Handler chaining for complex scenarios
|
||||
- Automatic SOA response for unhandled queries
|
||||
|
||||
### Multiple Records Support (v7.4.2+):
|
||||
- Server now processes ALL matching handlers for a query (previously stopped after first match)
|
||||
- Enables proper multi-NS record support for domain registration
|
||||
- Supports round-robin DNS with multiple A/AAAA records
|
||||
- Allows multiple TXT records (SPF, DKIM, domain verification)
|
||||
- Each handler contributes its record to the response
|
||||
|
||||
## Key Dependencies
|
||||
|
||||
- `dns-packet`: DNS packet encoding/decoding (wire format)
|
||||
@@ -94,4 +102,10 @@ The test suite demonstrates:
|
||||
- DNSSEC provides authentication but not encryption
|
||||
- DoH (DNS-over-HTTPS) provides both privacy and integrity
|
||||
- Let's Encrypt integration requires proper domain authorization
|
||||
- Handler patterns should be carefully designed to avoid open resolvers
|
||||
- Handler patterns should be carefully designed to avoid open resolvers
|
||||
|
||||
## Known Issues
|
||||
|
||||
1. **DNSSEC RRSIG Generation**: When multiple records of the same type are returned, DNSSEC signing may encounter issues with the current implementation
|
||||
2. **SOA Record Prefix**: The server hardcodes 'ns1.' prefix for SOA mname field which may not match actual nameserver names
|
||||
3. **Handler Deduplication**: If the same handler is registered multiple times, it will contribute duplicate records
|
Reference in New Issue
Block a user