super_dns_client 0.3.5 copy "super_dns_client: ^0.3.5" to clipboard
super_dns_client: ^0.3.5 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.

Changelog #

0.3.5 #

πŸ›  Fixed #

  • Fixed System DNS resolution behavior on Android and iOS.
    Since mobile platforms do not expose system DNS servers (getprop or /etc/resolv.conf inaccessible in sandbox),
    the resolver now falls back to the platform’s default DNS resolver automatically.
  • Updated SystemUdpSrvClient to:
    • Remove unsupported system calls on Android/iOS.
    • Use platform-resolved InternetAddress.lookup() instead.
    • Keep /etc/resolv.conf parsing for Linux/macOS environments.

βš™οΈ Internal #

  • Improved debug logs to clearly indicate when the client uses automatic platform DNS fallback.
  • Ensured consistent behavior across Android, iOS, Linux, and macOS.

0.3.4 #

Changed #

  • Replaced parallel SRV lookup with sequential lookup in DnsOverHttps to improve stability and resolver consistency.
  • Ensured predictable fallback order between Google and Cloudflare resolvers.
  • Minor code refactor for clarity and better logging around sequential resolution.

0.3.3 #

Changed #

  • Updated dependency to super_dns >=0.1.1 to support Flutter Web builds.
  • Synchronized internal client implementation with stubbed DnsServer logic for web environments.

0.3.2 #

Fixed #

  • Replaced all dart:io imports with universal_io to support Flutter Web builds.
  • Fixed type mismatch error between dart:io and universal_io InternetAddress classes.
  • Ensured DnsClient and related classes compile correctly on both mobile and web platforms.

0.3.1 #

πŸ”§ Public Exports #

  • Exported all new SRV-related classes and clients in super_dns_client.dart:
    • BaseUdpSrvClient
    • SystemUdpSrvClient
    • PublicUdpSrvClient
    • SrvRecord
    • DnsResolver
    • DnsClient

🧩 Improvements #

  • Ensured all new resolvers and models are available for external import.
  • Minor cleanup and final formatting before release.

0.3.0 #

✨ New Features #

  • Added BaseUdpSrvClient abstract class for shared SRV lookup logic.
  • Implemented:
    • SystemUdpSrvClient: queries SRV records via system-configured DNS (UDP β†’ TCP fallback).
    • PublicUdpSrvClient: queries SRV records via public resolvers (Quad9, AdGuard, Yandex, OpenDNS, etc.).
    • DnsOverHttps.lookupSrvMulti(): sequential SRV lookup (Google β†’ Cloudflare fallback).
    • DnsOverHttps.lookupSrvParallel(): parallel SRV lookup (runs both resolvers simultaneously).
  • Added SrvRecord model for typed SRV response handling instead of generic Map.
  • Improved example dns_client_example.dart to demonstrate all client types:
    • System resolver
    • Public resolver
    • DoH (Google, Cloudflare, Mullvad)
  • Added complete test coverage for:
    • UDP/TCP SRV clients
    • DoH SRV (multi + parallel)
    • System and public resolver detection
    • Error fallback (UDP timeout β†’ TCP)
  • Refactored project structure:

lib/src/doh/ lib/src/udp_tcp/ lib/src/models/ example/dns_client_example.dart

βš™οΈ Improvements #

  • Enhanced fallback logic between Google and Cloudflare DoH resolvers.
  • Added English-only documentation comments for consistency.
  • Improved debug logging for all SRV clients.

🧩 Fixes #

  • Better error handling for IPv6 and system DNS detection.
  • Tests now handle dynamic DNS environments safely (no hardcoded IPs).
  • Fixed internal method visibility and export paths.

πŸ§ͺ Tests #

  • Added new unit tests for:
    • DnsOverHttps.lookupSrvMulti()
    • DnsOverHttps.lookupSrvParallel()
  • Ensured 100% test coverage across DoH, UDP, and TCP clients.

πŸ”§ Misc #

  • Updated GitHub workflows (analyze.yml, test.yml).
  • Cleaned up comments and improved readability throughout the codebase.

0.2.1 #

πŸ›  Fixes #

  • Exported DnsOverHttpsBinaryClient in super_dns_client.dart so it is now publicly accessible from the package import.

πŸ”§ Internal #

  • Minor cleanup before pub.dev publish

0.2.0 #

✨ New Features #

  • Added DnsOverHttpsBinaryClient for binary DNS-over-HTTPS lookups (RFC 8484).
  • Support for SRV record resolution over DoH.
  • Added DnsResolver object model (name, url, supportsGet, isTrusted).
  • Built-in non-GAFAM resolvers:
    • Quad9
    • AdGuard
    • Yandex
    • OpenDNS
    • Mullvad (GET only)

βš™οΈ Improvements #

  • Automatic GET/POST selection depending on resolver capability.
  • Unified lookup() and lookupDataByRRType() API with optional resolverName.
  • Enhanced error handling for invalid resolvers and DoH failures.

πŸ§ͺ Tests & Examples #

  • Added unit tests for SRV and A record lookups via Quad9.
  • Updated example to demonstrate both DnsOverHttps and DnsOverHttpsBinaryClient usage.

0.1.0 #

πŸŽ‰ Initial release of super_dns_client

  • Added DNS-over-HTTPS client implementation
  • Supported Google, Cloudflare, Quad9, and OpenDNS resolvers
  • Supported record types: A, AAAA, CNAME, SRV, TXT
  • Added base response model with freezed and json_serializable
  • Unit tests and CI configuration ready
2
likes
0
points
751
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, super_dns, super_raw, universal_io

More

Packages that depend on super_dns_client