18 KiB
services.proxy-suite.zapret
Part of the proxy-suite options reference.
Options
- zapret
- enable
- cidrExemption
- directSync
- engine
- zapret-discord-youtube
- zapret2
- autoHostlist
- blobs
- cutoff
- domains
- excludeDomains
- ipv6
- ports
- profiles
- strategySource
services.proxy-suite.zapret.enable
Whether to enable zapret DPI bypass.
Type: boolean
Default:
false
Example:
true
services.proxy-suite.zapret.cidrExemption.enable
Whether to enable exempting subnets from zapret, e.g. NATed VMs whose traffic it would break.
Type: boolean
Default:
false
Example:
true
services.proxy-suite.zapret.cidrExemption.cidrs
Exempted subnets.
Type: list of string
Default:
[ ]
Example:
[
"192.168.123.0/24"
]
services.proxy-suite.zapret.directSync.enable
Add zapret’s domain hostlists to proxy.routing.direct.
Type: boolean
Default:
true
services.proxy-suite.zapret.directSync.upstreamIps
Add zapret’s upstream ipsets to proxy.routing.direct.
Type: boolean
Default:
false
services.proxy-suite.zapret.directSync.userIps
Add zapret-discord-youtube.ips, minus zapret-discord-youtube.excludeIps, to proxy.routing.direct.
Type: boolean
Default:
true
services.proxy-suite.zapret.engine
“zapret-discord-youtube”: nfqws with curated presets and static hostlists (zapret.zapret-discord-youtube). “zapret2”: nfqws2, which learns blocked hosts at runtime (zapret.zapret2).
Type: one of “zapret-discord-youtube”, “zapret2”
Default:
"zapret-discord-youtube"
Example:
"zapret2"
services.proxy-suite.zapret.zapret-discord-youtube.configName
Upstream strategy preset. Names that differ only in whitespace match.
Type: string
Default:
"general(ALT)"
Example:
"general (ALT9)"
services.proxy-suite.zapret.zapret-discord-youtube.domains
Extra domains to bypass.
Type: list of string
Default:
[ ]
Example:
[
"youtube.com"
]
services.proxy-suite.zapret.zapret-discord-youtube.excludeDomains
Domains never bypassed.
Type: list of string
Default:
[ ]
Example:
[
"music.youtube.com"
]
services.proxy-suite.zapret.zapret-discord-youtube.excludeIps
IPs/CIDRs never bypassed.
Type: list of string
Default:
[ ]
Example:
[
"203.0.113.10/32"
]
services.proxy-suite.zapret.zapret-discord-youtube.gameFilter
Game traffic filter, or “null” for off.
Type: one of “all”, “tcp”, “udp”, “null”
Default:
"null"
Example:
"all"
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules
Extra named hostlists, each with its own strategy: cloned from a preset or configName, or given as nfqwsArgs.
Type: list of (submodule)
Default:
[ ]
Example:
[
{
configName = "general(ALT9)";
defaultDomains = [
"youtube"
];
name = "youtube-alt9";
}
{
domains = [
"example.com"
];
name = "custom-sites";
preset = "general";
}
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.enableDirectSync
Include these domains in zapret.directSync.
Type: boolean
Default:
true
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.configName
Config to clone strategies from. Exclusive with nfqwsArgs.
Type: null or string
Default:
null
Example:
"general(ALT9)"
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.defaultDomains
Upstream lists to include (“discord” = “general”, “youtube” = “google”). Without preset, use one per rule so the strategy family can be inferred.
Type: list of (one of “general”, “google”, “discord”, “youtube”, “instagram”, “soundcloud”, “twitter”)
Default:
[ ]
Example:
[
"google"
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.defaultIps
Upstream ipsets to include (“all” is ipset-all.txt).
Type: list of value “all” (singular enum)
Default:
[ ]
Example:
[
"all"
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.domains
Domains in this hostlist.
Type: list of string
Default:
[ ]
Example:
[
"example.com"
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.ips
IPs/CIDRs in this rule’s ipset.
Type: list of string
Default:
[ ]
Example:
[
"203.0.113.0/24"
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.name
Hostlist name (hostlists/list-<name>.txt).
Type: string matching the pattern ^[a-z0-9][a-z0-9-]*$
Example:
"cloudflare"
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.nfqwsArgs
Raw NFQWS arguments; --hostlist and --new are added. Exclusive with configName.
Type: list of string
Default:
[ ]
Example:
[
"--filter-tcp=443 --dpi-desync=fake,multisplit"
]
services.proxy-suite.zapret.zapret-discord-youtube.hostlistRules.*.preset
Strategy family to clone, from configName or the active config.
Type: null or one of “general”, “google”, “instagram”, “soundcloud”, “twitter”
Default:
null
Example:
"google"
services.proxy-suite.zapret.zapret-discord-youtube.includeExtraUpstreamLists
Also use the upstream instagram, soundcloud and twitter lists.
Type: boolean
Default:
false
services.proxy-suite.zapret.zapret-discord-youtube.ips
Extra IPs/CIDRs to bypass.
Type: list of string
Default:
[ ]
Example:
[
"203.0.113.0/24"
]
services.proxy-suite.zapret.zapret2.autoHostlist.enable
Learn blocked hosts: after failThreshold failures (retransmissions, early RST, DPI
redirect, one-sided UDP) a host joins /var/lib/proxy-suite/zapret2/zapret-hosts-auto.txt.
Off, only zapret2.domains and proxy-ctl zapret auto add are acted on.
The thresholds below also fill whichever of them a profile’s strategy rotation
(circular) leaves unset; its own fails and time are kept.
Type: boolean
Default:
true
Example:
true
services.proxy-suite.zapret.zapret2.autoHostlist.debugLog
Log why hosts are or are not learned to zapret-hosts-auto-debug.log.
Type: boolean
Default:
false
services.proxy-suite.zapret.zapret2.autoHostlist.failThreshold
Failures before a host is learned.
Type: positive integer, meaning >0
Default:
3
services.proxy-suite.zapret.zapret2.autoHostlist.failTime
Seconds allowed between two failures before the count resets.
Type: positive integer, meaning >0
Default:
300
services.proxy-suite.zapret.zapret2.autoHostlist.incomingMaxseq
Incoming sequence number past which an RST or redirect is not a failure.
Type: positive integer, meaning >0
Default:
4096
services.proxy-suite.zapret.zapret2.autoHostlist.retransMaxseq
Outgoing sequence number past which failure detection stops.
Type: positive integer, meaning >0
Default:
32768
services.proxy-suite.zapret.zapret2.autoHostlist.retransReset
RST a stalled client once retransThreshold is hit, so failures are counted fast.
Type: boolean
Default:
true
services.proxy-suite.zapret.zapret2.autoHostlist.retransThreshold
Retransmissions of the first request that count as one failure.
Type: positive integer, meaning >0
Default:
3
services.proxy-suite.zapret.zapret2.autoHostlist.udpIn
Incoming UDP packets at or below which an exchange is one-sided.
Type: positive integer, meaning >0
Default:
1
services.proxy-suite.zapret.zapret2.autoHostlist.udpOut
Outgoing UDP packets before a one-sided exchange counts as a failure.
Type: positive integer, meaning >0
Default:
4
services.proxy-suite.zapret.zapret2.blobs
Fake payloads by name (blob=<name>) on top of those of strategySource: a file in zapret2’s files/fake, or an absolute path.
Type: attribute set of string
Default:
{ }
Example:
{
tls_clienthello = "/etc/proxy-suite/my_clienthello.bin";
}
services.proxy-suite.zapret.zapret2.cutoff.enable
Some lines let TLS to certain hosting networks handshake and then cut it at 12-34 KB,
which no strategy fixes. z2k’s probe checks this line against ~110 known targets when
its network changes and once a day, and for each cut-off network searches a whitelisted
name that nfqws2 then puts into a fake ClientHello: thousands of short TLS connections to
foreign hosting IPs per full run, sent directly and never touched by zapret2. State and
maps live in /var/lib/proxy-suite/zapret2/cutoff; proxy-ctl zapret cutoff shows them.
Type: boolean
Default:
true
Example:
true
services.proxy-suite.zapret.zapret2.cutoff.proxyFallback
Route the cut-off networks no name fixes through the proxy outbound. Needs the sing-box backend with an outbound and a route mode other than all-bypass, and only applies to traffic the backend sees by address (TUN, TProxy, per-app routing, clients that dial IPs); explicit direct rules still win.
Type: boolean
Default:
true
services.proxy-suite.zapret.zapret2.domains
Domains always treated as blocked. At runtime: proxy-ctl zapret auto add.
Type: list of string
Default:
[ ]
Example:
[
"rutracker.org"
]
services.proxy-suite.zapret.zapret2.excludeDomains
Domains never touched or learned. At runtime: proxy-ctl zapret auto exclude.
Type: list of string
Default:
[ ]
Example:
[
"bank.example.com"
]
services.proxy-suite.zapret.zapret2.ipv6
Intercept IPv6 as well as IPv4.
Type: boolean
Default:
false
services.proxy-suite.zapret.zapret2.ports.tcp
TCP ports sent to NFQUEUE. Must cover every port a profile filters on. null uses the ports of strategySource.
Type: null or string
Default:
null
Example:
"80,443"
services.proxy-suite.zapret.zapret2.ports.udp
UDP ports sent to NFQUEUE. Must cover every port a profile filters on. null uses the ports of strategySource.
Type: null or string
Default:
null
Example:
"443"
services.proxy-suite.zapret.zapret2.profiles
nfqws2 profiles replacing those of strategySource, joined with --new; first match wins. <HOSTLIST> expands to the hostlist arguments, <HOSTLIST_NOAUTO> to the same without learning. --qnum, --fwmark and --lua-init are added automatically. null uses the profiles of strategySource.
Type: null or (list of string)
Default:
null
Example:
[
"--filter-tcp=443 --filter-l7=tls <HOSTLIST> --payload=tls_client_hello --lua-desync=multisplit:pos=1,midsld"
]
services.proxy-suite.zapret.zapret2.strategySource
Where profiles, blobs and ports come from; both are pinned flake inputs. “nfqws2-keenetic”: its nfqws2.conf strategies with its user and exclude lists. “z2k”: z2k’s own config generator, run at build time: per-category rotation pools (general, YouTube, googlevideo, QUIC, Discord), its failure detectors and fake-TTL hook, its blobs, whitelist and hostlists, including the ~125k-domain RKN list (about 15 MB more RSS per nfqws2 process). Either way each host’s working strategy is remembered across restarts in /var/lib/proxy-suite/zapret2/circular/state.tsv.
Type: one of “nfqws2-keenetic”, “z2k”
Default:
"nfqws2-keenetic"
Example:
"z2k"