This commit is contained in:
2025-09-16 19:49:38 +03:00
parent b3cf77203c
commit d081716394
5 changed files with 92 additions and 42 deletions
+8
View File
@@ -6,6 +6,14 @@
...
}:
{
xdg = {
dataFile = {
"PrismLauncher" = {
source = config.lib.file.mkOutOfStoreSymlink "${xlib.dirs.soptur-drive}/Games/PrismLauncher";
target = "PrismLauncher";
};
};
};
home.file = {
"Storage" = {
source = config.lib.file.mkOutOfStoreSymlink "${xlib.dirs.vetymae-drive}/Users/oqyude/Storage";
+5
View File
@@ -35,6 +35,11 @@
default = "/home/${config.xlib.device.username}";
description = "User home directory.";
};
user-services = lib.mkOption {
type = lib.types.str;
default = "${config.xlib.dirs.user-home}/Misc/Devices/Services";
description = "User services directory.";
};
user-storage = lib.mkOption {
type = lib.types.str;
default = "${config.xlib.dirs.user-home}/Storage";
+1
View File
@@ -5,5 +5,6 @@
{
imports = [
../desktop
../services/zapret.nix
];
}
+47
View File
@@ -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"
];
};
}
+31 -42
View File
@@ -1,47 +1,36 @@
{ 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
{ config, pkgs, ... }:
{
services.zapret = {
systemd.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"
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
description = "Custom Script Service";
path = with pkgs; [
sudo
git
nftables
iproute2
coreutils
];
serviceConfig = {
Type = "simple";
WorkingDirectory = "${xlib.dirs.user-services}/Misc/Devices/Services/zapret/137";
User = "root";
ExecStart = ''
${pkgs.bash}/bin/bash ${xlib.dirs.user-services}/Misc/Devices/Services/zapret/main_script.sh -nointeractive
'';
ExecStop = ''
${pkgs.bash}/bin/bash ${xlib.dirs.user-services}/Misc/Devices/Services/zapret/stop_and_clean_nft.sh
'';
ExecStopPost = ''
${pkgs.coreutils}/bin/echo "Сервис завершён"
'';
PIDFile = ''
/run/zapret_discord_youtube.pid
'';
Restart = "on-failure";
RestartSec = "5s";
};
};
}