super_dns_client 0.2.1 copy "super_dns_client: ^0.2.1" to clipboard
super_dns_client: ^0.2.1 copied to clipboard

A modern and lightweight Dart library for performing DNS-over-HTTPS (DoH) lookups. Supports multiple resolvers and easy integration for Flutter and server-side apps.

super_dns_client #

A modern and lightweight Dart library for performing DNS-over-HTTPS (DoH) lookups.
Supports multiple resolvers and can be easily integrated in Flutter or Dart server apps.


πŸš€ Features #

  • πŸ” Query A, AAAA, CNAME, SRV, TXT records via DoH
  • 🌐 Support for multiple resolvers (Google, Cloudflare, Quad9, OpenDNS, etc.)
  • 🧠 Simple high-level API for easy DNS lookups
  • 🧱 Built with http, freezed, and json_serializable
  • βœ… Null-safe and fully tested

πŸ“¦ Installation #

Add this to your pubspec.yaml:

dependencies:
  super_dns_client: ^0.1.0

Then run:

dart pub get

πŸ’‘ Usage #

import 'package:super_dns_client/super_dns_client.dart';

void main() async {
  final client = DoHClient.resolver(DoHResolver.google);

  final response = await client.lookup('example.com', DnsRecordType.A);

  print('IPv4 addresses for example.com:');
  for (final record in response.records) {
    print('β†’ ${record.data}');
  }
}

βš™οΈ Supported DoH Resolvers #

Provider Endpoint URL
Google https://dns.google/dns-query
Cloudflare https://cloudflare-dns.com/dns-query
Quad9 https://dns.quad9.net/dns-query
OpenDNS https://doh.opendns.com/dns-query

πŸ§ͺ Run Tests #

dart test

πŸͺͺ License #

Licensed under the MIT License.
See the LICENSE file for more details.


❀️ Contributing #

Pull requests and feature suggestions are welcome.
Open an issue at GitHub Issues if you find bugs or want to propose improvements.

2
likes
0
points
829
downloads

Publisher

unverified uploader

Weekly Downloads

A modern and lightweight Dart library for performing DNS-over-HTTPS (DoH) lookups. Supports multiple resolvers and easy integration for Flutter and server-side apps.

Repository (GitHub)
View/report issues

Topics

#dns #doh #network #http #resolver

License

unknown (license)

Dependencies

equatable, freezed_annotation, http, json_annotation

More

Packages that depend on super_dns_client