2024-11-16 04:43:59 +03:00
|
|
|
{
|
|
|
|
lib,
|
2024-12-16 06:44:20 +03:00
|
|
|
pkgsMaster,
|
2024-11-16 04:43:59 +03:00
|
|
|
...
|
|
|
|
}: {
|
2024-11-16 06:38:48 +03:00
|
|
|
options.module.dpi.bypass = {
|
2024-12-16 06:44:20 +03:00
|
|
|
enable = lib.mkEnableOption "the Zapret DPI bypass service.";
|
|
|
|
package = lib.mkPackageOption pkgsMaster "zapret" { };
|
2024-11-16 06:38:48 +03:00
|
|
|
params = lib.mkOption {
|
|
|
|
default = [ ];
|
2024-12-16 06:44:20 +03:00
|
|
|
type = with lib.types; listOf str;
|
|
|
|
};
|
|
|
|
whitelist = lib.mkOption {
|
|
|
|
default = [ ];
|
|
|
|
type = with lib.types; listOf str;
|
|
|
|
};
|
|
|
|
blacklist = lib.mkOption {
|
|
|
|
default = [ ];
|
|
|
|
type = with lib.types; listOf str;
|
|
|
|
};
|
|
|
|
qnum = lib.mkOption {
|
|
|
|
default = 200;
|
|
|
|
type = lib.types.int;
|
|
|
|
};
|
|
|
|
configureFirewall = lib.mkOption {
|
|
|
|
default = true;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
httpSupport = lib.mkOption {
|
|
|
|
default = true;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
httpMode = lib.mkOption {
|
|
|
|
default = "first";
|
|
|
|
type = lib.types.enum [
|
|
|
|
"first"
|
|
|
|
"full"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
udpSupport = lib.mkOption {
|
|
|
|
default = false;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
|
|
|
udpPorts = lib.mkOption {
|
|
|
|
default = [ ];
|
|
|
|
type = with lib.types; listOf str;
|
2024-11-16 06:38:48 +03:00
|
|
|
};
|
2024-11-16 04:43:59 +03:00
|
|
|
};
|
|
|
|
}
|