docs: improve the wording, add targeted examples

This commit is contained in:
fufsob committed 2026-09-25 09:54:12 +00:00
1 parent 53fc86dd83
commit 63d9dffcae
61 files changed
+3422 -5861

No files matched your search

+16 -15
View File
@@ -16,30 +16,31 @@ in
];
default = "zapret-discord-youtube";
description = ''
"zapret-discord-youtube": nfqws with curated presets and static hostlists (zapret.zapret-discord-youtube).
"zapret2": nfqws2, which learns blocked hosts at runtime (zapret.zapret2).
Which zapret to run:
- "zapret-discord-youtube": ready-made presets and fixed site lists.
- "zapret2": learns blocked sites at runtime.
'';
example = "zapret2";
};
# What zapret feeds back into the client routing table.
directSync = {
enable = bool true "Add zapret's domain hostlists to proxy.routing.direct.";
upstreamIps = bool false "Add zapret's upstream ipsets to proxy.routing.direct.";
userIps = bool true "Add zapret-discord-youtube.ips, minus zapret-discord-youtube.excludeIps, to proxy.routing.direct.";
enable = bool true "Send zapret's domains direct in the proxy routing, so zapret handles them.";
upstreamIps = bool false "Also send zapret's upstream IP lists direct.";
userIps = bool true "Also send `zapret-discord-youtube.ips` (minus `excludeIps`) direct.";
};
# Shared by both engines: a netfilter-level bypass, not an engine-specific concept.
cidrExemption = {
enable = mkEnableOption "exempting subnets from zapret, e.g. NATed VMs whose traffic it would break";
cidrs = list "Exempted subnets." [ "192.168.123.0/24" ];
enable = mkEnableOption "skipping zapret for some subnets, such as NATed VMs it would break";
cidrs = list "Subnets zapret skips." [ "192.168.123.0/24" ];
};
zapret-discord-youtube = {
configName = mkOption {
type = types.str;
default = "general(ALT)";
description = "Upstream strategy preset. Names that differ only in whitespace match.";
description = "Strategy preset name (spaces are ignored).";
example = "general (ALT9)";
};
@@ -51,14 +52,14 @@ in
"null"
];
default = "null";
description = ''Game traffic filter, or "null" for off.'';
description = ''Which game traffic to handle, or "null" for none.'';
example = "all";
};
domains = list "Extra domains to bypass." [ "youtube.com" ];
excludeDomains = list "Domains never bypassed." [ "music.youtube.com" ];
ips = list "Extra IPs/CIDRs to bypass." [ "203.0.113.0/24" ];
excludeIps = list "IPs/CIDRs never bypassed." [ "203.0.113.10/32" ];
domains = list "Extra domains to unblock." [ "youtube.com" ];
excludeDomains = list "Domains zapret never touches." [ "music.youtube.com" ];
ips = list "Extra IPs or CIDRs to unblock." [ "203.0.113.0/24" ];
excludeIps = list "IPs or CIDRs zapret never touches." [ "203.0.113.10/32" ];
includeExtraUpstreamLists = bool false "Also use the upstream instagram, soundcloud and twitter lists.";
@@ -66,8 +67,8 @@ in
type = types.listOf t.zapretHostlistRuleType;
default = [ ];
description = ''
Extra named hostlists, each with its own strategy: cloned from a preset or configName,
or given as nfqwsArgs.
Extra site lists, each with its own strategy: copied from a `preset` or `configName`,
or given as raw `nfqwsArgs`.
'';
example = [
{