tpws,nfqws: autohostlist reread on modify

This commit is contained in:
bol-van
2024-03-23 22:57:05 +03:00
parent b6ec750879
commit 14428cd545
36 changed files with 123 additions and 21 deletions

View File

@@ -796,6 +796,10 @@ may start to break the website. This situation can only be controlled manually.
Remove undesired domain from the autohostlist file, restart nfqws/tpws or send them SIGHUP.
Use exclude hostlist to prevent further auto additions.
It's possible to use one auto hostlist with multiple processes. All processes check for file modification time.
If a process modified autohostlist, all others will reread it automatically.
All processes must run with the same uid.
If zapret scripts are used then autohostlist is `ipset/zapret-hosts-auto.txt`
and exlude list is `ipset/zapret-hosts-user-exclude.txt`. autohostlist mode
includes hostlist mode. You can use `ipset/zapret-hosts-user.txt`.

View File

@@ -1041,6 +1041,10 @@ nfqws и tpws могут сечь варианты 1-3, 4 они не распо
В лог заносятся только основные события, ведущие к занесению хоста в лист.
По логу можно понять как избежать ложных срабатываний и подходит ли вообще вам этот режим.
Возможно использование одного auto листа с множеством процессов. Все процессы проверяют
время изменения файла. Если другой процесс туда что-то записал, то остальные перечитают все include листы.
Все процессы должны работать под одним uid, чтобы избежать проблем с доступом к файлу.
Скрипты zapret ведут autohostlist в ipset/zapret-hosts-auto.txt.
install_easy.sh при апгрейде zapret сохраняет этот файл.
Режим autohostlist включает в себя режим hostlist.