fix issue with home net
This commit is contained in:
@@ -8,4 +8,4 @@ You should have received a copy of the license along with this
|
||||
work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.
|
||||
"""
|
||||
|
||||
__version__ = "0.3.9"
|
||||
__version__ = "0.3.10"
|
||||
@@ -34,6 +34,8 @@ import requests
|
||||
import csv
|
||||
import gzip
|
||||
import gc
|
||||
import tzlocal
|
||||
from netaddr.ip import IPNetwork
|
||||
|
||||
DEFAULT__Cache_Expiration_Second = 600
|
||||
DEFAULT__Cache_Size_Entries = 2048
|
||||
@@ -316,7 +318,7 @@ class ChaChaIPToCountryStorage:
|
||||
_ipv4set["ZZ"].update(IPRange("172.16.0.0", "172.31.255.255"))
|
||||
_ipv4set["ZZ"].ForceCompact()
|
||||
if DEFAULT__EnableIPV6:
|
||||
_ipv6set["ZZ"].update(IPRange("fc00::/7"))
|
||||
_ipv6set["ZZ"].update(IPNetwork("fc00::/7"))
|
||||
_ipv6set["ZZ"].ForceCompact()
|
||||
|
||||
|
||||
@@ -456,15 +458,11 @@ class ChaChaIPToCountryStorage:
|
||||
|
||||
#Add private network at the end
|
||||
|
||||
|
||||
|
||||
_ipv4setTz["ZZ"] = dict()
|
||||
_ipv4setTz["ZZ"]["Etc/Universal"] = IPSet()
|
||||
_ipv4setTz["ZZ"]["Etc/Universal"].update(IPRange("0.0.0.0/0"))
|
||||
_ipv4setTz["ZZ"][tzlocal.get_localzone_name()] = IPSet(IPNetwork("0.0.0.0/0"))
|
||||
if DEFAULT__EnableIPV6:
|
||||
_ipv6setTz["ZZ"] = dict()
|
||||
_ipv6setTz["ZZ"]["Etc/Universal"] = IPSet()
|
||||
_ipv6setTz["ZZ"]["Etc/Universal"].update(IPRange("0::/0"))
|
||||
_ipv6setTz["ZZ"][tzlocal.get_localzone_name()] = IPSet(IPNetwork(::/0"))
|
||||
|
||||
print("Updating live IPV4 storage")
|
||||
await self.DataSetlock.acquire()
|
||||
|
||||
2
setup.py
2
setup.py
@@ -3,7 +3,7 @@
|
||||
from setuptools import setup,find_packages
|
||||
|
||||
_PACKAGE_MANE="ChaChaIPToCountryDaemon"
|
||||
_REQUIRES = ["tornado","gitpython","netaddr","aiofiles","pycountry","dnspython","asyncstdlib","pytz"]
|
||||
_REQUIRES = ["tornado","gitpython","netaddr","aiofiles","pycountry","dnspython","asyncstdlib","pytz","tzlocal"]
|
||||
|
||||
with open("./README.md", "r") as fh:
|
||||
long_description = fh.read()
|
||||
|
||||
Reference in New Issue
Block a user