fixed cidr list url
This commit is contained in:
parent
93d38900c8
commit
02d891b6db
@ -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
|
||||
|
@ -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."
|
||||
|
Loading…
x
Reference in New Issue
Block a user