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
781
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