Resolve domain names to IP addresses via DNS-over-HTTPS (DoH).
python doh_resolver.py [-4] [-6]- Default: prefers IPv4, falls back to IPv6
-4— IPv4 only-6— IPv6 only
dns.ini — DoH server URLs, one per line:
https://dns.alidns.com/dns-query
https://dns.google/dns-query
domain.txt — domain names, one per line:
example.com
example.org
Results are saved to ip_<timestamp>.txt with domain=ip format. If the file already exists, you will be prompted before overwriting.
- Only the first resolved IP is used per domain.
- Supports both Google JSON API (
?name=&type=) and Alibaba/resolveendpoint formats. - Multiple DoH servers are supported; the script falls back to the next server on failure.
- DeepSeek V4 Flash