fix: hardening
This commit is contained in:
168 files changed
+9166
-1644
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user