mirror of
https://github.com/oqyude/nixos.git
synced 2026-06-11 04:30:41 +03:00
Init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.tts.servers = {
|
||||
russian = {
|
||||
enable = true;
|
||||
port = 5301;
|
||||
};
|
||||
english = {
|
||||
#enable = false;
|
||||
port = 5300;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
xlib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# services.zapret = {
|
||||
# enable = true;
|
||||
# params = [
|
||||
# "--dpi-desync=fake,disorder2"
|
||||
# "--dpi-desync-ttl=1"
|
||||
# "--dpi-desync-autottl=2"
|
||||
# ];
|
||||
# };
|
||||
|
||||
systemd.services.zapret = {
|
||||
enable = true;
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
description = "Custom Script Service";
|
||||
path = with pkgs; [
|
||||
sudo
|
||||
git
|
||||
nftables
|
||||
iproute2
|
||||
zapret
|
||||
coreutils
|
||||
];
|
||||
unitConfig = {
|
||||
After = [ "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
WorkingDirectory = "${xlib.dirs.user-services}/zapret";
|
||||
User = "root";
|
||||
ExecStart = ''
|
||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/main_script.sh -nointeractive
|
||||
'';
|
||||
ExecStop = ''
|
||||
/run/current-system/sw/bin/bash ${xlib.dirs.user-services}/zapret/stop_and_clean_nft.sh
|
||||
'';
|
||||
# ExecStopPost = ''
|
||||
# /run/current-system/sw/bin/echo "Сервис завершён"
|
||||
# '';
|
||||
PIDFile = ''
|
||||
/run/zapret_discord_youtube.pid
|
||||
'';
|
||||
# Restart = "on-failure";
|
||||
# RestartSec = "5s";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user