mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-15 22:41:52 +03:00
123
This commit is contained in:
@@ -6,6 +6,14 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
xdg = {
|
||||||
|
dataFile = {
|
||||||
|
"PrismLauncher" = {
|
||||||
|
source = config.lib.file.mkOutOfStoreSymlink "${xlib.dirs.soptur-drive}/Games/PrismLauncher";
|
||||||
|
target = "PrismLauncher";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
home.file = {
|
home.file = {
|
||||||
"Storage" = {
|
"Storage" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${xlib.dirs.vetymae-drive}/Users/oqyude/Storage";
|
source = config.lib.file.mkOutOfStoreSymlink "${xlib.dirs.vetymae-drive}/Users/oqyude/Storage";
|
||||||
|
|||||||
@@ -35,6 +35,11 @@
|
|||||||
default = "/home/${config.xlib.device.username}";
|
default = "/home/${config.xlib.device.username}";
|
||||||
description = "User home directory.";
|
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 {
|
user-storage = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
default = "${config.xlib.dirs.user-home}/Storage";
|
default = "${config.xlib.dirs.user-home}/Storage";
|
||||||
|
|||||||
@@ -5,5 +5,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../desktop
|
../desktop
|
||||||
|
../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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,47 +1,36 @@
|
|||||||
{ pkgs, ... }:
|
{ config, 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 = {
|
systemd.services.zapret = {
|
||||||
enable = true;
|
enable = true;
|
||||||
udpSupport = true;
|
after = [ "network.target" ];
|
||||||
udpPorts = [
|
wantedBy = [ "multi-user.target" ];
|
||||||
"443"
|
description = "Custom Script Service";
|
||||||
"50000:50099"
|
path = with pkgs; [
|
||||||
];
|
sudo
|
||||||
params = [
|
git
|
||||||
"--filter-tcp=80"
|
nftables
|
||||||
"--hostlist=${list-general}"
|
iproute2
|
||||||
"--dpi-desync=fake,split2"
|
coreutils
|
||||||
"--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"
|
|
||||||
];
|
];
|
||||||
|
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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user