A modern Dart package for working with the DNS protocol, supporting query parsing, encoding, and response handling with IPv4 and IPv6 support.
Built on top of super_ip and super_raw for efficient binary-level DNS message handling.
✅ Fully null-safe
✅ Compatible with Dart 3.8+
✅ DNS query and response parsing
✅ Support for A, AAAA, MX, TXT, and SRV records
✅ Works with IPv4 and IPv6
Add to your pubspec.yaml:
dependencies:
super_dns: ^0.1.0Then run:
dart pub getimport 'package:super_dns/super_dns.dart';
void main() async {
final query = DnsQuery.standard('example.com', type: DnsRecordType.a);
final response = await DnsClient.google().lookup(query);
print('Got ${response.answers.length} answers:');
for (final answer in response.answers) {
print(answer);
}
}super_ip: IP stack abstraction.super_raw: binary data encoding utilities.universal_io: cross-platform I/O APIs.
Run tests:
dart testRun analysis:
dart analyzeMIT © 2025 dab246