Fix azure IP list downloads

This commit is contained in:
László Károlyi 2024-05-06 12:49:32 +02:00
parent 4801aecd9d
commit 28d95f3b0f
Signed by: karolyi
GPG key ID: 2DCAF25E55735BFE
2 changed files with 9 additions and 3 deletions

View file

@ -30,11 +30,17 @@ try:
except ImportError: except ImportError:
from yaml import Dumper, Loader from yaml import Dumper, Loader
# Downloadable list here:
# https://learn.microsoft.com/en-us/azure/virtual-network/service-tags-overview#use-the-service-tag-discovery-api
_URLS: Final = [ _URLS: Final = [
# Public IPs # Public IPs
'https://www.microsoft.com/en-us/download/details.aspx?id=56519', 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=56519',
# Government IPs # Government IPs
'https://www.microsoft.com/en-us/download/details.aspx?id=57063' 'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57063',
# Azure China
'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57062',
# Azure Germany
'https://www.microsoft.com/en-us/download/confirmation.aspx?id=57064',
] ]
# Should match # Should match
# https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20220214.json # https://download.microsoft.com/download/7/1/D/71D86715-5596-4529-9B13-DA13A5DE5B63/ServiceTags_Public_20220214.json

View file

@ -82,7 +82,7 @@ _InternallyParsedDict = dict[IPv4Address | IPv6Address, TorBlacklisted]
class TorChecker(CheckerBase): class TorChecker(CheckerBase):
'Checking if the remote IP is a TOR exit node.' 'Checking if the remote IP is a TOR exit node.'
path: Final = DATA_PATH.joinpath('tor-exitnode-list.yaml') path = DATA_PATH.joinpath('tor-exitnode-list.yaml')
_logger: Final = getLogger(name=__name__) _logger: Final = getLogger(name=__name__)
_lockfile: Final = LOCK_DIR.joinpath('tor-checker') _lockfile: Final = LOCK_DIR.joinpath('tor-checker')
_tmpfile: Final = DATA_PATH.joinpath('tor-exitnode-list.yaml.tmp') _tmpfile: Final = DATA_PATH.joinpath('tor-exitnode-list.yaml.tmp')