wip - v1 => It's working !! #1
@ -6,7 +6,8 @@ services:
|
|||||||
- TZ=Europe/Paris # change to your timezone
|
- 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
|
- BLOCKLIST_CRON=0 6 * * * # at 6:00 every days
|
||||||
- DOCKER_API_URL=http://socket-proxy-adguard:2375
|
- DOCKER_API_URL=http://socket-proxy-adguard:2375 # docker socket proxy
|
||||||
|
- ADGUARD_CONTAINER_NAME=adguardhome # adguard container name
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/adguard/confdir:/adguard
|
- /path/to/adguard/confdir:/adguard
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ services:
|
|||||||
- no-new-privileges:true
|
- no-new-privileges:true
|
||||||
environment:
|
environment:
|
||||||
- CONTAINERS=1
|
- CONTAINERS=1
|
||||||
|
- ALLOW_RESTARTS=1
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -8,6 +8,7 @@ MANUAL_IPS_FILE="/adguard/manually_blocked_ips.conf"
|
|||||||
CIDR_BASE_URL="https://raw.githubusercontent.com/vulnebify/cidre/main/output/cidr/ipv4"
|
CIDR_BASE_URL="https://raw.githubusercontent.com/vulnebify/cidre/main/output/cidr/ipv4"
|
||||||
COUNTRIES=${BLOCK_COUNTRIES:-""}
|
COUNTRIES=${BLOCK_COUNTRIES:-""}
|
||||||
DOCKER_API_URL=${DOCKER_API_URL:-"http://socket-proxy-adguard:2375"}
|
DOCKER_API_URL=${DOCKER_API_URL:-"http://socket-proxy-adguard:2375"}
|
||||||
|
ADGUARD_CONTAINER_NAME=${ADGUARD_CONTAINER_NAME:-"adguardhome"}
|
||||||
|
|
||||||
if [ -z "$COUNTRIES" ]; then
|
if [ -z "$COUNTRIES" ]; then
|
||||||
echo "No countries specified in BLOCK_COUNTRIES."
|
echo "No countries specified in BLOCK_COUNTRIES."
|
||||||
@ -42,6 +43,6 @@ END { if (inside==1) print ips }
|
|||||||
mv "$TMP_YAML" "$ADGUARD_YAML"
|
mv "$TMP_YAML" "$ADGUARD_YAML"
|
||||||
|
|
||||||
echo "Restarting adguard-home container..."
|
echo "Restarting adguard-home container..."
|
||||||
curl -s -X POST "$DOCKER_API_URL/containers/adguard-home/restart" -o /dev/null
|
curl -s -X POST "$DOCKER_API_URL/containers/$ADGUARD_CONTAINER_NAME/restart" -o /dev/null
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user