chg: [tools] add golden IPv4 DNS server in the generate-publicdns.py script

One of the source is regularly dropping 9.9.9.9 as a source of
publicdns. This additional list can be used to ensure these known golden
DNS public resolver are there.
pull/191/head
Alexandre Dulaunoy 2021-07-13 09:21:21 +02:00
parent 9ca0e09801
commit d68a78085c
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import logging
from generator import download_to_file, get_version, write_to_file, get_abspath_source_file
golden_servers_ipv4 = ['9.9.9.9', '8.8.8.8']
def process(file):
lipv4, lipv6, lhostname = get_lists(file)
@ -73,6 +74,10 @@ def get_lists(file):
except ValueError as exc:
logging.warning(str(exc))
for golden in golden_servers_ipv4:
if golden not in lipv4:
lipv4.append(golden)
return lipv4, lipv6, lhostname