diff --git a/docker-compose.yml b/docker-compose.yml index 176381f..f56559c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: container_name: adguard-cidre environment: - TZ=Europe/Paris # change to your timezone - - BLOCK_COUNTRIES=CN,RU,IR # choose countries listed IP to block. Full lists here https://github.com/vulnebify/cidre/tree/main/output/cidr/ipv4 + - BLOCK_COUNTRIES=cn,ru,ir # choose countries listed IP to block. Full lists here https://github.com/vulnebify/cidre/tree/main/output/cidr/ipv4 - BLOCKLIST_CRON=0 6 * * * # at 6:00 every days - DOCKER_API_URL=http://socket-proxy-adguard:2375 # docker socket proxy - ADGUARD_CONTAINER_NAME=adguardhome # adguard container name diff --git a/update-blocklist.sh b/update-blocklist.sh index 1ee035f..2c4b965 100644 --- a/update-blocklist.sh +++ b/update-blocklist.sh @@ -21,8 +21,8 @@ mkdir -p /tmp/cidr IFS=',' read -ra CODES <<< "$COUNTRIES" for CODE in "${CODES[@]}"; do echo "Downloading CIDR list for $CODE..." - curl -sf "$CIDR_BASE_URL/${CODE^^}.txt" -o "/tmp/cidr/${CODE}.txt" || continue - cat "/tmp/cidr/${CODE}.txt" >> /tmp/cidr/all.txt + curl -sf "$CIDR_BASE_URL/${CODE,,}.cidr" -o "/tmp/cidr/${CODE}.cidr" || continue + cat "/tmp/cidr/${CODE}.cidr" >> /tmp/cidr/all.txt done if [ -f "$MANUAL_IPS_FILE" ]; then @@ -42,7 +42,7 @@ END { if (inside==1) print ips } mv "$TMP_YAML" "$ADGUARD_YAML" -echo "Restarting adguard-home container..." +echo "Restarting adguard..." curl -s -X POST "$DOCKER_API_URL/containers/$ADGUARD_CONTAINER_NAME/restart" -o /dev/null echo "Done."