fix: zapret2 improvements
This commit is contained in:
30 files changed
+872
-49
No files matched your search
@@ -31,7 +31,11 @@ in
|
||||
|
||||
# What zapret feeds back into the client routing table.
|
||||
directSync = {
|
||||
enable = bool true "Send zapret's domains direct in the proxy routing, so zapret handles them.";
|
||||
enable = bool true ''
|
||||
Send zapret's domains direct in the proxy routing, so zapret handles them. With zapret2,
|
||||
also the sites it pins and learns at runtime, after your own rules and autoProxy's.
|
||||
The all-proxy and all-bypass route modes leave them out, like every direct list.
|
||||
'';
|
||||
upstreamIps = bool false "Also send zapret's upstream IP lists direct.";
|
||||
userIps = bool true "Also send `zapret-discord-youtube.ips` (minus `excludeIps`) direct.";
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@ let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
int = (import ./lib.nix { inherit lib; }).positiveInt;
|
||||
fromSource = what: "`null`: use the ${what} from `strategySource`.";
|
||||
portOrRange = types.either types.port (types.strMatching "[0-9]+(-[0-9]+)?");
|
||||
in
|
||||
{
|
||||
options.services.proxy-suite.zapret.zapret2 = {
|
||||
@@ -63,16 +64,56 @@ in
|
||||
tcp = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "TCP ports zapret2 handles. Must include every port a profile uses. ${fromSource "ports"}";
|
||||
description = "TCP ports zapret2 handles. The ports the profiles filter on and `extraTcp` are always added. ${fromSource "ports"}";
|
||||
example = "80,443";
|
||||
};
|
||||
|
||||
udp = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "UDP ports zapret2 handles. Must include every port a profile uses. ${fromSource "ports"}";
|
||||
description = "UDP ports zapret2 handles. The ports the profiles filter on and `extraUdp` are always added. ${fromSource "ports"}";
|
||||
example = "443";
|
||||
};
|
||||
|
||||
extraTcp = mkOption {
|
||||
type = types.listOf portOrRange;
|
||||
default = [ ];
|
||||
description = ''
|
||||
More TCP ports, handled like the profiles' own: each profile that recognizes its traffic
|
||||
(`--filter-l7`, e.g. TLS) gets them too, so TLS to a blocked site on one of these ports
|
||||
gets the same strategies. A profile without `--filter-l7` keeps its ports.
|
||||
'';
|
||||
example = [
|
||||
8444
|
||||
"9000-9010"
|
||||
];
|
||||
};
|
||||
|
||||
extraUdp = mkOption {
|
||||
type = types.listOf portOrRange;
|
||||
default = [ ];
|
||||
description = ''
|
||||
More UDP ports, handled like the profiles' own: each profile that recognizes its traffic
|
||||
(`--filter-l7`, e.g. STUN, Discord, QUIC) gets them too, so a game's or call app's STUN
|
||||
on these ports gets the same strategies as Discord's.
|
||||
'';
|
||||
example = [ "27015-27030" ];
|
||||
};
|
||||
};
|
||||
|
||||
strategyLog = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Log each counted failure and strategy switch to the journal, per site
|
||||
(`proxy-ctl logs proxy-suite-zapret`). Without it nfqws2 logs them only with `debug`.
|
||||
'';
|
||||
};
|
||||
|
||||
debug = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Log everything nfqws2 does to the journal, every packet included. Very verbose: for troubleshooting.";
|
||||
};
|
||||
|
||||
ipv6 = mkOption {
|
||||
|
||||
Reference in new issue
Block a user