fix: hardening

This commit is contained in:
FUFSoB committed 2026-10-05 22:44:09 +05:00
1 parent 017a947a18
commit a435942b4f
168 files changed
+9166 -1644

No files matched your search

+19
View File
@@ -10,6 +10,7 @@
{
config,
options,
lib,
pkgs,
...
@@ -94,6 +95,24 @@ in
inherit (assembly) context;
})
# Settings that work, but less safely than they look. Every host type has assertions;
# warnings, not all of them.
(lib.optionalAttrs (options ? warnings) {
warnings =
let
inbounds = derived.proxyInboundsCfg;
serverSource = inbounds.routing.serverSource;
in
lib.optional
(
derived.proxyInboundsEnabled
&& inbounds.serverPorts != [ ]
&& serverSource.ipv4 == null
&& serverSource.ipv6 == null
)
"proxy-suite: inbounds.serverPorts without inbounds.routing.serverSource: inbound users reach those services from this host's own address, which they may trust (a mail server relaying for its own host relays for every user then)";
})
(lib.mkIf (cfg.zapret.engine == "zapret-discord-youtube" && cfg.zapret.enable) (
import ./zapret.nix {
inherit