From 343473914433fba852b6004f36d8f90c2f7441f4 Mon Sep 17 00:00:00 2001 From: bol-van Date: Sun, 1 Feb 2026 14:50:57 +0300 Subject: [PATCH] update docs --- docs/manual.en.md | 21 +++++++++++++-------- docs/manual.md | 17 +++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/docs/manual.en.md b/docs/manual.en.md index 30260e6..5e49f29 100644 --- a/docs/manual.en.md +++ b/docs/manual.en.md @@ -796,13 +796,18 @@ icmp automatically assumes icmpv6 - they are processed the same they. However ic ### Profile templates -When dealing with many complex and repetitive strategies, it can be convenient to use templates. -A template is essentially a profile that is not active; instead, it is placed in a separate template list. -A profile becomes a template by using the `--template=` parameter. -It can then be imported using `--import=`. Importing copies the entire profile, not just the specified settings-all other settings are reset to their default values. -Any existing settings in the current profile are wiped, including the name. -Therefore, `--import` should be written at the beginning, followed by parameters unique to that profile. -Templates can also import one another. A unique name is mandatory for a template, and since importing copies the name, you must assign a unique name using `--name` after the import. +When there are many complex and repetitive strategies or groups of the same parameters, it may be convenient to use templates. +A template is also a profile but it doesn't go to the working profile list but to a separate list of templates. +The profile becomes a template by setting the `--template = ` parameter. +It can then be imported (`--import = `) into another profile or template. +Simple parameters - number, string or bool - are imported only if they were specified in the imported template. When you import a template into a template in the destination template, they are also considered specified. +List parameters are added to the end of the corresponding list. Such parameters are anything that can take a list of values. For example, hostlists or `--filter-tcp`. +The template number and name are not copied. + +The `--import` directives can be anywhere. Previous simple specified parameters are overwritten by new imported or specified in the current profile parameters. + +A special prohibition is the replacement of autohostlist. The template may have an autohostlist, but importing somewhere that already has an autohostlist will fail. + ``` nfqws2 @@ -820,7 +825,7 @@ In this example, there are 3 active profiles and 3 templates, one of which impor - Profile **prof2** receives a combination of ``, ``, and ``. - Profile **prof3** receives ``. It does not import any templates. -Any parameters applicable to profiles, including filters, are allowed within templates. +Any parameters applicable to profiles, including filters, are allowed within templates. Global parameters are not a part of templates or profiles. ### Filtering by ipsets diff --git a/docs/manual.md b/docs/manual.md index ae17862..d592ae7 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -861,15 +861,16 @@ icmp автоматически подразумевает и icmpv6 - они о ### Шаблоны профилей -Когда имеется много сложных и повторяющихся стратегий, может быть удобно использовать шаблоны. +Когда имеется много сложных и повторяющихся стратегий или групп одинаковых параметров, может быть удобно использовать шаблоны. Шаблон - это такой же профиль, только он не идет в работу, а попадает в отдельный список шаблонов. Шаблоном профиль становится через задание параметра `--template=`. -Далее он может быть импортирован (`--import=`). Импорт предполагает копирование профиля полностью, -а не только тех настроек, которые в нем были указаны - все остальные настройки имеют значения по умолчанию. -Любые настройки текущего профиля стираются, включая и имя. -Поэтому `--import` надо писать в начале, а потом добавлять уникальные для профиля параметры. -Шаблоны могут импортировать и друг друга. Для шаблона обязательно уникальное имя, а при импорте имя копируется, -поэтому обязательно надо задать уникальное имя через `--name`. +Далее он может быть импортирован (`--import=`) в другой профиль или другой шаблон. +Простые параметры - число, строка или bool - импортируются только, если они были заданы в импортируемом шаблоне. При иморте шаблона в шаблон в шаблоне назначения они так же считаются заданными. +Списочные параметры добавляются в конец списка. Такими параметрами является все, что может принимать список значений. Например, хостлисты или `--filter-tcp`. +Номер и имя шаблона не копируются. +Директив `--import` может быть сколько угодно в любом месте. Предыдущие простые заданные параметры затираются новыми импортированными или заданными в текущем профиле. + +Особый запрет - замещение autohostlist. Шаблон может иметь autohostlist, но при импорте куда-то, где уже есть autohostlist, будет ошибка. ``` nfqws2 <глобальные_параметры> @@ -887,7 +888,7 @@ nfqws2 <глобальные_параметры> - Профиль prof2 получает обьединение `<базовые параметры 2>`, `<базовые параметры 3>` и `<дополнительные параметры 2>` - Профиль prof3 получает `<параметры 3>`. Он не импортирует шаблоны. -В шаблонах допустимы любые параметры, относящиеся к профилям, включая и фильтры. +В шаблонах допустимы любые параметры, относящиеся к профилям, включая и фильтры. Глобальные параметры не являются частью профилей и шаблонов. ### Фильтрация по ipset