push to repo
This commit is contained in:
69
README.md
Normal file
69
README.md
Normal file
@@ -0,0 +1,69 @@
|
||||
# AdGuard Scheduler
|
||||
|
||||
Skrypt do zarządzania dynamicznymi regułami filtrowania AdGuard na podstawie harmonogramów i konfiguracji klientów.
|
||||
|
||||
## 📦 Wymagania
|
||||
|
||||
- Python 3.6+
|
||||
- Biblioteki:
|
||||
- `requests`
|
||||
|
||||
Zainstaluj:
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
## ⚙️ Konfiguracja
|
||||
|
||||
Skonfiguruj serwery i klientów w pliku `.ini`. Przykład:
|
||||
```ini
|
||||
[server:home]
|
||||
url = http://192.168.1.1:3000
|
||||
username = admin
|
||||
password = haslo
|
||||
|
||||
[client:tv]
|
||||
ip = 192.168.1.101
|
||||
services = youtube.com, netflix.com
|
||||
schedule = whole
|
||||
```
|
||||
|
||||
Obsługiwane harmonogramy:
|
||||
- `whole` — zawsze blokuj
|
||||
- `custom:HH-HH` — tylko w określonych godzinach (np. `custom:22-6`)
|
||||
|
||||
## 🚀 Użycie
|
||||
|
||||
### Uruchomienie
|
||||
```bash
|
||||
python adguard_scheduler.py
|
||||
```
|
||||
|
||||
### Z własnym plikiem config:
|
||||
```bash
|
||||
python adguard_scheduler.py /ścieżka/do/config.ini
|
||||
```
|
||||
|
||||
### Z katalogiem:
|
||||
```bash
|
||||
python adguard_scheduler.py --config-dir /etc/adguard_configs
|
||||
```
|
||||
|
||||
### Tryb cron (bez outputu):
|
||||
```bash
|
||||
python adguard_scheduler.py --cron
|
||||
```
|
||||
|
||||
### Instalacja zadania cron co godzinę:
|
||||
```bash
|
||||
python adguard_scheduler.py --install-cron
|
||||
```
|
||||
|
||||
### Pomoc:
|
||||
```bash
|
||||
python adguard_scheduler.py --help
|
||||
```
|
||||
|
||||
## 📁 Przykład konfiguracji
|
||||
|
||||
Zobacz plik: [`config.example.ini`](./config.example.ini)
|
||||
Reference in New Issue
Block a user