Zapret : Enable autolist & new params.
This commit is contained in:
parent
0b5bddca2a
commit
88bed3b96a
|
@ -1,4 +1,4 @@
|
|||
{ ... }: {
|
||||
{ config, ... }: {
|
||||
imports = [
|
||||
./Backup.nix
|
||||
./Container.nix
|
||||
|
@ -33,7 +33,8 @@
|
|||
};
|
||||
zapret = {
|
||||
enable = true;
|
||||
params = "--dpi-desync=fake,split2 --dpi-desync-fooling=datanoack";
|
||||
params = "--dpi-desync=fake,disorder2 --dpi-desync-ttl=1 --dpi-desync-autottl=2";
|
||||
autolist = "${config.container.module.frkn.storage}/Autolist.txt";
|
||||
whitelist = ''
|
||||
youtube.com
|
||||
googlevideo.com
|
||||
|
@ -43,6 +44,9 @@
|
|||
rutracker.cc
|
||||
rutrk.org
|
||||
t-ru.org
|
||||
medium.com
|
||||
quora.com
|
||||
quoracdn.net
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
blacklist = if cfg.blacklist != null then
|
||||
"--hostlist-exclude ${pkgs.writeText "ZapretBlacklist" (util.trimTabs cfg.blacklist)}"
|
||||
else "";
|
||||
|
||||
# ISSUE: Seems broken. Adds nothing automatically.
|
||||
autolist = if cfg.autolist != null then
|
||||
"--hostlist-auto ${cfg.autolist}"
|
||||
else "";
|
||||
in {
|
||||
options = {
|
||||
module.zapret = mkOption {
|
||||
|
@ -28,6 +33,10 @@ in {
|
|||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
autolist = mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
qnum = mkOption {
|
||||
default = 200;
|
||||
type = types.int;
|
||||
|
@ -49,7 +58,7 @@ in {
|
|||
requires = [ "network.target" ];
|
||||
path = with pkgs; [ zapret ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.zapret}/bin/nfqws --pidfile=/run/nfqws.pid ${cfg.params} ${whitelist} ${blacklist} --qnum=${toString cfg.qnum}";
|
||||
ExecStart = "${pkgs.zapret}/bin/nfqws --pidfile=/run/nfqws.pid ${cfg.params} ${whitelist} ${blacklist} ${autolist} --qnum=${toString cfg.qnum}";
|
||||
Type = "simple";
|
||||
PIDFile = "/run/nfqws.pid";
|
||||
ExecReload = "/bin/kill -HUP $MAINPID";
|
||||
|
|
Loading…
Reference in a new issue