aboutsummaryrefslogtreecommitdiff
path: root/utils/protonvpn_ip_addresses_download.sh
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-10-26 20:15:44 +0200
committerGitHub <noreply@github.com>2023-10-26 20:15:44 +0200
commit611c3b66f0db3ca113db6fb71534231bb87b4cef (patch)
tree0dc777ffbf5a52e64b248b99b38620680d2a01d8 /utils/protonvpn_ip_addresses_download.sh
parent1832d247b39e24ac7cc1b8417ca076bd61ae9c6e (diff)
ipv6: add support for ipv6 addresses lists (#2113)
Diffstat (limited to 'utils/protonvpn_ip_addresses_download.sh')
-rwxr-xr-xutils/protonvpn_ip_addresses_download.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/utils/protonvpn_ip_addresses_download.sh b/utils/protonvpn_ip_addresses_download.sh
index 94e7cfa37..af3625520 100755
--- a/utils/protonvpn_ip_addresses_download.sh
+++ b/utils/protonvpn_ip_addresses_download.sh
@@ -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