Support for dynamic ip ranges from urls

- Adds ipranges command to fetch ip ranges from Cloudfront and Cloudflare
- Write the ipranges file on docker start
- Support disabling ipv4 as well as ipv6 now
- Prevent disabling both
This commit is contained in:
Jamie Curnow committed 2023-05-12 09:40:45 +10:00
1 parent f43e41d7d0
commit ab772d645b
18 files changed
+265 -60

No files matched your search

+6 -1
View File
@@ -31,6 +31,10 @@ log_info () {
echo -e "${BLUE}❯ ${CYAN}$1${RESET}"
}
log_warn () {
echo -e "${BLUE}❯ ${YELLOW}WARNING: $1${RESET}"
}
log_error () {
echo -e "${RED}❯ $1${RESET}"
}
@@ -52,7 +56,8 @@ get_group_id () {
# param $1: value
is_true () {
if [ "$1" == 'true' ] || [ "$1" == 'on' ] || [ "$1" == '1' ] || [ "$1" == 'yes' ]; then
VAL=$(echo "${1:-}" | tr '[:upper:]' '[:lower:]')
if [ "$VAL" == 'true' ] || [ "$VAL" == 'on' ] || [ "$VAL" == '1' ] || [ "$VAL" == 'yes' ]; then
echo '1'
else
echo '0'