From 435bc08e629fb8a1dd2005ea817193de3f928313 Mon Sep 17 00:00:00 2001 From: oqyude Date: Thu, 28 Aug 2025 14:03:46 +0300 Subject: [PATCH] 123 --- nixosModules/essentials/settings.nix | 1 - nixosModules/services/zapret.nix | 47 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 nixosModules/services/zapret.nix diff --git a/nixosModules/essentials/settings.nix b/nixosModules/essentials/settings.nix index 1175704..063ce89 100755 --- a/nixosModules/essentials/settings.nix +++ b/nixosModules/essentials/settings.nix @@ -23,7 +23,6 @@ experimental-features = [ "flakes" "nix-command" - "repl-flake" ]; }; }; diff --git a/nixosModules/services/zapret.nix b/nixosModules/services/zapret.nix new file mode 100644 index 0000000..ca19b70 --- /dev/null +++ b/nixosModules/services/zapret.nix @@ -0,0 +1,47 @@ +{ pkgs, ... }: +#? 🙏 https://github.com/ViZiD/dotfiles/blob/master/modules/shared/zapret.nix +#? https://github.com/Flowseal/zapret-discord-youtube/blob/main/general.bat +let + list-general = pkgs.fetchurl { + # https://github.com/Flowseal/zapret-discord-youtube/blob/main/lists/list-general.txt + url = "https://raw.githubusercontent.com/Flowseal/zapret-discord-youtube/779853740f9c957551685bdebf59ad3a788b5004/lists/list-general.txt"; + sha256 = "sha256-/9dYk5fiVLfN+bY0STlqutnRQQoInS9NBGg9fWHZedk="; + }; +in +{ + services.zapret = { + enable = true; + udpSupport = true; + udpPorts = [ + "443" + "50000:50099" + ]; + params = [ + "--filter-tcp=80" + "--hostlist=${list-general}" + "--dpi-desync=fake,split2" + "--dpi-desync-autottl=2" + "--dpi-desync-fooling=md5sig" + + "--new" + "--filter-tcp=443" + "--hostlist=${list-general}" + "--dpi-desync=fake,multidisorder" + "--dpi-desync-split-pos=midsld" + "--dpi-desync-repeats=8" + "--dpi-desync-fooling=md5sig,badseq" + + "--new" + "--filter-udp=443" + "--hostlist=${list-general}" + "--dpi-desync=fake" + "--dpi-desync-repeats=6" + + "--new" + "--filter-udp=50000-50099" + "--filter-l7=discord,stun" + "--dpi-desync=fake" + "--dpi-desync-repeats=6" + ]; + }; +}