IP lists: aggregate addresses wherever possible (#2152)

See #2150
This commit is contained in:
Ivan Nardi
2023-11-17 12:26:23 +01:00
committed by GitHub
parent 6c9571d9a9
commit bdb73db1a4
43 changed files with 4550 additions and 82181 deletions
+7 -1
View File
@@ -8,6 +8,8 @@ cd "$(dirname "${0}")" || exit 1
DEST=../src/lib/inc_generated/ndpi_google_match.c.inc
LIST=/tmp/google.list
LIST6=/tmp/google.list6
LIST_MERGED=/tmp/google.list_m
LIST6_MERGED=/tmp/google.list6_m
echo "(1) Downloading file..."
#Nothing to do
@@ -16,9 +18,13 @@ echo "(2) Processing IP addresses..."
#https://cloud.google.com/vpc/docs/configure-private-google-access#ip-addr-defaults
python3 google.py > $LIST
is_file_empty "${LIST}"
./mergeipaddrlist.py $LIST > $LIST_MERGED
is_file_empty "${LIST_MERGED}"
python3 google6.py > $LIST6
is_file_empty "${LIST6}"
./ipaddr2list.py $LIST NDPI_PROTOCOL_GOOGLE $LIST6 > $DEST
./mergeipaddrlist.py $LIST6 > $LIST6_MERGED
is_file_empty "${LIST6_MERGED}"
./ipaddr2list.py $LIST_MERGED NDPI_PROTOCOL_GOOGLE $LIST6_MERGED > $DEST
is_file_empty "${DEST}"
rm -f $TMP $LIST $LIST6