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
+9 -4
View File
@@ -9,6 +9,7 @@ DEST_IN=../src/lib/inc_generated/ndpi_protonvpn_in_match.c.inc
DEST_OUT=../src/lib/inc_generated/ndpi_protonvpn_out_match.c.inc
TMP=/tmp/proton.json
LIST=/tmp/proton.list
LIST6=/tmp/proton.list6
LIST_MERGED=/tmp/proton.list.merged
ORIGIN=https://api.protonmail.ch/vpn/logicals
@@ -22,16 +23,20 @@ echo "(2) Processing IP addresses..."
jq -r '.LogicalServers[].Servers[].EntryIP' $TMP > $LIST # TODO: ipv6
is_file_empty "${LIST}"
./mergeipaddrlist.py $LIST > $LIST_MERGED
./ipaddr2list.py $LIST_MERGED NDPI_PROTOCOL_PROTONVPN > $DEST_IN
#TODO: no ipv6 yet
touch $LIST6
./ipaddr2list.py $LIST_MERGED NDPI_PROTOCOL_PROTONVPN $LIST6 > $DEST_IN
is_file_empty "${DEST_IN}"
jq -r '.LogicalServers[].Servers[].ExitIP' $TMP > $LIST # TODO: ipv6
is_file_empty "${LIST}"
./mergeipaddrlist.py $LIST > $LIST_MERGED
./ipaddr2list.py $LIST_MERGED NDPI_ANONYMOUS_SUBSCRIBER "_protonvpn"> $DEST_OUT
is_file_empty "${DEST_IN}"
#TODO: no ipv6 yet
touch $LIST6
./ipaddr2list.py $LIST_MERGED NDPI_ANONYMOUS_SUBSCRIBER $LIST6 "_protonvpn"> $DEST_OUT
is_file_empty "${DEST_OUT}"
rm -f $TMP $LIST $LIST_MERGED
rm -f $TMP $LIST $LIST_MERGED $LIST6
echo "(3) ProtonVPN IPs are available in $DEST_IN, $DEST_OUT"
exit 0