This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
# User/group id the process runs as, matches ownership of the /adguard mount
|
||||
PUID=1000
|
||||
PGID=1000
|
||||
|
||||
# Timezone of the container
|
||||
TZ=Europe/Paris
|
||||
|
||||
# Country codes for CIDR lists, comma separated. Prefix with ! to exclude instead of include.
|
||||
# Full lists here: https://github.com/vulnebify/cidre/tree/main/output/cidr/ipv4
|
||||
BLOCK_COUNTRIES=cn,ru
|
||||
|
||||
# Scheduling: daily or weekly
|
||||
BLOCKLIST_CRON_TYPE=daily
|
||||
# If weekly, choose the day: mon, tue, wed, thu, fri, sat, sun
|
||||
BLOCKLIST_CRON_DAY=mon
|
||||
# Time of day to run the update, 24h HH:MM format
|
||||
BLOCKLIST_CRON_TIME=06:00
|
||||
|
||||
# Docker API URL used to restart the AdGuard container (via socket-proxy)
|
||||
DOCKER_API_URL=http://socket-proxy-adguard:2375
|
||||
# Name of the AdGuard Home container to restart
|
||||
ADGUARD_CONTAINER_NAME=adguardhome
|
||||
@@ -125,11 +125,12 @@
|
||||
git clone https://git.djeex.fr/Djeex/adguard-cidre
|
||||
cd adguard-cidre
|
||||
```
|
||||
2. **Modify docker-compose.yml**
|
||||
2. **Edit the `.env` file**
|
||||
|
||||
- Set `BLOCK_COUNTRIES` environment variable with the countries you want to block.
|
||||
- Adjust `BLOCKLIST_CRON` variables if you want a different update frequency.
|
||||
- Bind mount your adguard configuration folder (wich contains `AdGuardHome.yaml`) to `/adguard`
|
||||
- A `.env` file is included at the repo root with all environment variables (see [Environment Variables](#environment-variables)). Edit values there instead of `docker-compose.yml`.
|
||||
- Set `BLOCK_COUNTRIES` with the countries you want to block.
|
||||
- Adjust `BLOCKLIST_CRON_*` variables if you want a different update frequency.
|
||||
- Bind mount your adguard configuration folder (wich contains `AdGuardHome.yaml`) to `/adguard` in `docker-compose.yml`.
|
||||
- (optionnally) create and edit `manually_blocked_ips.conf` file in your adguard configuration folder to add other IPs you want to block. Only valid IP or CIDR entries will be processed, for exemple :
|
||||
|
||||
```bash
|
||||
|
||||
+9
-9
@@ -5,16 +5,16 @@ services:
|
||||
container_name: adguard-cidre
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- PUID=1000 # user id the process runs as, matches ownership of the /adguard mount
|
||||
- PGID=1000 # group id the process runs as
|
||||
- TZ=Europe/Paris # change to your timezone
|
||||
- BLOCK_COUNTRIES=cn,ru # choose countries listed IP to block. Full lists here https://github.com/vulnebify/cidre/tree/main/output/cidr/ipv4
|
||||
- BLOCKLIST_CRON_TYPE=daily # daily or weekly
|
||||
- PUID=${PUID} # user id the process runs as, matches ownership of the /adguard mount
|
||||
- PGID=${PGID} # group id the process runs as
|
||||
- TZ=${TZ} # change to your timezone
|
||||
- BLOCK_COUNTRIES=${BLOCK_COUNTRIES} # choose countries listed IP to block. Full lists here https://github.com/vulnebify/cidre/tree/main/output/cidr/ipv4
|
||||
- BLOCKLIST_CRON_TYPE=${BLOCKLIST_CRON_TYPE} # daily or weekly
|
||||
# if weekly, choose the day
|
||||
# - BLOCKLIST_CRON_DAY=mon
|
||||
- BLOCKLIST_CRON_TIME=06:00
|
||||
- DOCKER_API_URL=http://socket-proxy-adguard:2375 # docker socket proxy
|
||||
- ADGUARD_CONTAINER_NAME=adguardhome # adguard container name
|
||||
- BLOCKLIST_CRON_DAY=${BLOCKLIST_CRON_DAY}
|
||||
- BLOCKLIST_CRON_TIME=${BLOCKLIST_CRON_TIME}
|
||||
- DOCKER_API_URL=${DOCKER_API_URL} # docker socket proxy
|
||||
- ADGUARD_CONTAINER_NAME=${ADGUARD_CONTAINER_NAME} # adguard container name
|
||||
volumes:
|
||||
- /path/to/adguard/confdir:/adguard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user