ipv6: add support for ipv6 addresses lists (#2113)

This commit is contained in:
Ivan Nardi
2023-10-26 20:15:44 +02:00
committed by GitHub
parent 1832d247b3
commit 611c3b66f0
524 changed files with 36435 additions and 3191 deletions
+6 -3
View File
@@ -8,6 +8,7 @@ cd "$(dirname "${0}")" || exit 1
DEST=../src/lib/inc_generated/ndpi_google_cloud_match.c.inc
TMP=/tmp/google_c.json
LIST=/tmp/google_c.list
LIST6=/tmp/google_c.list6
ORIGIN="https://www.gstatic.com/ipranges/cloud.json"
@@ -19,9 +20,11 @@ if [ "$http_response" != "200" ]; then
fi
echo "(2) Processing IP addresses..."
jq -r '.prefixes | .[].ipv4Prefix | select( . != null )' $TMP > $LIST # TODO: ipv6
./ipaddr2list.py $LIST NDPI_PROTOCOL_GOOGLE_CLOUD > $DEST
rm -f $TMP $LIST
jq -r '.prefixes | .[].ipv4Prefix | select( . != null )' $TMP > $LIST
jq -r '.prefixes | .[].ipv6Prefix | select( . != null )' $TMP > $LIST6
./ipaddr2list.py $LIST NDPI_PROTOCOL_GOOGLE_CLOUD $LIST6 > $DEST
rm -f $TMP $LIST $LIST6
echo "(3) Google Cloud IPs are available in $DEST"
exit 0