Use Cloudflare Public DNS instead of Google
This commit is contained in:
parent
5517b428fc
commit
173f7dee0b
@ -38,10 +38,10 @@ def get_external_ip(version):
|
||||
resolver = dns.resolver.Resolver()
|
||||
resolver.timeout = 3
|
||||
resolver.lifetime = 3
|
||||
resolver.nameservers = ['8.8.8.8', '8.8.4.4', '2001:4860:4860::8888', '2001:4860:4860::8844']
|
||||
resolver.nameservers = ['1.1.1.1', '1.0.0.1', '2606:4700:4700::1111', '2606:4700:4700::1001']
|
||||
|
||||
def resolve_ip(domain, query_type):
|
||||
# Resolve domain name using Google Public DNS
|
||||
# Resolve domain name using Cloudflare Public DNS
|
||||
try:
|
||||
return resolver.query(domain, query_type)[0].address
|
||||
except dns.resolver.NXDOMAIN:
|
||||
|
Loading…
Reference in New Issue
Block a user