Files
ipranges/cloudflare/downloader.sh
Gavin D. Howard 343b3ed25b Add Cloudflare (#8)
Signed-off-by: Gavin D. Howard <gavin@gavinhoward.com>
2024-01-05 01:15:17 +03:00

18 lines
349 B
Bash
Executable File

#!/bin/bash
# https://www.cloudflare.com/ips/
set -euo pipefail
set -x
# get from public ranges
curl -s https://www.cloudflare.com/ips-v4/ > /tmp/cf-ipv4.txt
curl -s https://www.cloudflare.com/ips-v6/ > /tmp/cf-ipv6.txt
# sort & uniq
sort -V /tmp/cf-ipv4.txt | uniq > cloudflare/ipv4.txt
sort -V /tmp/cf-ipv6.txt | uniq > cloudflare/ipv6.txt